Repository navigation
[No QA] Improve FS.getSessionURL() error handling - #91430
Conversation
|
@mananjadhav 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] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
There was a problem hiding this comment.
Pull request overview
Improves resilience of FullStory session URL capture during app initialization by preventing unhandled promise rejections from crashing the app when FullStory is in a shutdown/disabled state.
Changes:
- Add
.catch()handling aroundFS.getSessionURL()inFullstoryInitHandlerand log a warning instead of allowing an unhandled rejection. - Standardize
FS.onReady()/ session helper method signatures asasyncacross web and native implementations. - Simplify support-token detection import in the web FullStory wrapper.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/libs/Fullstory/index.ts |
Refactors support-token check import and marks onReady as async (API consistency). |
src/libs/Fullstory/index.native.ts |
Marks onReady, getSessionId, and getSessionURL as async for signature consistency. |
src/FullstoryInitHandler.tsx |
Adds promise rejection handling for getSessionURL() to avoid unhandled rejections and log recoverable failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: mWeb Safari |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
|
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Not emergency the checks were passing |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.80-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. The changes are purely internal — they improve error handling for FullStory's |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.81-2 🚀
|




Explanation of Change
$ #91290 by improving
FS.getSessionURL()error handling insrc/FullstoryInitHandler.tsx.Fixed Issues
$ #91290
PROPOSAL:
Tests
throw new Error('something wrong')togetSessionURLfunction ofsrc/libs/Fullstory/index.ts/src/libs/Fullstory/index.native.ts.[warn] [FullstoryInitHandler] getSessionURL failed. - {"error":"something wrong"}.Offline tests
N/A
QA Steps
N/A as QA can't test this.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-05-22.at.14.11.28.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-05-22.at.14.13.05.mov