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
[$250] Android - Workspace - App crashes when tapping on workspace share link as other user #55195
Version Number: 9.0.84-5 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers): Samsung Galaxy Z Fold 4 / Android 14 Issue reported by: Applause Internal Team Device used:applausetester+100106kh@applause.expensifail.com App Component: Other
Action Performed:
Go to staging.new.expensify.com
Go to workspace settings > Workspace profile.
Tap Share.
Tap Copy URL.
Launch ND or hybrid app.
Open any chat.
Paste the link and remove staging from the link.
Send the message.
Tap on the link.
Expected Result:
App will not crash.
Actual Result:
App crashes.
When tapping on the link for the second time, it does not crash anymore.
The root cause that causing this issue is that we're trying to perform multiple navigations in almost at the same time that causing the app to crash/exits, and also this issue only occurring in Android native only, this issue is not reproducible in IOS native, mWeb, web and desktop
What changes do you think we should make in order to solve the problem?
We need to wait until the navigation transitions complete first, we can wrap the navigateAfterJoinRequest with runAfterInteractions to ensure the interaction queue is idle
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
⚠️@NJ-2020 Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).
@BartoszGrajdek Hi, I just do more investigation on this issue and seems this issue caused by this PR, here's demo when using version before this PR is merged
Screen.Recording.2025-01-19.at.12.54.37.mov
And seems the issue is coming from react-native-screens, here's the error log when the app is crash:
SurfaceMountingManager:UnhandledSoftExceptionSurfaceMountingManager: java.lang.IllegalStateException: addViewAt: cannot insert view [3620] into parent [3622]:View already has a parent: [3626] Parent:ScreenView:ReactViewGroupSurfaceMountingManager: at com.facebook.react.fabric.mounting.SurfaceMountingManager.addViewAt(SourceFile:139)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute(SourceFile:248)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(SourceFile:54)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(SourceFile:46)
SurfaceMountingManager: at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(SourceFile:35)
SurfaceMountingManager: at com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded(SourceFile:95)
SurfaceMountingManager: at com.facebook.react.fabric.GuardedFrameCallback.doFrame(SourceFile:1)
SurfaceMountingManager: at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(SourceFile:37)
SurfaceMountingManager: at com.facebook.react.modules.core.ReactChoreographer.a(SourceFile:1)
SurfaceMountingManager: at com.facebook.react.modules.core.a.doFrame(SourceFile:26)
SurfaceMountingManager: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229)
SurfaceMountingManager: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
SurfaceMountingManager: at android.view.Choreographer.doCallbacks(Choreographer.java:899)
SurfaceMountingManager: at android.view.Choreographer.doFrame(Choreographer.java:827)
SurfaceMountingManager: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
SurfaceMountingManager: at android.os.Handler.handleCallback(Handler.java:942)
SurfaceMountingManager: at android.os.Handler.dispatchMessage(Handler.java:99)
SurfaceMountingManager: at android.os.Looper.loopOnce(Looper.java:201)
SurfaceMountingManager: at android.os.Looper.loop(Looper.java:288)
SurfaceMountingManager: at android.app.ActivityThread.main(ActivityThread.java:7924)
SurfaceMountingManager: at java.lang.reflect.Method.invoke(NativeMethod)
SurfaceMountingManager: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
SurfaceMountingManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
I think the error is coming specifically from this file and this file
And also I've opened an issue in react-native-screens here
@laurenreidexpensify Actually this issue has been fixed by @tomekzaw just for suffice but we haven't find the right root cause yet for this issue, more details here, so it's not reproducible anymore
But this issue still reproducible on the latest main on dev, but you need to override some node_modules content, more info here
@tomekzaw Okay then if you want to create new issue so we can discuss more easier then it's ok, and also I'll post a proposal including all the required information i.e stacktraces, error logs, reproduction steps, before/after results, etc
Wdyt? If yes, then we can ask @laurenreidexpensify to close this and create new one
And also to reproduce this issue could you please check this
@laurenreidexpensify or @Ollyws maybe, could you please create new issue, since I do not have any access/permissions to #expensify-bugs slack channel or creating new issue on GH
Hi guys could you please create new issue for above ^^ please
I just want to clarify that I have put many time of efforts for this issue debugging the react-native-live-markdown (C++ & Java)
And actually we already fixed the issue but it's like a workaround solution as mentioned by @tomekzaw, we haven't found the root cause yet and good solution for it
And here's my new proposal, but I will update it later in the new issue
Activity
melvin-bot commentedon Jan 14, 2025
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.laurenreidexpensify commentedon Jan 16, 2025
@IuliiaHerets can you confirm that this issue is reproducible on prod? I see two steps in the link that are staging specific -
Go to staging.new.expensify.com
Paste the link and remove staging from the link.
If this is a staging specific issue and not relevant to prod we can close. Thanks
BartoszGrajdek commentedon Jan 17, 2025
I'll triage this issue today! 👀
NJ-2020 commentedon Jan 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android - Workspace - App crashes when tapping on workspace share link as other user
What is the root cause of that problem?
When we click the link inside the report action, the openLink function got invoked
App/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx
Lines 64 to 76 in 64ed6a5
and we navigate to that route if the it's internal new Expensify path and has the same origin
App/src/libs/actions/Link.ts
Lines 178 to 183 in 64ed6a5
And it will navigate to WorkspaceJoinUserPage.tsx page, and navigateAfterJoinRequest will got invoked after the user has been invited to the workspace
App/src/pages/workspace/WorkspaceJoinUserPage.tsx
Lines 53 to 59 in 64ed6a5
And inside navigateAfterJoinRequest function we navigate to settings > workspace_settings
App/src/libs/navigateAfterJoinRequest/index.ts
Lines 4 to 8 in 64ed6a5
The root cause that causing this issue is that we're trying to perform multiple navigations in almost at the same time that causing the app to crash/exits, and also this issue only occurring in Android native only, this issue is not reproducible in IOS native, mWeb, web and desktop
What changes do you think we should make in order to solve the problem?
We need to wait until the navigation transitions complete first, we can wrap the navigateAfterJoinRequest with runAfterInteractions to ensure the interaction queue is idle
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
github-actions commentedon Jan 18, 2025
melvin-bot commentedon Jan 20, 2025
@laurenreidexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
BartoszGrajdek commentedon Jan 20, 2025
I didn't manage to find the time for it in the end, but from the proposal above it seems like it's not a live markdown related issue, so it's fine 👍🏻
NJ-2020 commentedon Jan 20, 2025
@BartoszGrajdek Hi, I just do more investigation on this issue and seems this issue caused by this PR, here's demo when using version before this PR is merged
Screen.Recording.2025-01-19.at.12.54.37.mov
And seems the issue is coming from react-native-screens, here's the error log when the app is crash:
I think the error is coming specifically from this file and this file
And also I've opened an issue in react-native-screens here
BartoszGrajdek commentedon Jan 20, 2025
I'm
react-native-live-markdownmaintainer, not an internal/C+ so you don't need to worry about me 😄 @NJ-2020This issue was initially sent to us as a possible
react-native-live-markdownbug, but since that's not the case I'm no longer needed here 👍🏻94 remaining items
NJ-2020 commentedon Mar 10, 2025
@laurenreidexpensify Actually this issue has been fixed by @tomekzaw just for suffice but we haven't find the right root cause yet for this issue, more details here, so it's not reproducible anymore
But this issue still reproducible on the latest main on dev, but you need to override some node_modules content, more info here
Screen.Recording.2025-03-10.at.20.43.21.mov
Right now I am waiting an update from @tomekzaw
tomekzaw commentedon Mar 13, 2025
@NJ-2020 There's way too many comments with different repro cases in this discussion.
I have tested the app today and it doesn't crash for me, no matter if I leave the link untouched, remove
dev.or addstaging.in the URL.Can you please provide repro steps for current main as well as provide some stack traces so I can see the actual error?
Maybe we should close this issue now (since the original crash has already been fixed) and submit another issue where we can discuss more easily?
NJ-2020 commentedon Mar 13, 2025
@tomekzaw Okay then if you want to create new issue so we can discuss more easier then it's ok, and also I'll post a proposal including all the required information i.e stacktraces, error logs, reproduction steps, before/after results, etc
Wdyt? If yes, then we can ask @laurenreidexpensify to close this and create new one
And also to reproduce this issue could you please check this
NJ-2020 commentedon Mar 13, 2025
@laurenreidexpensify Could you please create new issue based on this and close this one? Thanks
laurenreidexpensify commentedon Mar 13, 2025
@NJ-2020 can you request a new bug write up in #expensify-bugs in slack thanks
NJ-2020 commentedon Mar 13, 2025
@laurenreidexpensify Sorry, I do not have permissions to #expensify-bugs slack channel
NJ-2020 commentedon Mar 13, 2025
@laurenreidexpensify Could you please create one if you don't mind?
NJ-2020 commentedon Mar 16, 2025
@laurenreidexpensify or @Ollyws maybe, could you please create new issue, since I do not have any access/permissions to #expensify-bugs slack channel or creating new issue on GH
Thanks
NJ-2020 commentedon Mar 21, 2025
@laurenreidexpensify Bump for above ^
NJ-2020 commentedon Mar 27, 2025
@Ollyws Can you create a new issue or request new bug inside #expensify-bugs slack channel
NJ-2020 commentedon Apr 10, 2025
Hi guys could you please create new issue for above ^^ please
I just want to clarify that I have put many time of efforts for this issue debugging the react-native-live-markdown (C++ & Java)
And actually we already fixed the issue but it's like a workaround solution as mentioned by @tomekzaw, we haven't found the root cause yet and good solution for it
And here's my new proposal, but I will update it later in the new issue
I'd like to hear your thoughts @Ollyws @laurenreidexpensify
Thank you