App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2026-11-25] [$175] Expensify is not in app's list when share HEIC file from device file manager

Open applause-bot[bot] opened this issue 3 weeks ago • 18 comments

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.34-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/App/pull/106089 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: samsung galaxy a34/16 App Component: Other

Action Performed:

Precondition: User is logged in E app User have HEIC file in File manager

  1. Go to the HEIC file> Share
  2. Try to find Expensify app in the app's list

Expected Result:

Expensify app should be shown in the device app's list

Actual Result:

Expensify app is not shown in the device app's list

Workaround:

Unknown

Platforms:

  • [x] Android: App
  • [ ] Android: mWeb Chrome
  • [ ] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [ ] Windows: Chrome
  • [ ] MacOS: Chrome Safari

Screenshots/Videos

https://github.com/user-attachments/assets/d6654caf-2616-402a-9dd6-11323b2bd972

View all open jobs on GitHub

Applause Internal Information Exported by: Rizky Gunawan Bug ID: 7308333

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

applause-bot[bot] avatar Nov 09 '26 15:11 applause-bot[bot]

While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/012dc0d8fad079a38ea99c4d675a4a4b900aecea89b69649a1c1015af891bf82

applause-bot[bot] avatar Nov 09 '26 15:11 applause-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (External)

melvin-bot[bot] avatar Nov 09 '26 15:11 melvin-bot[bot]

Job added to Upwork: https://www.upwork.com/jobs/~022119818566472317718

melvin-bot[bot] avatar Nov 09 '26 15:11 melvin-bot[bot]

Proposal

What is the root cause of that problem?

Likely cause: Android share-target registration does not match the file manager’s HEIC share intent. Production confirmation is still missing.

The standalone Android manifest excludes image/heic and image/heif. If the file manager shares using either MIME type, Android will omit Expensify before any attachment validation or conversion runs.

However, shipped Android builds use the separate Mobile-Expensify project. Its installed manifest was unavailable, so the standalone omission does not prove the production root cause.

Supporting evidence

What changes do you think we should make in order to solve the problem?

Escalate to an internal engineer with Mobile-Expensify access before selecting a fix. Confirm:

  1. The actual action and MIME type emitted by Samsung’s file manager.
  2. Whether the installed staging/production APK’s merged manifest accepts that intent.
  3. Whether JPEG sharing works from the same file manager and Expensify is absent from the complete chooser.

No App-only code fix is recommended with the current evidence.

What alternative solutions did you explore?

A different intent action, generic MIME type, or chooser/profile restrictions could produce the same symptom. These remain unverified alternatives.

Verification limitation: The supplied web session cannot exercise Android’s native file manager or share chooser; no native reproduction was performed.


Next Steps for Contributor+ team: Obtain the installed APK’s intent-resolution evidence through an internal engineer.
To refine: @MelvinBot <your feedback>


view run

MelvinBot avatar Nov 09 '26 15:11 MelvinBot

Proposal

What is the root cause of that problem?

In android/app/src/main/AndroidManifest.xml (lines 125–135), the ACTION_SEND intent filter under MainActivity explicitly enumerates supported image MIME types:

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />

    <!-- Images -->
    <data android:mimeType="image/jpg" />
    <data android:mimeType="image/jpeg" />
    <data android:mimeType="image/gif" />
    <data android:mimeType="image/png" />
    <data android:mimeType="image/tif" />
    <data android:mimeType="image/tiff" />

However:

  1. Standard Android devices (especially Samsung Galaxy running One UI / Android 13+) broadcast HEIC/HEIF files with MIME types image/heic or image/heif.
  2. Because image/heic and image/heif are missing from the intent filter's <data> declarations, Android's IntentResolver / PackageManager fails to match Expensify as an eligible target for ACTION_SEND intents with those MIME types. Consequently, Expensify is excluded from the system share sheet chooser.
  3. Downstream in the application, Expensify already possesses complete native and JavaScript support for processing and converting HEIC/HEIF images (e.g. CONST.ALLOWED_RECEIPT_EXTENSIONS, CONST.SHARE_FILE_MIMETYPE.HEIC, src/libs/fileDownload/heicConverter, and src/libs/fileDownload/processPickedAssets/index.native.ts). The omission is strictly in the Android manifest share-target declaration.

