react-native-bottom-sheet
react-native-bottom-sheet copied to clipboard
[v4] app crash in release mode ( IOS & ANDROID )
Bug
since i added this package and reanimated my app crash on opening on both IOS & Android, i'm not able to fix this after lot's of test
Failed to deliver inset state change to w=Window{2f8b223 u0 com.cool.preprod/com.cool.MainActivity EXITING}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:584)
at android.view.IWindow$Stub$Proxy.insetsControlChanged(IWindow.java:473)
at com.android.server.wm.WindowState.notifyInsetsControlChanged(WindowState.java:3995)
at com.android.server.wm.InsetsStateController.lambda$notifyPendingInsetsControlChanged$4(InsetsStateController.java:351)
at com.android.server.wm.InsetsStateController.$r8$lambda$An2IoiA3BeA5IWc6QwBOjKArM80(Unknown Source:0)
at com.android.server.wm.InsetsStateController$$ExternalSyntheticLambda3.run(Unknown Source:2)
at com.android.server.wm.WindowAnimator.executeAfterPrepareSurfacesRunnables(WindowAnimator.java:345)
at com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace(RootWindowContainer.java:832)
at com.android.server.wm.RootWindowContainer.performSurfacePlacement(RootWindowContainer.java:777)
at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop(WindowSurfacePlacer.java:177)
at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:126)
at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:115)
at com.android.server.wm.WindowSurfacePlacer$Traverser.run(WindowSurfacePlacer.java:57)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:44)
2024-05-03 16:27:49.270 582-603 WindowManager system_server W Exception thrown during dispatchAppVisibility Window{2f8b223 u0 com.cool.preprod/com.cool.MainActivity EXITING}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:584)
at android.view.IWindow$Stub$Proxy.dispatchAppVisibility(IWindow.java:536)
at com.android.server.wm.WindowState.sendAppVisibilityToClients(WindowState.java:3469)
at com.android.server.wm.WindowContainer.sendAppVisibilityToClients(WindowContainer.java:1225)
at com.android.server.wm.WindowToken.setClientVisible(WindowToken.java:392)
at com.android.server.wm.ActivityRecord.setClientVisible(ActivityRecord.java:6714)
at com.android.server.wm.ActivityRecord.onAnimationFinished(ActivityRecord.java:7526)
at com.android.server.wm.ActivityRecord.postApplyAnimation(ActivityRecord.java:5405)
at com.android.server.wm.ActivityRecord.commitVisibility(ActivityRecord.java:5364)
at com.android.server.wm.ActivityRecord.commitVisibility(ActivityRecord.java:5368)
at com.android.server.wm.AppTransitionController.handleClosingApps(AppTransitionController.java:1144)
at com.android.server.wm.AppTransitionController.handleAppTransitionReady(AppTransitionController.java:292)
at com.android.server.wm.RootWindowContainer.checkAppTransitionReady(RootWindowContainer.java:970)
at com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace(RootWindowContainer.java:834)
at com.android.server.wm.RootWindowContainer.performSurfacePlacement(RootWindowContainer.java:777)
at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop(WindowSurfacePlacer.java:177)
at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:126)
at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:115)
at com.android.server.wm.WindowSurfacePlacer$Traverser.run(WindowSurfacePlacer.java:57)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:44)
2024-05-03 16:27:49.714 582-602 ActivityTaskManager system_server W Activity top resumed state loss timeout for ActivityRecord{5cd4719 u0 com.cool.preprod/com.cool.MainActivity} t-1 f}}
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.6.1 |
react-native | 0.73.5 |
react-native-reanimated | 3.10.0 |
react-native-gesture-handler | 2.16.1 |
Steps To Reproduce
app work on debug mode but crash on IOS & Android
i triple checked reanimated setup, i have done the step in babel.config.js
and pod install
Reproducible sample code
i have this error even with basic example from here
https://ui.gorhom.dev/components/bottom-sheet/usage
I'm not sure this library is compatible with reanimated version 3 according to the readme it only supports v1 & v2.
@JDMathew we also tested
@gorhom/bottom-sheet | 5.0.0-alpha.9 react-native | 0.73.5 react-native-reanimated | 3.10.0 react-native-gesture-handler | 2.16.1
reanimated V2 works only with reactnative 0.71 and lower https://docs.swmansion.com/react-native-reanimated/docs/guides/compatibility/
Our app is getting crashed too. We are getting the below error:
Error: [Reanimated] Native part of Reanimated doesn't seem to be initialized
When we remove the code for @gorhom/bottom-sheet, app starts running fine.
Environment Info: @gorhom/bottom-sheet | 5.0.0-alpha.9 and 4.6.1 react-native | 0.74.0 react-native-reanimated | 3.11.0 react-native-gesture-handler | 2.16.2
did you found a way to fix it ? i switched to Modalize
@MuhammadMuzammilQadri @gorhom do you have an idea how to fix this please ?
@gorhom/bottom-sheet 4.6.3 react-native | 0.74.2 react-native-reanimated | 3.12.0 react-native-gesture-handler | 2.16.2
CppException: Cannot read property '__workletHash' of undefined
TypeError: Cannot read property '__workletHash' of undefined
at isWorkletFunction (JavaScript:1:49)
at runOnJS (JavaScript:1:308)
at setupConsole (JavaScript:1:147)
at anonymous (JavaScript:1:163)
at apply (native)
at anonymous (JavaScript:1:65)
i already have import "react-native-gesture-handler";
in my entry point
Hello, in production this crashes my app on some specific devices as well. Please fix ASAP.
@m1daz do you find a fix ? i cannot use any package you use reanimated with react 0.74
@m1daz do you find a fix ? i cannot use any package you use reanimated with react 0.74
Is this only react native 0.74 problem? I am happy with downgrading to 0.73
did you found a way to fix it ? i switched to Modalize
No crashes in production?
@m1daz we had to upgrade to 0.74 because of sub package needing this ( mapbox)
react-native-modalize work good in production yes but it's look dead package too ...
https://github.com/jeremybarbet/react-native-modalize/issues/507
any update on this issue? I have this problem too.
any update on this issue? I have this problem too.
do you have it only by installing reanimated ? which version of reanimated+ react worked for you ?
thanks .
i just removed reanimated/bottom-sheet and switched to modalized who's not maintained since 2 years for the moment
Hi Folks. I'm getting this error too, specifically with Samsung Models. Tested on a S21, with Android 14.
07-22 19:23:08.826 13930 17368 W WindowManager: android.os.DeadObjectException
07-22 19:23:08.826 13930 17368 W WindowManager: at android.os.BinderProxy.transactNative(Native Method)
07-22 19:23:08.826 13930 17368 W WindowManager: at android.os.BinderProxy.transact(BinderProxy.java:662)
07-22 19:23:08.826 13930 17368 W WindowManager: at android.view.IWindow$Stub$Proxy.dispatchAppVisibility(IWindow.java:648)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.WindowState.sendAppVisibilityToClients(WindowState.java:4087)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.WindowContainer.sendAppVisibilityToClients(WindowContainer.java:1301)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.WindowToken.setClientVisible(WindowToken.java:446)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.ActivityRecord.setClientVisible(ActivityRecord.java:8121)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.ActivityRecord.postApplyAnimation(ActivityRecord.java:6685)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.ActivityRecord.commitVisibility(ActivityRecord.java:6628)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.Transition.finishTransition(Transition.java:1465)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.TransitionController.finishTransition(TransitionController.java:1113)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.WindowOrganizerController.finishTransition(WindowOrganizerController.java:454)
07-22 19:23:08.826 13930 17368 W WindowManager: at android.window.IWindowOrganizerController$Stub.onTransact(IWindowOrganizerController.java:286)
07-22 19:23:08.826 13930 17368 W WindowManager: at com.android.server.wm.WindowOrganizerController.onTransact(WindowOrganizerController.java:217)
07-22 19:23:08.826 13930 17368 W WindowManager: at android.os.Binder.execTransactInternal(Binder.java:1380)
07-22 19:23:08.826 13930 17368 W WindowManager: at android.os.Binder.execTransact(Binder.java:1311)
so for the moment, samsung devices are facing this issue?
+1 on this issue
any update on this ? i'm also getting same crash when using debug or prod build in android. not getting when we running directly on device debug mode
any update on this ? i'm also getting same crash when using debug or prod build in android. not getting when we running directly on device debug mode
Did you fix this?
any update on this ? i'm also getting same crash when using debug or prod build in android. not getting when we running directly on device debug mode
Did you fix this?
This issue is based on react native reanimated library. I have downgraded react native version and others to below versions. its working fine there. "react": "18.2.0", "react-native": "0.74.5", "@gorhom/bottom-sheet": "^4", "react-native-reanimated": "^3.11.0",
if you want to use newer versions please use the react-native-reanimated nightly build package. for more info please check below link https://github.com/software-mansion/react-native-reanimated/issues/6415#issuecomment-2307301163
I am also experiencing this issue with react-native 0.75.2 on iOS. It is probably because this library uses "react-native-reanimated": "^3.10.1",
, which is an old version?
Hi @gorhom ! Please solve this issue ASAP. Many of us are facing this issue for quite a few months now! We're eagerly waiting for a solution! Thanks and Regards!
he didn't responded since mai. i really doubt it will be fixed soon or even fixed