Skip to content

[Due for payment 2026-04-23] [$250] App crashes when importing CSV of employees #86704

Closed

Description

@francoisl

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.50-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from BrowserStack: N/A
Expensify/Expensify Issue URL:
Issue reported by: https://github.com/Expensify/Web-Expensify/pull/51648#issuecomment-4142828827

Action Performed:

  1. Download crash_example.csv, or create a simple CSV file for an bulk employee upload, with only 1 employee line, e.g.:
    email,role,submitsTo
    submitter+test@example.com,Member,manager+test@example.com
  2. Create a new workspace
  3. Go to Members > More > Import Spreadsheet
  4. Upload your CSV file from step 1

Expected Result:

Both employees (submitter and manager) are imported and the UI updates to show them

Actual Result:

The app crashes

JS console error

react-dom-client.development.js:4624 Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
    at getRootForUpdatedFiber (react-dom-client.development.js:4624:11)
    at enqueueConcurrentHookUpdate (react-dom-client.development.js:4584:14)
    at dispatchSetStateInternal (react-dom-client.development.js:9167:18)
    at dispatchSetState (react-dom-client.development.js:9127:7)
    at eval (index.tsx:106:1)
    at Object.react_stack_bottom_frame (react-dom-client.development.js:26001:13)
    at runWithFiberInDEV (react-dom-client.development.js:872:30)
    at commitHookEffectListUnmount (react-dom-client.development.js:13316:17)
    at commitHookPassiveUnmountEffects (react-dom-client.development.js:13347:11)
    at commitPassiveUnmountEffectsInsideOfDeletedTree_begin (react-dom-client.development.js:16264:13)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16085:13)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16117:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16117:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16117:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16117:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16117:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16117:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16117:11)
    at recursivelyTraversePassiveUnmountEffects (react-dom-client.development.js:16105:11)
    at commitPassiveUnmountOnFiber (react-dom-client.development.js:16159:11)
getRootForUpdatedFiber @ react-dom-client.development.js:4624
enqueueConcurrentHookUpdate @ react-dom-client.development.js:4584
dispatchSetStateInternal @ react-dom-client.development.js:9167
dispatchSetState @ react-dom-client.development.js:9127
eval @ index.tsx:106
react_stack_bottom_frame @ react-dom-client.development.js:26001
runWithFiberInDEV @ react-dom-client.development.js:872
commitHookEffectListUnmount @ react-dom-client.development.js:13316
commitHookPassiveUnmountEffects @ react-dom-client.development.js:13347
commitPassiveUnmountEffectsInsideOfDeletedTree_begin @ react-dom-client.development.js:16264
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16085
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16117
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16105
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16159
installHook.js:1 The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.
overrideMethod @ installHook.js:1
eval @ console.js:44
acc.<computed> @ createNavigationContainerRef.js:58
t7 @ RightModalNavigator.tsx:237
eval @ RightModalNavigator.tsx:256
eval @ useFocusEffect.js:74
react_stack_bottom_frame @ react-dom-client.development.js:26001
runWithFiberInDEV @ react-dom-client.development.js:872
commitHookEffectListUnmount @ react-dom-client.development.js:13316
commitHookPassiveUnmountEffects @ react-dom-client.development.js:13347
commitPassiveUnmountEffectsInsideOfDeletedTree_begin @ react-dom-client.development.js:16264
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16085
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16127
flushPassiveEffects @ react-dom-client.development.js:18428
flushPendingEffects @ react-dom-client.development.js:18358
flushSpawnedWork @ react-dom-client.development.js:18323
commitRoot @ react-dom-client.development.js:17955
commitRootWhenReady @ react-dom-client.development.js:16824
performWorkOnRoot @ react-dom-client.development.js:16722
performSyncWorkOnRoot @ react-dom-client.development.js:18972
flushSyncWorkAcrossRoots_impl @ react-dom-client.development.js:18814
processRootScheduleInMicrotask @ react-dom-client.development.js:18853
eval @ react-dom-client.development.js:18991
installHook.js:1 The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.
overrideMethod @ installHook.js:1
eval @ console.js:44
acc.<computed> @ createNavigationContainerRef.js:58
t7 @ RightModalNavigator.tsx:238
eval @ RightModalNavigator.tsx:256
eval @ useFocusEffect.js:74
react_stack_bottom_frame @ react-dom-client.development.js:26001
runWithFiberInDEV @ react-dom-client.development.js:872
commitHookEffectListUnmount @ react-dom-client.development.js:13316
commitHookPassiveUnmountEffects @ react-dom-client.development.js:13347
commitPassiveUnmountEffectsInsideOfDeletedTree_begin @ react-dom-client.development.js:16264
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16085
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16127
flushPassiveEffects @ react-dom-client.development.js:18428
flushPendingEffects @ react-dom-client.development.js:18358
flushSpawnedWork @ react-dom-client.development.js:18323
commitRoot @ react-dom-client.development.js:17955
commitRootWhenReady @ react-dom-client.development.js:16824
performWorkOnRoot @ react-dom-client.development.js:16722
performSyncWorkOnRoot @ react-dom-client.development.js:18972
flushSyncWorkAcrossRoots_impl @ react-dom-client.development.js:18814
processRootScheduleInMicrotask @ react-dom-client.development.js:18853
eval @ react-dom-client.development.js:18991
installHook.js:1 The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.
overrideMethod @ installHook.js:1
eval @ console.js:44
acc.<computed> @ createNavigationContainerRef.js:58
isTopmostRouteModalScreen @ Navigation.ts:773
eval @ BaseModal.tsx:120
eval @ BaseModal.tsx:162
react_stack_bottom_frame @ react-dom-client.development.js:26001
runWithFiberInDEV @ react-dom-client.development.js:872
commitHookEffectListUnmount @ react-dom-client.development.js:13316
commitHookPassiveUnmountEffects @ react-dom-client.development.js:13347
commitPassiveUnmountEffectsInsideOfDeletedTree_begin @ react-dom-client.development.js:16264
recursivelyTraversePassiveUnmountEffects @ react-dom-client.development.js:16085
commitPassiveUnmountOnFiber @ react-dom-client.development.js:16127
flushPassiveEffects @ react-dom-client.development.js:18428
flushPendingEffects @ react-dom-client.development.js:18358
flushSpawnedWork @ react-dom-client.development.js:18323
commitRoot @ react-dom-client.development.js:17955
commitRootWhenReady @ react-dom-client.development.js:16824
performWorkOnRoot @ react-dom-client.development.js:16722
performSyncWorkOnRoot @ react-dom-client.development.js:18972
flushSyncWorkAcrossRoots_impl @ react-dom-client.development.js:18814
processRootScheduleInMicrotask @ react-dom-client.development.js:18853
eval @ react-dom-client.development.js:18991

Workaround:

If you add a second line for the submitsTo, then the app doesn't crash, e.g. this CSV won't crash:
csv email,role,submitsTo submitter+test@example.com,Member,manager+test@example.com manager+test@example.com,Member,submitter+test@example.com

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

employee_csv_crash.mov
Issue OwnerCurrent Issue Owner: @Krishna2323
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022038806855990952402
  • Upwork Job ID: 2038806855990952402
  • Last Price Increase: 2026-03-31
  • Automatic offers:
    • FitseTLT | Contributor | 111029984

Activity

  1. self-assigned this
    on Mar 31, 2026
  2. added
    External
    Daily
    Bug
    on Mar 31, 2026
  3. added
    Help Wanted
    on Mar 31, 2026
  4. melvin-bot commented on Mar 31, 2026

    @melvin-bot

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

  5. changed the title [-]App crashes when importing CSV of employees[/-] [+][$250] App crashes when importing CSV of employees[/+] on Mar 31, 2026
  6. melvin-bot commented on Mar 31, 2026

    @melvin-bot
  7. Krishna2323 commented on Mar 31, 2026

    @Krishna2323
    Contributor

    @francoisl lets remove the external and help wanted label until @MelvinBot posts a proposal.

  8. trasnake87 commented on Mar 31, 2026

    @trasnake87
    Contributor

    Proposal

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

    The app crashes with "Maximum update depth exceeded" when importing a CSV of employees via Members > Import Spreadsheet, because React enters an infinite render loop.

    What is the root cause of that problem?

    The closeImportPageAndModal callback in both ImportedMembersPage.tsx and ImportedMembersConfirmationPage.tsx is defined as a plain inline function (not memoized), but it's passed to ImportSpreadsheetConfirmModal which includes it in a useEffect dependency array at https://github.com/Expensify/App/blob/main/src/components/ImportSpreadsheetConfirmModal.tsx#L46. When the API response sets shouldFinalModalBeOpened: true, the effect fires and calls showConfirmModal(), which updates ModalProvider state, triggering a parent re-render. Since closeImportPageAndModal is not wrapped in useCallback, it gets a new reference on every render, causing the effect to re-fire, calling showConfirmModal() again — creating an infinite loop.

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

    We should wrap closeImportPageAndModal in useCallback in both pages so the reference stays stable across re-renders.

    In src/pages/workspace/members/ImportedMembersPage.tsx (~line 220):

    const closeImportPageAndModal = useCallback(() => {
        setIsClosing(true);
        setIsImporting(false);
        setShouldShowConfirmModal(false);
    }, [setIsClosing]);

    In src/pages/workspace/members/ImportedMembersConfirmationPage.tsx (~line 103):

    const closeImportPageAndModal = useCallback(() => {
        setIsClosing(true);
        setIsImporting(false);
        setShouldShowConfirmModal(false);
        closeImportPage();
        Navigation.goBack(ROUTES.WORKSPACE_MEMBERS.getRoute(policyID));
    }, [setIsClosing, policyID]);

    This stabilizes the function reference, preventing the useEffect in ImportSpreadsheetConfirmModal from re-firing on every render and breaking the infinite loop.

  9. trasnake87 commented on Mar 31, 2026

    @trasnake87
    Contributor

    Contributor details
    Your Expensify account email: trasnake87@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~010f770315ab181656

  10. melvin-bot commented on Mar 31, 2026

    @melvin-bot

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

  11. MelvinBot commented on Mar 31, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The crash is caused by an infinite render loop in ImportSpreadsheetConfirmModal.tsx. The component's useEffect (line 32-46) lists closeImportPageAndModal and showConfirmModal as dependencies, but neither function is memoized:

    1. closeImportPageAndModal in ImportedMembersConfirmationPage.tsx (lines 103-109) is a plain arrow function — not wrapped in useCallback — so it gets a new reference on every render.

    2. showConfirmModal in useConfirmModal.ts (lines 10-18) is also a plain function, creating a new reference each render.

    When the import API responds and shouldFinalModalBeOpened becomes true, the useEffect fires and calls showConfirmModal(). Because no deduplication id is passed to showModal() in ModalContext.tsx, each call pushes a new modal onto the stack via setModalStack(), triggering a re-render. The re-render creates new closeImportPageAndModal and showConfirmModal references, which re-trigger the useEffect, which calls showConfirmModal() again — creating an infinite loop until React throws "Maximum update depth exceeded."

    Why the workaround works: When the CSV has a second row for the submitsTo email with a role, the submitsTo member is already present in the data, so isRoleMissing stays false (line 202). This bypasses ImportedMembersConfirmationPage entirely and calls importPolicyMembers() directly, avoiding the unstable function references that cause the loop.

    Why only single-row CSVs trigger this: When importing a single employee with a submitsTo email that isn't in the CSV, a synthesized member entry with role: '' is created (lines 154-166), which forces isRoleMissing = true and routes to the confirmation page where the bug lives.

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

    1. Wrap closeImportPageAndModal in useCallback in both ImportedMembersConfirmationPage.tsx (line 103) and ImportedMembersPage.tsx (line 220) to ensure stable function references.

    2. Wrap showConfirmModal in useCallback in useConfirmModal.ts (line 10) so it doesn't create a new reference each render.

    3. Add a ref guard in ImportSpreadsheetConfirmModal.tsx to prevent calling showConfirmModal() more than once per visibility change, as a defense-in-depth measure.

    What alternative solutions did you explore? (Optional)

    An alternative would be to pass a stable id to showModal() inside useConfirmModal so that ModalContext.tsx can deduplicate calls. However, this alone wouldn't fix the infinite effect re-execution — the unstable function references would still cause the useEffect to fire on every render, so memoizing the functions is the more correct fix.


    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.

  12. wildan-m commented on Mar 31, 2026

    @wildan-m
    Contributor

    Proposal

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

    The app crashes with "Maximum update depth exceeded" when importing a CSV of employees where a submitsTo email is not included as an explicit row in the CSV, because importing goes through the confirmation page flow which triggers an infinite re-render loop.

    What is the root cause of that problem?

    The useEffect in ImportSpreadsheetConfirmModal calls showConfirmModal() when isVisible becomes true, but showConfirmModal is an unstable dependency that creates a re-entry loop:

    useEffect(() => {
    if (!isVisible || !titleText || !promptText || !spreadsheet?.importFinalModal) {
    return;
    }
    showConfirmModal({
    title: titleText,
    prompt: promptText,
    confirmText: translate('common.buttonConfirm'),
    shouldShowCancelButton: false,
    shouldHandleNavigationBack,
    onModalHide,
    }).then(() => {
    closeImportPageAndModal();
    });
    }, [isVisible, titleText, promptText, closeImportPageAndModal, onModalHide, shouldHandleNavigationBack, showConfirmModal, translate, spreadsheet?.importFinalModal]);

    The cycle works as follows:

    1. API success sets shouldFinalModalBeOpened: true → isVisible becomes true → effect fires → calls showConfirmModal()
    2. showConfirmModal() calls showModal() which calls setModalStack() in ModalProvider → ModalProvider re-renders
    3. ModalProvider re-render creates new showModal/closeModal references (since useCallback was removed in commit 6f209469c71):

    const showModal: ModalContextType['showModal'] = ({component, props, id, isCloseable = true}) => {
    // This is a promise that will resolve when the modal is closed
    let closeModalPromise: CloseModalPromiseWithResolvers | null = id ? modalPromisesStack.current?.[id] : null;
    const newModalId = id ?? String(modalIDRef.current++);
    if (!closeModalPromise) {
    // Create a new promise with resolvers to be resolved when the modal is closed
    const promiseWithResolvers = Promise.withResolvers<ModalStateChangePayload>();
    closeModalPromise = promiseWithResolvers;
    // New modal => update modals stack
    setModalStack((prevState) => ({
    ...prevState,
    modals: [...prevState.modals, {component: component as React.FunctionComponent<ModalProps>, props, isCloseable, id: newModalId}],
    }));
    }
    modalPromisesStack.current[newModalId] = closeModalPromise;
    return closeModalPromise.promise;
    };
    const closeModal: ModalContextType['closeModal'] = (data = {action: 'CLOSE'}) => {
    setModalStack((prevState) => {
    const lastModalId = prevState.modals.at(-1)?.id;
    if (!lastModalId) {
    Log.alert(`${CONST.ERROR.ENSURE_BUG_BOT} Empty modals stack while attempting to close one. This should never happen.`);
    } else {
    const lastModalPromise = modalPromisesStack.current?.[lastModalId];
    if (!lastModalPromise) {
    Log.alert(`${CONST.ERROR.ENSURE_BUG_BOT} Missing modal promise while attempting to close modal with id ${lastModalId}. This should never happen.`);
    } else {
    lastModalPromise.resolve(data);
    delete modalPromisesStack.current[lastModalId];
    }
    }
    return {
    ...prevState,
    modals: prevState.modals.slice(0, -1),
    };
    });
    };

    1. New context value propagates to useConfirmModal hook, which creates a new showConfirmModal wrapper:

    const showConfirmModal = (options: ConfirmModalOptions) => {
    return context.showModal({
    component: ConfirmModalWrapper,
    props: {
    shouldHandleNavigationBack: true,
    ...options,
    },
    });

    1. showConfirmModal dependency in the useEffect has changed → effect re-fires
    2. isVisible is still true (the .then(() => closeImportPageAndModal()) microtask hasn't had a chance to run yet) → showConfirmModal() is called again → GOTO step 2

    Each iteration adds a new modal to the stack (since no id is passed for deduplication). React eventually hits the nested update limit and throws "Maximum update depth exceeded".

    The single-employee CSV triggers this because when submitsTo references a non-member, the manager is auto-added with an empty role (isRoleMissing = true), routing to ImportedMembersConfirmationPage where the crash occurs. The two-employee workaround CSV keeps isRoleMissing = false, bypassing the confirmation page entirely.

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

    Add a ref guard in ImportSpreadsheetConfirmModal to prevent showConfirmModal() from being called more than once per visibility cycle. When isVisible becomes true and the modal is shown, the ref blocks subsequent effect re-fires from calling showConfirmModal() again. When isVisible becomes false, the ref resets for the next cycle.

    This is a single-file fix in src/components/ImportSpreadsheetConfirmModal.tsx that protects all 8+ consumers of this component (members, tags, categories, per diem, transactions imports).

    Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/86704-fix-csv-import-crash?expand=1

    What alternative solutions did you explore? (Optional)

    Wrapping closeImportPageAndModal in useCallback in each consumer page stabilizes one dependency but does not break the loop — showConfirmModal is still unstable and is the primary trigger. Wrapping showConfirmModal in useCallback in useConfirmModal.ts is also ineffective because it closes over context.showModal from ModalProvider, which itself is unstable since commit 6f209469c71 removed useCallback from showModal/closeModal. The underlying instability is in the ModalProvider context — the ref guard approach avoids needing to fix the context layer and instead prevents the re-entry directly where it matters.

  13. 64 remaining items

  14. mallenexpensify commented on Apr 30, 2026

    @mallenexpensify
    Contributor

    @Krishna2323 plz complete the BZ checklist and tag me in a post once you have. Thx
    (I think we still need/want)

  15. melvin-bot commented on May 4, 2026

    @melvin-bot

    @Krishna2323 Huh... This is 4 days overdue. Who can take care of this?

  16. Krishna2323 commented on May 5, 2026

    @Krishna2323
    Contributor

    BugZero Checklist:

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

      Link to comment: Refactor ConfirmModal to useConfirmModal | Batch 1 #77646 (comment)

    • [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: N/A

    • [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.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/634042

    Regression Test Proposal

    Precondition:

    • Download crash_example.csv, or create a simple CSV file for a bulk employee upload, with only 1 employee line, e.g.:
    email, role, submitsTo
    submitter+test@example.com, Member,manager+test@example.com
    

    Test:

    1. Go to a workspace
    2. Go to Members > More > Import Spreadsheet
    3. Upload your CSV file from step 1
    4. Verify no crash occurs, and both employees (submitter and manager) are imported; the UI updates to show them.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-54df-a9d0-ec76-783e994dc744
  17. Krishna2323 commented on May 5, 2026

    @Krishna2323
    Contributor

    @mallenexpensify checklist completed ^

  18. marufsharifi commented on May 7, 2026

    @marufsharifi
    Contributor

    @mallenexpensify, I believe I may be due for payment for this issue.

    My initial approach was accepted here, and I was assigned to the issue here. I then implemented the solution and opened PR #87085.

    After further review and discussion, the team decided to go with another approach instead. Since I was officially assigned and completed the implementation work for the PR, I wanted to kindly check whether compensation would still apply in this case.

    Thank you for your time and consideration.

  19. mallenexpensify commented on May 9, 2026

    @mallenexpensify
    Contributor

    ooooh, edge case!
    @marufsharifi can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022052911316955730574

    Reason for compensation being due

    • @marufsharifi hired/assigned. At that point people didn't know the proposal wouldn't work cuz of other stuff going on
    • @marufsharifi raised PR, inc. tests and requested review of the PR
    • We found out we wanted to go a different way.
  20. marufsharifi commented on May 9, 2026

    @marufsharifi
    Contributor

    @mallenexpensify, I've accepted the offer. thanks.

  21. mallenexpensify commented on May 11, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @marufsharifi paid $250 via Upwork

  22. Krishna2323 commented on May 15, 2026

    @Krishna2323
    Contributor

    Requested in ND.

  23. laurenreidexpensify commented on May 19, 2026

    @laurenreidexpensify
    Contributor

    $250 approved for @Krishna2323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions