You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android - Tags - Multi level tags file cannot be imported #84969
Version Number: 9.3.36-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#83359 Email or phone of affected tester (no customers):sjodijsnodijdnoijsido@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Mac 26.2 / Chrome App Component: Money Requests
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #83359 - "Enable platform tree shaking in hermes bundle" by @rinej (High confidence) Related Issues: #80844 (previous identical issue)
Recommendation: REVERT
PR #83359 re-introduced the same babel/metro config changes that caused identical tag import failures in January 2026. The PR enabled experimentalImportSupport and disableImportExportTransform which breaks dynamic imports of the xlsx library used for spreadsheet parsing in tag imports.
This is a known regression - the exact same changes were previously merged in PR #80110, caused the same tag import failure (issue #80844), and were reverted in PR #80984. PR #83359 attempts to reintroduce these changes but has not resolved the underlying issue.
Labels: Keeping DeployBlockerCash (App deploy is blocked). This is a frontend bug requiring revert of App PR #83359.
metro.config.js line 38: Added experimentalImportSupport: true
babel.config.js line 66: Added disableImportExportTransform: true to React Native preset
Confirmed: Only one file in the codebase uses dynamic import of xlsx library (ImportSpreadsheet.tsx)
Root Cause
The babel/metro configuration changes enable platform tree shaking but break dynamic imports on Android native builds. When disableImportExportTransform: true is set with experimentalImportSupport: true, Metro handles ES6 imports differently, which causes the dynamic import('xlsx') call to fail at runtime on Android.
The xlsx library is dynamically imported to reduce initial bundle size. The tree shaking configuration changes how Metro processes this dynamic import, resulting in the import failing silently or the xlsx module being unavailable when the import resolves, causing the "import failed" error when users try to upload tag spreadsheets.
The PR description for #83359 states "What is NOT changed (vs reverted PR 80110)" but the core babel/metro changes that caused the original regression are still present.
Please re-state the problem that we are trying to solve in this issue.
Multi-level tag import fails on native (Android/iOS) in staging after PR #83359 was merged. Users can pick and parse a CSV/TSV file, configure settings, and preview data, but tapping "Import" fails with "Cannot assign to property 'name' which has only a getter".
What is the root cause of that problem?
This is a known regression — the exact same failure previously occurred as issue #80844, caused by PR #80110, and was fixed by reverting those changes in PR #80984. PR #83359 re-introduced the identical babel.config.js and metro.config.js changes.
The two config changes are:
experimentalImportSupport: true in metro.config.js — causes Metro's import-export-plugin to handle import/export transforms and inject "use strict" into all ESM modules
disableImportExportTransform: true in babel.config.js — disables Babel's @babel/plugin-transform-modules-commonjs, so ESM files keep their import/export syntax for Metro to process
Previously, Babel converted all ESM modules to CommonJS (sloppy mode). Now, Metro preserves ESM and injects strict mode. React Native's File class (node_modules/react-native/Libraries/Blob/File.js:43-46) defines name as a getter-only property (no setter). Somewhere in the API call chain for ImportMultiLevelTags, code assigns to file.name on a File instance. In sloppy mode this silently fails; in strict mode it throws TypeError: Cannot assign to property 'name' which has only a getter, causing the import to fail.
The error was confirmed in issue #80844 with this log:
[alrt] ENSURE_BUGBOT unknown API request error caught while processing request -
{"message":"Cannot assign to property 'name' which has only a getter",
"request":{"command":"ImportMultiLevelTags",...}}
What changes do you think we should make in order to solve the problem?
Immediate fix (deploy blocker): Revert PR #83359 — this is the same fix that resolved issue #80844 via PR #80984.
Permanent fix (for re-enabling platform tree shaking later): Before re-attempting these config changes, the underlying strict mode incompatibility must be fixed. The File class's name property needs either:
A setter added to File.name in React Native (upstream fix), or
The code in the API/networking chain that assigns to file.name needs to be identified and fixed to avoid the assignment
The multi-level tag import flow is in src/libs/actions/Policy/Tag.ts:891-907 (importMultiLevelTags), which calls readFileAsync to create a File object and sends it via API.write. The File object passes through src/libs/prepareRequestPayload/index.native.ts and React Native's FormData.getParts() before being sent via XHR.
What alternative solutions did you explore? (Optional)
Adding sideEffects: true override for xlsx — The xlsx package declares "sideEffects": false in its package.json, but since Metro resolves to the CJS entry point (xlsx.js), not the ESM one (xlsx.mjs), this is not the direct cause.
Patching Metro's strict mode injection — Could exclude certain modules from strict mode injection, but this would be fragile and mask the underlying issue.
Fixing only the affected code path — Would require identifying the exact line that assigns to file.name in the transform chain (possibly deep in React Native internals or a dependency affected by the module transform change). This is the right long-term approach but requires more investigation time than a deploy blocker allows.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Mar 11, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #83359
melvin-bot commentedon Mar 11, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 11, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Mar 11, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #83359 - "Enable platform tree shaking in hermes bundle" by @rinej (High confidence)
Related Issues: #80844 (previous identical issue)
Recommendation: REVERT
PR #83359 re-introduced the same babel/metro config changes that caused identical tag import failures in January 2026. The PR enabled
experimentalImportSupportanddisableImportExportTransformwhich breaks dynamic imports of thexlsxlibrary used for spreadsheet parsing in tag imports.This is a known regression - the exact same changes were previously merged in PR #80110, caused the same tag import failure (issue #80844), and were reverted in PR #80984. PR #83359 attempts to reintroduce these changes but has not resolved the underlying issue.
Labels: Keeping DeployBlockerCash (App deploy is blocked). This is a frontend bug requiring revert of App PR #83359.
Detailed Analysis
Evidence
Verification
/home/runner/_work/App/App/src/components/ImportSpreadsheet.tsximport('xlsx')- this is the import affected by babel/metro config changesmetro.config.jsline 38: AddedexperimentalImportSupport: truebabel.config.jsline 66: AddeddisableImportExportTransform: trueto React Native presetRoot Cause
The babel/metro configuration changes enable platform tree shaking but break dynamic imports on Android native builds. When
disableImportExportTransform: trueis set withexperimentalImportSupport: true, Metro handles ES6 imports differently, which causes the dynamicimport('xlsx')call to fail at runtime on Android.The xlsx library is dynamically imported to reduce initial bundle size. The tree shaking configuration changes how Metro processes this dynamic import, resulting in the import failing silently or the xlsx module being unavailable when the import resolves, causing the "import failed" error when users try to upload tag spreadsheets.
History
The PR description for #83359 states "What is NOT changed (vs reverted PR 80110)" but the core babel/metro changes that caused the original regression are still present.
MelvinBot commentedon Mar 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Multi-level tag import fails on native (Android/iOS) in staging after PR #83359 was merged. Users can pick and parse a CSV/TSV file, configure settings, and preview data, but tapping "Import" fails with
"Cannot assign to property 'name' which has only a getter".What is the root cause of that problem?
This is a known regression — the exact same failure previously occurred as issue #80844, caused by PR #80110, and was fixed by reverting those changes in PR #80984. PR #83359 re-introduced the identical
babel.config.jsandmetro.config.jschanges.The two config changes are:
experimentalImportSupport: trueinmetro.config.js— causes Metro'simport-export-pluginto handle import/export transforms and inject"use strict"into all ESM modulesdisableImportExportTransform: trueinbabel.config.js— disables Babel's@babel/plugin-transform-modules-commonjs, so ESM files keep theirimport/exportsyntax for Metro to processPreviously, Babel converted all ESM modules to CommonJS (sloppy mode). Now, Metro preserves ESM and injects strict mode. React Native's
Fileclass (node_modules/react-native/Libraries/Blob/File.js:43-46) definesnameas a getter-only property (no setter). Somewhere in the API call chain forImportMultiLevelTags, code assigns tofile.nameon a File instance. In sloppy mode this silently fails; in strict mode it throwsTypeError: Cannot assign to property 'name' which has only a getter, causing the import to fail.The error was confirmed in issue #80844 with this log:
What changes do you think we should make in order to solve the problem?
Immediate fix (deploy blocker): Revert PR #83359 — this is the same fix that resolved issue #80844 via PR #80984.
Permanent fix (for re-enabling platform tree shaking later): Before re-attempting these config changes, the underlying strict mode incompatibility must be fixed. The
Fileclass'snameproperty needs either:File.namein React Native (upstream fix), orfile.nameneeds to be identified and fixed to avoid the assignmentThe multi-level tag import flow is in
src/libs/actions/Policy/Tag.ts:891-907(importMultiLevelTags), which callsreadFileAsyncto create aFileobject and sends it viaAPI.write. TheFileobject passes throughsrc/libs/prepareRequestPayload/index.native.tsand React Native'sFormData.getParts()before being sent via XHR.What alternative solutions did you explore? (Optional)
sideEffects: trueoverride for xlsx — The xlsx package declares"sideEffects": falsein itspackage.json, but since Metro resolves to the CJS entry point (xlsx.js), not the ESM one (xlsx.mjs), this is not the direct cause.file.namein the transform chain (possibly deep in React Native internals or a dependency affected by the module transform change). This is the right long-term approach but requires more investigation time than a deploy blocker allows.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.IuliiaHerets commentedon Mar 12, 2026
Xiaomi Redmi Note 10 / Android 12
app 9.3.36-9
Passed
Screenrecorder-2026-03-12-21-19-26-501.mp4
luacmartins commentedon Mar 12, 2026
Fixed. Closing
melvin-bot commentedon Mar 18, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.