What changes do you think we should make in order to solve the problem?

  1. In android/app/src/main/AndroidManifest.xml: Add image/heic and image/heif to the ACTION_SEND intent filter under <!-- Images -->:

    <!-- Images -->
    <data android:mimeType="image/jpg" />
    <data android:mimeType="image/jpeg" />
    <data android:mimeType="image/gif" />
    <data android:mimeType="image/png" />
    <data android:mimeType="image/tif" />
    <data android:mimeType="image/tiff" />
    <data android:mimeType="image/heic" />
    <data android:mimeType="image/heif" />
    
  2. Also verify if ACTION_SEND_MULTIPLE intent-filter should be added for batch sharing of multiple HEIC images:

    <intent-filter>
        <action android:name="android.intent.action.SEND_MULTIPLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="image/heic" />
        <data android:mimeType="image/heif" />
    </intent-filter>
    
  3. HybridApp parity note: Since hybrid builds use Mobile-Expensify's Android manifest, this <data> declaration should also be mirrored in the Mobile-Expensify manifest to ensure identical behavior on production/staging hybrid APKs.

What alternative solutions did you explore? (Optional)

Using a wildcard <data android:mimeType="image/*" /> was considered. However, Expensify intentionally uses explicit MIME types in AndroidManifest.xml to avoid handling unsupported formats (e.g. animated webp or vector formats without converters). Declaring image/heic and image/heif explicitly preserves Expensify's strict MIME policy while enabling the OS share target.

Tests

  1. On an Android phone (e.g. Samsung Galaxy running Android 13/14+), launch Expensify and sign in.
  2. Open the device's native File Manager (e.g., Samsung My Files) or Google Photos.
  3. Locate an .heic or .heif image file.
  4. Tap the Share button.
  5. In the system share sheet / app list, verify that Expensify appears as an available share target.
  6. Select Expensify and pick a chat (or recipient).
  7. Verify that the HEIC image is successfully passed to the share preview, converted/processed, and sent as an attachment without errors.

  • Contributor: @kevinjosh10
  • Expensify Account Email: [email protected]
  • Upwork Profile: https://www.upwork.com/freelancers/~0131dae36abcf59374

Contributor details

Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0131dae36abcf59374

kevinjosh10 avatar Nov 09 '26 15:11 kevinjosh10

Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0179cdc82689f205c7

Proposal

Please re-state the problem that we are trying to solve in this issue.

When sharing a HEIC image file from the device file manager on mobile, Expensify does not appear in the system share target list.

What is the root cause of that problem?

In the native application configuration (AndroidManifest.xml on Android and Share Extension Info.plist on iOS), intent filters for receiving shared files explicitly declare MIME types such as image/jpeg, image/png, and application/pdf, but omit image/heic, image/heif, and general wildcard image/*.

What changes do you think we should make in order to solve the problem?

  1. In android/app/src/main/AndroidManifest.xml, update the Share Intent filters under the main activity and share receiver to include <data android:mimeType="image/heic" />, <data android:mimeType="image/heif" />, and <data android:mimeType="image/*" />.
  2. In iOS ShareExtension/Info.plist, ensure NSExtensionActivationRule supports public.heic and public.heif uniform type identifiers (UTIs).

What alternative solutions did you explore? (Optional)

  • Converting HEIC files in third-party gallery before sharing: Rejected because the app must seamlessly support native modern camera formats directly from the system share sheet.

What automated tests can you add to prevent this from re-occurring?

In native manifest verification tests or file utility unit tests:

  • Add a test verifying that fileUtils.isImage() and MIME type resolvers correctly recognize .heic and .heif extensions as valid image formats for expense receipt attachment.

TassioSales avatar Nov 09 '26 18:11 TassioSales

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

melvin-bot[bot] avatar Nov 09 '26 18:11 melvin-bot[bot]

Proposal

Please re-state the problem that we are trying to solve in this issue.

On Android devices (such as Samsung Galaxy running Android 13/14+), when attempting to share an .heic or .heif image file directly from the device's native File Manager (e.g., Samsung My Files, Files by Google), Expensify does not appear in the system share chooser / app list.

What is the root cause of that problem?

In android/app/src/main/AndroidManifest.xml (lines 121–168), MainActivity declares an <intent-filter> for android.intent.action.SEND with specific <data android:mimeType="..." /> entries:

<!-- Images -->
<data android:mimeType="image/jpg" />
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/gif" />
<data android:mimeType="image/png" />
<data android:mimeType="image/tif" />
<data android:mimeType="image/tiff" />
  1. While JPEG, PNG, GIF, and TIFF are explicitly registered, both image/heic and image/heif MIME types are omitted.
  2. When the user taps "Share" on an HEIC file in Android File Manager, the system creates an Intent(Intent.ACTION_SEND) with MIME type image/heic (or image/heif).
  3. Android's IntentResolver / PackageManager evaluates installed application manifests against the intent filter. Because Expensify does not advertise intent filters for image/heic or image/heif, the OS omits Expensify from the system share sheet chooser before any application code can run.
  4. Downstream, Expensify already contains full support for handling and converting HEIC/HEIF images (via src/libs/fileDownload/heicConverter, processPickedAssets/index.native.ts, and CONST.SHARE_FILE_MIMETYPE.HEIC). The omission is strictly in the Android manifest share-target declaration.

What changes do you think we should make in order to solve the problem?

  1. In android/app/src/main/AndroidManifest.xml: Add image/heic and image/heif to the android.intent.action.SEND intent filter under <!-- Images -->:
                     <!-- Images -->
                     <data android:mimeType="image/jpg" />
                     <data android:mimeType="image/jpeg" />
                     <data android:mimeType="image/gif" />
                     <data android:mimeType="image/png" />
                     <data android:mimeType="image/tif" />
                     <data android:mimeType="image/tiff" />
    +                <data android:mimeType="image/heic" />
    +                <data android:mimeType="image/heif" />
    
  2. In addition, add an android.intent.action.SEND_MULTIPLE intent filter for sharing multiple HEIC/image files simultaneously:
    <intent-filter>
        <action android:name="android.intent.action.SEND_MULTIPLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="image/*" />
    </intent-filter>
    
  3. HybridApp parity note: Ensure the same <data android:mimeType="image/heic" /> and <data android:mimeType="image/heif" /> tags are reflected in Mobile-Expensify's Android manifest to guarantee identical share-sheet availability on hybrid staging/production builds.

What alternative solutions did you explore? (Optional)

  • Using a broad wildcard <data android:mimeType="image/*" /> under ACTION_SEND. However, Expensify maintains an explicit list of supported image MIME types in AndroidManifest.xml to avoid handling unsupported formats (such as raw camera formats without decoders). Adding image/heic and image/heif explicitly preserves this architecture.

Tests

  1. On an Android phone (e.g. Samsung Galaxy running Android 13/14+), sign into Expensify.
  2. Open the device's native File Manager (e.g., Samsung My Files) or Google Photos.
  3. Locate an .heic or .heif image.
  4. Tap Share.
  5. Verify Expensify appears in the system app chooser list.
  6. Select Expensify and choose a destination chat.
  7. Verify the HEIC image is attached, converted/uploaded smoothly, and sent without errors.

Contributor details

Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01ca8ad8ce36b9eceb

jmquero92 avatar Nov 10 '26 14:11 jmquero92

:warning: Unable to store contributor details

Details
Auth SetContributorDetails returned an error
401 Contributor details already exist

melvin-bot[bot] avatar Nov 10 '26 14:11 melvin-bot[bot]

@DylanDylann Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Nov 12 '26 21:11 melvin-bot[bot]

Taking over from https://expensify.slack.com/archives/C02NK2DQWUX/p1794553925334269?thread_ts=1794553131.039459&cid=C02NK2DQWUX

mkhutornyi avatar Nov 13 '26 07:11 mkhutornyi

I'm implementing this myself since this requires Mobile-Expensify changes where Melvin or contributors don't have access. Expensify app now shows in share list but I found another tricky in-app bug while testing.

mkhutornyi avatar Nov 13 '26 08:11 mkhutornyi

📣 @TaduJR 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

melvin-bot[bot] avatar Nov 13 '26 08:11 melvin-bot[bot]

Reviewing from https://expensify.slack.com/archives/C02NK2DQWUX/p1794559399029969?thread_ts=1794553131.039459&cid=C02NK2DQWUX

TaduJR avatar Nov 13 '26 08:11 TaduJR

@TaduJR / @mkhutornyi

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.40-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/106816

If no regressions arise, payment will be issued on 2026-11-25. :confetti_ball:

The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

melvin-bot[bot] avatar Nov 18 '26 00:11 melvin-bot[bot]

Contributor+ Checklist:

  • [x] [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to the comment on the PR: new feature Link to the comment on the Issue:

  • [x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal

Test: (android share sheet)

  1. Open the device file manager and find a .heic image
  2. Tap Share
  3. Verify Expensify appears in the app list
  4. Select Expensify
  5. Verify the share screen opens with the Submit and Share tabs and no "We couldn't process this image" error
  6. On the Share tab, pick a chat and send
  7. Verify the image is sent as an attachment
  8. Repeat steps 1 to 4, then on the Submit tab pick a recipient and submit
  9. Verify the expense is created with the image as its receipt
  10. Repeat steps 1 to 9 with a .heif image

Do we agree 👍 or 👎

mkhutornyi avatar Nov 18 '26 00:11 mkhutornyi

Triggered auto assignment to @mallenexpensify (Awaiting Payment)

Payment Summary

Resolving PRs:

  • https://github.com/Expensify/App/pull/106816
  • https://github.com/Expensify/Mobile-Expensify/pull/14229

Upwork Job

  • Assignee: @TaduJR requires payment (Needs manual offer from BZ)
  • Reviewer: @mkhutornyi owed $175 via NewDot

BugZero Checklist (@mallenexpensify)

  • [ ] I have confirmed assignees, roles, and Upwork contracts look correct
  • [ ] I have paid out Upwork contracts / manual NewDot requests
  • [ ] [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon