-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Android app crash when navigate back if i use FlashList: Unhandled SoftException com.facebook.react.bridge.AssertionException: Expected to run on UI thread! #2530
Comments
Is that a crash or only soft exception is logged? |
Facing same issue |
|
Okay, I've opened the fix in #2532 - if anyone would confirm that it fixes the issue I would be grateful |
Once I get confirmation I'll be able to release this |
Facing another issue |
@shankarRxo namely? :D |
Almost the same happens on iOS. It does not completely crash, but the FlashList screen is distorted and you cannot press anything anymore. See here: callstack/react-native-pager-view#917 Not sure if it comes from pager view, screens or both. |
@kkafar I also have similar issue, but I'm using FlatList.
|
The issue has been fixed but i got an other issue make my android app crash: FATAL EXCEPTION: main |
Update: I tried to using FlashList, and I don't have this issue with your fix |
@duongnguyen17 This might be still related to react-native-screens, namely it might be caused by the workaround. But I won't be able to fix this here, we need the changes to land in react-native core. The best thing I can suggest for you right now is to build react native from source and apply this patch: facebook/react-native#47634 react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt Lines 413 to 429 in 6aaf56b
|
@kkafar Could my problem with FlatList be related to react-native bug? |
@kkafar Thank you very much for your help 😁 |
@akylbek-hostaways I believe this is the same case. Your code crashes because of our workaround in The best way to go @akylbek-hostaways right now is with my suggestion above ([link])(#2530 (comment)) |
@duongnguyen17 glad to hear that. We'll try to sort these things up, so that patches are not required to make things work |
@kkafar but if i comment the code you mentioned, i can't fix the issue with the react-native-pager-view |
@kkafar you are my hope 😇 |
java.lang.IllegalStateException: CellRendererComponent outer view should always be CellContainer. Learn more here: https://shopify.github.io/flash-list/docs/usage#cellrenderercomponent. related to flashList |
Description
My Android app crash when i navigate back from a screen use flash list.
Android studio log error:
Unhandled SoftException
com.facebook.react.bridge.AssertionException: Expected to run on UI thread!
at com.facebook.react.bridge.SoftAssertions.assertCondition(SoftAssertions.kt:37)
at com.facebook.react.bridge.UiThreadUtil.assertOnUiThread(UiThreadUtil.java:46)
at com.facebook.react.views.view.ReactViewGroup.handleAddView(ReactViewGroup.java:570)
at com.facebook.react.views.view.ReactViewGroup.addView(ReactViewGroup.java:607)
at android.view.ViewGroup.addView(ViewGroup.java:5025)
at android.view.ViewGroup.addView(ViewGroup.java:4997)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:412)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startTransitionRecursive(Screen.kt:415)
at com.swmansion.rnscreens.Screen.startRemovalTransition(Screen.kt:380)
at com.swmansion.rnscreens.NativeProxy.notifyScreenRemoved(NativeProxy.kt:48)
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
at java.lang.Thread.run(Thread.java:1012)
flashlist.webm
Steps to reproduce
Snack or a link to a repository
https://github.com/duongnguyen17/pager-vew-demo
Screens version
4.2.0
React Native version
0.76.2
Platforms
Android
JavaScript runtime
Hermes
Workflow
None
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: