Repository navigation
Update react-native-permissions to 5.6.3 so iOS location checks stop freezing the app - #106934
Conversation
|
|
|
@sobitneupane Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Asked on slack https://expensify.slack.com/archives/C01GTK53T8Q/p1794798396494929?thread_ts=1794769002.994209&cid=C01GTK53T8Q |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
situchan
left a comment
There was a problem hiding this comment.
Remove the leftover type declaration for the old deep import
App/src/types/modules/react-native-permissions.d.ts
Lines 1 to 5 in a202ac9
This file declares react-native-permissions/dist/commonjs/permissions, which only existed for the jest mock's deep import.
After this PR nothing imports that path, and since 5.5.0 the package exports field blocks it.
A future import would typecheck but fail at runtime.
There's no in-app repro because this is type-only.
Delete src/types/modules/react-native-permissions.d.ts.
This comment has been minimized.
This comment has been minimized.
react-native-permissions 5.4.0 to 5.6.3
Worth testing: limited contact access on iOS 18+In the import contacts modal, Contacts likely still load, because this re-check runs when the app becomes active again and treats App/src/libs/ContactPermission/useContactPermissions.ts Lines 21 to 26 in a202ac9
Expected: the chosen contact appears in the participant list right away. |
|
Checking |
|
Please also add test case for import contacts The behavior should be same as production |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.mp4iOS: mWeb SafariMacOS: Chrome / Safari |
Done in b1dcf0e
Tested on iOS 18.6 with limited access, the picked contact shows up right away, same as prod. 6-iOS-Native-limited-contact-access.mp4
Added to the test steps for QA, and added a unit test for limited access in 74d06cf |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.40-0 🚀
|
|
No help site update needed — this dependency upgrade fixes iOS freezes during receipt scanning without introducing a new workflow or making existing article instructions incorrect. |
Explanation of Change
On iOS, react-native-permissions 5.4.0 runs
checkon the main thread, and the location check readsCLLocationManager authorizationStatus, which waits on iOS location services. When they're slow to answer, the app freezes while the scan screen opens or a scan is submitted. 5.6.3 runscheckon a background queue (release note). The jest mock now importsPERMISSIONSfromreact-native-permissions/mock, since 5.5.0 blocks deep imports.Fixed Issues
$ #106951
PROPOSAL: #106951
Tests
Offline tests
Same as tests, with the device offline.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
1-Android-Native.mp4
Android: mWeb Chrome
2-Android-mWeb-Chrome.mp4
iOS: Native
3-iOS-Native.mp4
iOS: mWeb Safari
4-iOS-mWeb-Safari.mp4
MacOS: Chrome / Safari
5-MacOS-Chrome.mp4