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
[Due for payment 2026-03-25] Investigate workflow job failing on main: test / test (job 7) #85243
🐛 Error Message:
warning: Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@8ade135, SimenB/github-actions-cpu-cores@31e91de. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
failure: Process completed with exit code 1.
⚠️Action Required⚠️:
🛠️ A recent merge appears to have caused a failure in the job named test / test (job 7).
🔍 This issue has been automatically created and labeled with Workflow Failure for investigation.
The fix from PR #85147is included in this re-run (the workflow commit c5fca4f is 48 commits ahead of PR #85147's merge), but the test is still failing because this is a different bug than what #85147 fixed.
PR #85147 fixed: The react-native-permissions mock (RESULTS.GRANTED was undefined due to a bad import path).
This failure is:expo-location's requestForegroundPermissionsAsync() returning undefined, causing TypeError: Cannot read properties of undefined (reading 'status') at src/libs/getCurrentPosition/index.ts:10.
Root Cause
The jest-expo preset mocks all native module methods with jest.fn(async () => {}) (in jest-expo/src/preset/setup.js:234-238), which resolves to undefined instead of a proper PermissionResponse object with a status field. There is no project-level mock for expo-location — no __mocks__/expo-location.ts, no jest.mock('expo-location') in jest/setup.ts, and no moduleNameMapper entry in jest.config.js.
The data flow:
Test triggers getCurrentPosition() → calls await requestForegroundPermissionsAsync() from expo-location
expo-location delegates to native module ExpoLocation.requestForegroundPermissionsAsync()
In tests, jest-expo replaces this with jest.fn(async () => {}) → resolves to undefined
getCurrentPosition/index.ts:10 reads .status on undefined → TypeError
Recommended Fix
The most targeted fix would be one of:
Add a project-level mock for expo-location in jest/setup.ts that returns a proper PermissionResponse:
changed the title [-]Investigate workflow job failing on main: test / test (job 7)[/-][+][Due for payment 2026-03-25] Investigate workflow job failing on main: test / test (job 7)[/+]on Mar 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.39-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
tgolen commentedon Mar 13, 2026
Should be fixed with #85147. Re-running the tests now.
tgolen commentedon Mar 13, 2026
@MelvinBot Re-running the test, it still fails. Isn't this fixed on
main?MelvinBot commentedon Mar 13, 2026
The fix from PR #85147 is included in this re-run (the workflow commit
c5fca4fis 48 commits ahead of PR #85147's merge), but the test is still failing because this is a different bug than what #85147 fixed.PR #85147 fixed: The
react-native-permissionsmock (RESULTS.GRANTEDwasundefineddue to a bad import path).This failure is:
expo-location'srequestForegroundPermissionsAsync()returningundefined, causingTypeError: Cannot read properties of undefined (reading 'status')atsrc/libs/getCurrentPosition/index.ts:10.Root Cause
The
jest-expopreset mocks all native module methods withjest.fn(async () => {})(injest-expo/src/preset/setup.js:234-238), which resolves toundefinedinstead of a properPermissionResponseobject with astatusfield. There is no project-level mock forexpo-location— no__mocks__/expo-location.ts, nojest.mock('expo-location')injest/setup.ts, and nomoduleNameMapperentry injest.config.js.The data flow:
getCurrentPosition()→ callsawait requestForegroundPermissionsAsync()fromexpo-locationexpo-locationdelegates to native moduleExpoLocation.requestForegroundPermissionsAsync()jest-exporeplaces this withjest.fn(async () => {})→ resolves toundefinedgetCurrentPosition/index.ts:10reads.statusonundefined→ TypeErrorRecommended Fix
The most targeted fix would be one of:
Add a project-level mock for
expo-locationinjest/setup.tsthat returns a properPermissionResponse:Add a defensive null check in
getCurrentPosition/index.ts:10:Mock
getCurrentPositiondirectly in the test file if only that specific test needs it.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.tgolen commentedon Mar 13, 2026
@MelvinBot implement suggestion 1
MelvinBot commentedon Mar 13, 2026
🤖 Draft PR created: #85257
Please mark it as "Ready for review" when it is ready for review.
melvin-bot commentedon Mar 13, 2026
Triggered auto assignment to @rlinoz, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
ShridharGoel commentedon Mar 13, 2026
@tgolen Can you assign me here as the reviewer? Thanks
2 remaining items
[-]Investigate workflow job failing on main: test / test (job 7)[/-][+][Due for payment 2026-03-25] Investigate workflow job failing on main: test / test (job 7)[/+]melvin-bot commentedon Mar 18, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.39-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-25. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 18, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mallenexpensify commentedon Mar 24, 2026
@tgolen should this be $125 for the PR review, without any tests? Guessing so
tgolen commentedon Mar 25, 2026
Yes, I think that makes sense.
mallenexpensify commentedon Mar 25, 2026
Payment Summary
Contributor+: @ShridharGoel due $125 via NewDot
JmillsExpensify commentedon Apr 6, 2026
$125 approved for @ShridharGoel