Skip to content
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

[v4] app crash in release mode ( IOS & ANDROID ) #1824

Open
alainib opened this issue May 3, 2024 · 21 comments
Open

[v4] app crash in release mode ( IOS & ANDROID ) #1824

alainib opened this issue May 3, 2024 · 21 comments
Assignees
Labels
bug Something isn't working

Comments

@alainib
Copy link

alainib commented May 3, 2024

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

@alainib alainib added the bug Something isn't working label May 3, 2024
@JDMathew
Copy link

JDMathew commented May 6, 2024

I'm not sure this library is compatible with reanimated version 3 according to the readme it only supports v1 & v2.

@alainib
Copy link
Author

alainib commented May 7, 2024

@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/

@MuhammadMuzammilQadri
Copy link

MuhammadMuzammilQadri commented May 16, 2024

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

@alainib
Copy link
Author

alainib commented Jun 2, 2024

did you found a way to fix it ? i switched to Modalize

@alainib
Copy link
Author

alainib commented Jun 13, 2024

@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

@m1daz
Copy link

m1daz commented Jul 5, 2024

Hello, in production this crashes my app on some specific devices as well. Please fix ASAP.

@alainib
Copy link
Author

alainib commented Jul 15, 2024

@m1daz do you find a fix ? i cannot use any package you use reanimated with react 0.74

@m1daz
Copy link

m1daz commented Jul 16, 2024

@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

@m1daz
Copy link

m1daz commented Jul 16, 2024

did you found a way to fix it ? i switched to Modalize

No crashes in production?

@alainib
Copy link
Author

alainib commented Jul 16, 2024

@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 ...

jeremybarbet/react-native-modalize#507

@EnzoVezzaro
Copy link

any update on this issue? I have this problem too.

@alainib
Copy link
Author

alainib commented Jul 22, 2024

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

@EduFrazao
Copy link

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)

@m1daz
Copy link

m1daz commented Jul 23, 2024

so for the moment, samsung devices are facing this issue?

@LouisMuriuki
Copy link

+1 on this issue

@gorhom gorhom self-assigned this Aug 19, 2024
@bestoferanda
Copy link

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

@ghnsharma
Copy link

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?

@bestoferanda
Copy link

bestoferanda commented Aug 28, 2024

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
software-mansion/react-native-reanimated#6415 (comment)

@JustJoostNL
Copy link

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?

@tanmaysm1711
Copy link

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!

@alainib
Copy link
Author

alainib commented Sep 25, 2024

he didn't responded since mai. i really doubt it will be fixed soon or even fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests