react-native-bootsplash
react-native-bootsplash copied to clipboard
Crash: Attempt to invoke direct method 'void android.view.SurfaceControl.checkNotReleased()'
Bug summary
This crash occurs when a Pixel user backgrounds the application before the splashscreen finishes & the hide
method can be invoked.
Initially I filed a crash report w/ Google but their response suggests this can be avoided on v12 by perhaps trying to unregister setOnExitAnimationListener
, as well as stop any other Splash screen animation/logic - possibly when the activity onPause
is invoked?
Crash report: https://issuetracker.google.com/issues/242118185?pli=1
This is likely occurring near this line https://github.com/zoontek/react-native-bootsplash/blob/master/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashModule.java#L124
Library version
4.3.1
Environment info
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 28, 29, 30, 31, 32
Build Tools: 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 33.0.0
System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
Steps to reproduce
- Open an app with react-native-bootscreen
- Before the bootscreen completes, background the app
- Open the app back up and notice a crash
Reproducible sample code
Should be reproducible in sample app on a Google Pixel device.
Also experiencing the same issue, we've had 31 crashes across 3 users
Hi. The same here. https://issuetracker.google.com/issues/242118185
![image](https://user-images.githubusercontent.com/23724142/194263545-4d5c55b1-b149-443c-950a-42382989c966.png)
Same
I just removed this
setOnExitAnimationListener
call entirely because I don't need fade out animation.
Then, it seems to be fixed now.
I've experienced same issue. Is there any update the issue?
Same issue. Android 12 on Samsung SM-X800 device.
Android 13 users facing this issue.
We're facing the same issue on Android 13.
![](https://user-images.githubusercontent.com/76057122/235928219-55e2b348-016d-4d7f-9b6c-4d2de2869930.png)
We started seeing this crash as well after migrating from react-native-splash-screen
to react-native-bootsplash
:
We are also seeing this crash. What is the fix for this?
+1, same issue, i think issue is caused by android splash screen api: crash
Same issue with 4.7.1
same +1
same +1
Same
Same
Could you please just upvote with emojis on the initial message instead of spamming?
No need to trigger notifications for everyone watching this thread just to say "Same".
I investigated a bit, and can reproduce it.
The issue is kinda hard to solve since even if I implement a LifecycleEventListener
, call activity.getSplashScreen().clearOnExitAnimationListener()
on activity pause, it's already too late:
https://github.com/zoontek/react-native-bootsplash/assets/1902323/ec827aa6-84de-4541-8251-d091bb5ed202
The effect is what appears to be a restart of the UI, but it has no impact on the app itself.
@zoontek since a complete fix might take you or the community longer to implement, can you recommend a workaround?
would you recommend this comment? even if it means that some feature will stop working, it might be better than an outright crash.
thanks!
@LonelyCpp I would not recommend it, for a pretty good reason. The fix is here: https://github.com/zoontek/react-native-bootsplash/pull/475 😄
https://github.com/zoontek/react-native-bootsplash/assets/1902323/83db745e-8e47-4295-822e-933f99a4855e
Version 5.0.0 is available: https://github.com/zoontek/react-native-bootsplash/releases/tag/5.0.0
Facing the same issue in the 5.0 version also
Fix is OK for us in after upgraded to 5.4.0
from 4.X.X
Thanks @zoontek