iOS debug mode crash almost on every refresh
See original GitHub issueDescription
Refreshing the RN app causes 'NSInternalInconsistencyException', reason: 'This method must not be called before the JS thread is created
.
I’ve been seeing ever since day 1 enabling screens, but it has started to become a pain in neck to debug native code with XCode thanks to this.
Screenshots
Steps To Reproduce
- Use screens
- Refresh the app (reload?)
- Repeat until a crash happens
The crash comes directly from RNScreens when trying to traverse scroll views. See stack trace below.
Expected behavior
No crash
Actual behavior
Crash
#3 0x000000010504d428 in -[RCTCxxBridge ensureOnJavaScriptThread:] at node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:367
#4 0x00000001050564b8 in -[RCTCxxBridge dispatchBlock:queue:] at node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:1209
#5 0x0000000105169ae8 in -[RCTEventDispatcher sendEvent:] at node_modules/react-native/React/CoreModules/RCTEventDispatcher.mm:170
#6 0x00000001050f194c in -[RCTScrollView sendScrollEventWithName:scrollView:userData:] at node_modules/react-native/React/Views/ScrollView/RCTScrollView.m:962
#7 0x00000001050ed948 in -[RCTScrollView scrollViewDidScroll:] at node_modules/react-native/React/Views/ScrollView/RCTScrollView.m:589
#8 0x00000001050ef068 in -[RCTScrollView scrollViewDidEndDecelerating:] at node_modules/react-native/React/Views/ScrollView/RCTScrollView.m:762
#9 0x0000000105008eb4 in -[RNSScreen traverseForScrollView:] at node_modules/react-native-screens/ios/RNSScreen.m:693
#10 0x0000000105008fd4 in __35-[RNSScreen traverseForScrollView:]_block_invoke at node_modules/react-native-screens/ios/RNSScreen.m:696
Reproduction
Platform
- iOS
- Android
- Web
- Windows
- tvOS
Workflow
- Managed workflow
- Bare workflow
Package versions
package | version |
---|---|
react-native | 0.65.1 |
@react-navigation/native | 5.9.4 |
@react-navigation/native-stack | 5.14.9 |
react-native-screens | 3.9.0 |
react-native-safe-area-context | 3.3.2 |
react-native-gesture-handler | 1.10.3 |
react-native-reanimated | 1.13.2 |
expo | - |
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
web inspector disconnecting | Apple Developer Forums
1/MacOS 10.13.1 is unable to maintain a web inspector connection with a web page on Safari iOS - iPhone 6, iOS 11.1.1. Almost...
Read more >iOS app crashing in debug mode, working in release mode
The method that crashes is recursive, and extremely!! substantial; as long as there aren't too many recursions it works fine in both debug...
Read more >iOS 16 Problems and Bugs with Fixes in 2022 - Tenorshare
Use low power mode or enable auto-brightness or adjust display brightness to slow down battery drain. Turn off Location Services. Turn off ...
Read more >How to Fix Crashing Apps on an iPhone or Android?
I am a developer of iPhone/Android and my app keeps crashing on users phones… ... Each brand, and model, has its own distinct...
Read more >1004038 - Refresh while on a breakpoint devtools will remain ...
What went wrong? Seems like refreshing while on a breakpoint failed to exit the debugger, hence causing the browser to hang. ... Flash...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like #1217 fixes it, awesome!
Can you check if https://github.com/software-mansion/react-native-screens/pull/1217 fixes the issue? And could you provide a quick repro of the problem?