-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crashing in production in some devices when hardware back button is pressed in android #11606
Comments
Hey @androidappteam! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro. The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue. You can provide a repro using any of the following:
A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected. Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information. You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro. |
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
I also saw this issue on Crashlytics at work, but was not able to reproduce it on our phones. And sometimes we saw crash logs from our own phones but didnt recall the app crashing visibly. For reference, our |
Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it. |
@androidappteam Not sure if it's the same case, but we found out that our problem was due to calling BackHandler.exitApp() and then returning true inside the BackHandler's event listener. We did that to make the user exit the app only when pressing the back button twice (to prevent exiting unwillingly) We changed the event listener to return false and only depend on BackHandler.exitApp() do its job. |
Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro. |
This issue still exists in
In This is triggered from |
Current behavior
App crashing in production in some devices when hardware back button is pressed in android
Crash Log from crashlytics
Fatal Exception: t4.c: TypeError: Cannot read property 'key' of undefined, js engine: hermes, stack:
getStateForAction@1:2324604
canGoBack@1:2384972
canGoBack@1:2385008
anonymous@1:2316781
anonymous@1:2382577
anonymous@1:2382518
anonymous@1:2382518
anonymous@1:2316742
anonymous@1:2400742
anonymous@1:328049
emit@1:128838
__callFunction@1:134928
anonymous@1:133434
__guard@1:134374
callFunctionReturnFlushedQueue@1:133392
react-native info
System:
OS: macOS 12.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 121.75 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - /var/folders/c_/kxvkl4wd69z1xdflf_ncr0hjj_bqf_/T/yarn--1695121660525-0.2994264769809307/node
Yarn: 1.22.19 - /var/folders/c_/kxvkl4wd69z1xdflf_ncr0hjj_bqf_/T/yarn--1695121660525-0.2994264769809307/yarn
npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Stack trace points to TabRouter.tsx Line 378
react-navigation/packages/routers/src/TabRouter.tsx
Line 378 in c6fa588
Expected behaviour
App should not crash
Reproduction
We are not able to reproduce this issue in emulator or real device.
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: