Closed eliaslecomte closed 2 years ago
Could not reproduce it, Can you try to upgrade to the latest navigation version 7.24.1, and see if still occur? maybe try to reproduce it in a minimal project or our playground?
Hi π, we do keep our dependencies to date. So I do hope the error will eventually go away. I can't reproduce it myself, so I don't think that I can make a helpful reproduction.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
I'm seeing this issue as well, running react-native-navigation 7.25.1.
I kind of suspect it might be related to the use of gesture-handler or reanimated.
We also use those 2 dependencies.
I think if we cannot reproduce it in an exclusive project where it contains only RNN, it is really hard to know why this flow happens, it could be another library like reanimated that manipulates the view hierarchy, but first, let's try to reproduce it, since we need a starting point to start diagnosis and analysis of what is really happening, and that is missing right know which make things ambiguous.
So I encountered a somewhat similar crash when views were being popped on android, but instead of a cast error is manifested as a NullPointerException.
A pending fix fo react-native corrected the issue, but it seemed to only happen on my screens with top bar button components (vs button icons which work fine).
Itβs a shot in the dark, but Iβll see if a sample project can show it today.
So I'm not positive if this is the same crash or not, but I managed to make a minimal reproduction repo of a crash related to removing (popping) screens when BottomTabs + TopBarButtonComponents are being used: https://github.com/wix/react-native-navigation/issues/7435 Filed it as a separate issue since I am not positive it is the same root cause, despite being a similar symptom.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.
This is still an issue in 7.25.1... Please reopen
@swabbass please re-open this issue :)
This is still an issue on 7.28.0, could we please re-open it.
As a test, I tried removing the use of (right) TopBarButtonComponents on pushed components and my crashes on Android are gone. I still have a custom TopBarComponent in the left position, but it is on a root screen (not one that was pushed + merged in), and I suspect that is the difference.
Still have never been able to make this happen on a simulator, but what was crashing hundreds of times per day now is 'fixed' by not using the feature, so I'm fairly confident this is the source of the problem.
π Bug Report
We are seeing Sentry reports that our app crashes when closing a few screens. We are having a hard time reproducing it, but the stack trace is clear.
Stack trace
To Reproduce
Expected behavior
All the screens are closed and no cast exception happens.
Actual Behavior
A ClassCastException occurred causing the app to get terminated.
Your Environment
Are you willing to resolve this issue by submitting a Pull Request?