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

RN 0.76+ Android + old-arch only - opening notification when the app is killed crashes on start #8131

Open
nes123 opened this issue Nov 14, 2024 · 7 comments
Labels
blocked: react-native Issue or PR blocked by a React Native issue or change. impact: crash Behaviour causing app to crash. Needs Attention platform: android type: bug New bug report

Comments

@nes123
Copy link

nes123 commented Nov 14, 2024

[Edit - maintainer update: upstream issue - facebook/react-native/issues/47592 - workaround - use new architecture 0.76.1+ for background FCM to work]

Crashes with EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary.

Only checked with new architecture disabled.

@mikehardy
Copy link
Collaborator

Huh - I've only checked 0.76.n with turbomodules working
Need to look at this more closely

@mikehardy
Copy link
Collaborator

mikehardy commented Nov 16, 2024

Not easy to test this stuff! Luckily I have a big stack of issues related to FCM so I went ahead and set up some scaffolding in #8143 and on https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh (on a branch unpushed so not visible yet), so I can now test this stuff.

This is largely repetitive but here is what I see when I follow these steps:

  • build rn 0.76.2 with rnfb 21.5.0
  • build with new arch on at first (the default), but then switch it off in gradle.properties and yarn react-native run-android again
  • register an onMessage in the app and an onBackgroundMessageHandler in index.js that just logs whatever message they see in console.log
  • use a button in-app on emulator to call function to get token and then use the sendFCM test cloud function to send a visible notification with priority high to the test device with a delay of 10 seconds
    • note that a notification FCM or a data-only FCM both caused the error seen below following these steps
  • quickly use android task switcher to swipe the app away then wait
  • watch adb logcat and see below
  • note this was visible on message receipt! Opening that app was not required, in fact tapping the notification was successful, the app opened fine and nothing seemed off in the logcat

So I did not see exactly what you saw, but I saw something...

No investigation yet but reproduction is frequently 90% of the problem with things like this

crash trace logcat output
11-16 18:08:53.800 15423 15423 W unknown:BridgelessReact: ReactHost{0}.getOrCreateReactInstanceTask(): Executing ReactInstanceEventListeners
11-16 18:08:53.901 15423 15520 E ReactNativeJS: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary.
11-16 18:08:53.901 15423 15520 I ReactNativeJS: 'Failed to print error: ', 'TurboModuleRegistry.getEnforcing(...): \'PlatformConstants\' could not be found. Verify that a module by this name is registered in the native binary.'
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: ReactHost{0}.handleHostException(message = "EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary., stack:
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: invariant@2043:26
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: getEnforcing@2737:28
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: anonymous@2705:68
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: anonymous@2681:76
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: anonymous@2640:75
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: anonymous@22964:53
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: anonymous@25958:51
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: anonymous@25944:200
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: anonymous@21224:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: guardedLoadModule@168:47
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: global@121835:4
11-16 18:08:54.007 15423 15520 W unknown:BridgelessReact: ")
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: Exception in native call from JS
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: com.facebook.react.common.JavascriptException: EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary., stack:
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: invariant@2043:26
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: getEnforcing@2737:28
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: anonymous@2705:68
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: anonymous@2681:76
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: anonymous@2640:75
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: anonymous@22964:53
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: anonymous@25958:51
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: anonymous@25944:200
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: anonymous@21224:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: guardedLoadModule@168:47
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: global@121835:4
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.kt:52)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at com.facebook.react.runtime.ReactInstance$ReactJsExceptionHandlerImpl.reportJsException(ReactInstance.java:336)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at com.facebook.jni.NativeRunnable.run(Native Method)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at android.os.Handler.handleCallback(Handler.java:958)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at android.os.Looper.loopOnce(Looper.java:205)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at android.os.Looper.loop(Looper.java:294)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
11-16 18:08:54.009 15423 15520 E unknown:ReactNative: 	at java.lang.Thread.run(Thread.java:1012)
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: Unable to launch redbox because react activity is not available, here is the error that redbox would've displayed: EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary., stack:
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: invariant@2043:26
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: getEnforcing@2737:28
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@2705:68
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@2681:76
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@2640:75
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@22964:53
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@25958:51
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@25944:200
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@21224:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@168:47
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: global@121835:4
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: Unable to launch redbox because react activity is not available, here is the error that redbox would've displayed: EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary., stack:
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: invariant@2043:26
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: getEnforcing@2737:28
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@2705:68
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@2681:76
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@2640:75
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@22964:53
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@25958:51
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@25944:200
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@175:38
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: anonymous@21224:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: loadModuleImplementation@267:14
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: guardedLoadModule@168:47
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: metroRequire@89:92
11-16 18:08:54.010 15423 15423 E unknown:ReactNative: global@121835:4
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask()
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: ReactHost{0}.raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary., stack:
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: invariant@2043:26
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: getEnforcing@2737:28
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: anonymous@2705:68
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: anonymous@2681:76
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: anonymous@2640:75
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: anonymous@22964:53
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: anonymous@25958:51
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: anonymous@25944:200
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: guardedLoadModule@175:38
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: anonymous@21224:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: loadModuleImplementation@267:14
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: guardedLoadModule@168:47
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: metroRequire@89:92
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: global@121835:4
11-16 18:08:54.012 15423 15493 W unknown:BridgelessReact: ")
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: Unhandled SoftException
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary., stack:
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: invariant@2043:26
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: getEnforcing@2737:28
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@2705:68
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@2681:76
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@2640:75
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@22964:53
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@25958:51
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@25944:200
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@21224:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@168:47
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: global@121835:4
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: ")
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:942)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.runtime.ReactHostImpl.getOrCreateDestroyTask(ReactHostImpl.java:1575)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.runtime.ReactHostImpl.lambda$destroy$7(ReactHostImpl.java:541)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$uso21_D6dCZdcf-JomVD56kdG4c(Unknown Source:0)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda37.call(D8$$SyntheticClass:0)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.runtime.internal.bolts.Task$2.run(Task.java:240)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at java.lang.Thread.run(Thread.java:1012)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: Caused by: com.facebook.react.common.JavascriptException: EarlyJsError: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary., stack:
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: invariant@2043:26
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: getEnforcing@2737:28
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@2705:68
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@2681:76
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@2640:75
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@22964:53
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@25958:51
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@25944:200
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@175:38
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: anonymous@21224:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: loadModuleImplementation@267:14
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: guardedLoadModule@168:47
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: metroRequire@89:92
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: global@121835:4
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.kt:52)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.runtime.ReactInstance$ReactJsExceptionHandlerImpl.reportJsException(ReactInstance.java:336)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.jni.NativeRunnable.run(Native Method)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at android.os.Handler.handleCallback(Handler.java:958)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at android.os.Looper.loopOnce(Looper.java:205)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at android.os.Looper.loop(Looper.java:294)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
11-16 18:08:54.013 15423 15493 E unknown:ReactHost: 	... 1 more
11-16 18:08:54.013 15423 15423 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Starting React Native destruction
11-16 18:08:54.013 15423 15423 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): DevSupportManager cleanup
11-16 18:08:54.013 15423 15423 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Move ReactHost to onHostDestroy()
11-16 18:08:54.014 15423 15493 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Stopping all React Native surfaces
11-16 18:08:54.015 15423 15423 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Destroying MemoryPressureRouter
11-16 18:08:54.015 15423 15423 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Resetting ReactContext ref
11-16 18:08:54.015 15423 15423 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Destroying ReactContext
11-16 18:08:54.016 15423 15493 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Resetting ReactInstance ptr
11-16 18:08:54.016 15423 15493 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Destroying ReactInstance
11-16 18:08:54.019 15423 15493 E unknown:ReactNative: Tried to remove non-existent frame callback
11-16 18:08:54.019 15423 15493 W ReactNativeJNI: Scheduler::~Scheduler() was called (address: 0xb4000076b0978770).
11-16 18:08:54.021 15423 15493 W ReactNativeJNI: UIManagerBinding::~UIManagerBinding() was called (address: 0xb4000076b0975ee8).
11-16 18:08:54.021 15423 15493 W ReactNativeJNI: UIManager::~UIManager() was called (address: 0xb40000767097b4b0).
11-16 18:08:54.022 15423 15493 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Resetting createReactInstance task ref
11-16 18:08:54.022 15423 15493 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Resetting start task ref
11-16 18:08:54.022 15423 15493 W unknown:BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): Resetting destroy task ref

@mikehardy
Copy link
Collaborator

Some more subtleties while testing:

  • visible notification FCM - the crash trace is there but the notification does show up, and clicking on it does work to open the app
  • data-only FCM - the crash trace is there and the onBackgroundMessageHandler is not called, so that's a miss

Recompiling with newArchEnabled=true works to bring the functionality back, but this may understandably be a problem for some

@mikehardy
Copy link
Collaborator

Upstream: facebook/react-native#47592

@oraylan
Copy link

oraylan commented Nov 16, 2024

It seems a bit strange but... if you leave the notification in the notification center, without clearing it, and try to open the app, the crash occurs. At least here it is happening like that.

@nes123
Copy link
Author

nes123 commented Nov 17, 2024

There are many crashes in production for us, all the reports from the users are aligned with what i reported above. App is not in the background. The user tap on the notification from the tray and the app crashes on start. Downgrading to RN 0.75.n solves the problem.

@mikehardy mikehardy changed the title RN 0.76.1 Android only - opening notification when the app is killed crashes on start RN 0.76+ Android + old-arch only - opening notification when the app is killed crashes on start Nov 17, 2024
@mikehardy
Copy link
Collaborator

mikehardy commented Nov 17, 2024

@oraylan that's bizarre - tougher to reproduce as well, I was able to see it the first time I tried, then it failed the next 3 times. So your report is inconsistent but I did see it. Here's the trace I got when that crash happened, repro was:

  • build react-native 0.76.2 android and run it with new arch disabled in gradle.properties
  • send FCM with notification block on 10 second delay
  • immediately use task switcher to swipe app away (so it is activity is gone, but not force-killed)
  • notification lands and I see the trace I posted above about PlatformConstants not found but the notification posts in the notification center
  • do not interact with the notification, instead open the app
crash trace logcat output
11-17 08:27:24.166  2565  2565 F libc    : /__w/react-native/react-native/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.cpp:184: InstanceTarget &facebook::react::jsinspector_modern::HostTarget::registerInstance(InstanceTargetDelegate &): assertion "!currentInstance_ && "Only one instance allowed"" failed
11-17 08:27:24.193  3082  3082 W linker64: type=1400 audit(0.0:949): avc:  denied  { search } for  name="tests" dev="dm-39" ino=65540 scontext=u:r:untrusted_app:s0:c12,c257,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.invertase.testing
11-17 08:27:24.193  3082  3082 W linker64: type=1400 audit(0.0:950): avc:  denied  { search } for  name="tests" dev="dm-39" ino=65540 scontext=u:r:untrusted_app:s0:c12,c257,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.invertase.testing
11-17 08:27:24.193  3082  3082 W linker64: type=1400 audit(0.0:951): avc:  denied  { search } for  name="tests" dev="dm-39" ino=65540 scontext=u:r:untrusted_app:s0:c12,c257,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.invertase.testing
11-17 08:27:24.193  3082  3082 W linker64: type=1400 audit(0.0:952): avc:  denied  { search } for  name="tests" dev="dm-39" ino=65540 scontext=u:r:untrusted_app:s0:c12,c257,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=com.invertase.testing
11-17 08:27:24.389  3082  3082 W linker64: type=1400 audit(0.0:953): avc:  denied  { read } for  name="capacity" dev="sysfs" ino=23882 scontext=u:r:untrusted_app:s0:c12,c257,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 app=com.invertase.testing
11-17 08:27:24.396  2565  2565 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2565 (vertase.testing), pid 2565 (vertase.testing)
11-17 08:27:24.436  3085  3085 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
11-17 08:27:24.439   201   201 I tombstoned: received crash request for pid 2565
11-17 08:27:24.440  3085  3085 I crash_dump64: performing dump of process 2565 (target tid = 2565)
11-17 08:27:24.926   159   159 I logd    : logdr: UID=10268 GID=10268 PID=3085 n tail=500 logMask=8 pid=2565 start=0ns deadline=0ns
11-17 08:27:24.945   159   159 I logd    : logdr: UID=10268 GID=10268 PID=3085 n tail=500 logMask=1 pid=2565 start=0ns deadline=0ns
11-17 08:27:24.957  3085  3085 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-17 08:27:24.957  3085  3085 F DEBUG   : Build fingerprint: 'google/sdk_gphone64_arm64/emu64a:14/UE1A.230829.050/12077443:userdebug/dev-keys'
11-17 08:27:24.957  3085  3085 F DEBUG   : Revision: '0'
11-17 08:27:24.957  3085  3085 F DEBUG   : ABI: 'arm64'
11-17 08:27:24.957  3085  3085 F DEBUG   : Timestamp: 2024-11-17 08:27:24.443100280-0500
11-17 08:27:24.957  3085  3085 F DEBUG   : Process uptime: 162s
11-17 08:27:24.957  3085  3085 F DEBUG   : Cmdline: com.invertase.testing
11-17 08:27:24.957  3085  3085 F DEBUG   : pid: 2565, tid: 2565, name: vertase.testing  >>> com.invertase.testing <<<
11-17 08:27:24.957  3085  3085 F DEBUG   : uid: 10268
11-17 08:27:24.957  3085  3085 F DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
11-17 08:27:24.957  3085  3085 F DEBUG   : pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
11-17 08:27:24.957  3085  3085 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-17 08:27:24.957  3085  3085 F DEBUG   : Abort message: '/__w/react-native/react-native/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.cpp:184: InstanceTarget &facebook::react::jsinspector_modern::HostTarget::registerInstance(InstanceTargetDelegate &): assertion "!currentInstance_ && "Only one instance allowed"" failed'
11-17 08:27:24.957  3085  3085 F DEBUG   :     x0  0000000000000000  x1  0000000000000a05  x2  0000000000000006  x3  0000007fc326b3f0
11-17 08:27:24.957  3085  3085 F DEBUG   :     x4  6f2e64756873606d  x5  6f2e64756873606d  x6  6f2e64756873606d  x7  7f7f7f7f7f7f7f7f
11-17 08:27:24.957  3085  3085 F DEBUG   :     x8  00000000000000f0  x9  0000007790e5b090  x10 0000000000000001  x11 0000007790eae058
11-17 08:27:24.957  3085  3085 F DEBUG   :     x12 000000006739ef3c  x13 000000007fffffff  x14 00000000039f4fc8  x15 00000a711e3c6b3a
11-17 08:27:24.957  3085  3085 F DEBUG   :     x16 0000007790f1bd08  x17 0000007790eefe90  x18 00000077b65a2000  x19 0000000000000a05
11-17 08:27:24.957  3085  3085 F DEBUG   :     x20 0000000000000a05  x21 00000000ffffffff  x22 0000000000000001  x23 0000000000000001
11-17 08:27:24.957  3085  3085 F DEBUG   :     x24 0000007fc326ba40  x25 00000077975345d8  x26 0000007fc326ba90  x27 0000000070912f98
11-17 08:27:24.957  3085  3085 F DEBUG   :     x28 0000007fc326b910  x29 0000007fc326b470
11-17 08:27:24.957  3085  3085 F DEBUG   :     lr  0000007790e9f9b8  sp  0000007fc326b3d0  pc  0000007790e9f9e4  pst 0000000000001000
11-17 08:27:24.957  3085  3085 F DEBUG   : 66 total frames
11-17 08:27:24.957  3085  3085 F DEBUG   : backtrace:
11-17 08:27:24.957  3085  3085 F DEBUG   :       #00 pc 00000000000669e4  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: a87908b48b368e6282bcc9f34bcfc28c)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #01 pc 0000000000066db4  /apex/com.android.runtime/lib64/bionic/libc.so (__assert2+36) (BuildId: a87908b48b368e6282bcc9f34bcfc28c)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #02 pc 0000000000c6fe6c  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (facebook::react::jsinspector_modern::HostTarget::registerInstance(facebook::react::jsinspector_modern::InstanceTargetDelegate&)+116) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #03 pc 0000000000de9f68  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #04 pc 0000000000de9f18  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #05 pc 0000000000de9ec8  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #06 pc 0000000000de9e9c  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #07 pc 0000000000de908c  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #08 pc 0000000000afb6c4  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #09 pc 0000000000afb620  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)>::operator()(facebook::react::jsinspector_modern::HostTarget&) const+28) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #10 pc 0000000000afb46c  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (auto std::__ndk1::function<void (std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)>&&)> facebook::react::jsinspector_modern::makeScopedExecutor<facebook::react::jsinspector_modern::HostTarget>(std::__ndk1::shared_ptr<facebook::react::jsinspector_modern::HostTarget>, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>)::'lambda'(facebook::react::jsinspector_modern::HostTarget&&)::operator()<std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)> >(facebook::react::jsinspector_modern::HostTarget&&) const::'lambda'()::operator()() const+108) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #11 pc 0000000000afb3f0  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #12 pc 0000000000afb3a8  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (void std::__ndk1::__invoke_void_return_wrapper<void, true>::__call<auto std::__ndk1::function<void (std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)>&&)> facebook::react::jsinspector_modern::makeScopedExecutor<facebook::react::jsinspector_modern::HostTarget>(std::__ndk1::shared_ptr<facebook::react::jsinspector_modern::HostTarget>, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>)::'lambda'(facebook::react::jsinspector_modern::HostTarget&&)::operator()<std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)> >(facebook::react::jsinspector_modern::HostTarget&&) const::'lambda'()&>(auto std::__ndk1::function<void (std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)>&&)> facebook::react::jsinspector_modern::makeScopedExecutor<facebook::react::jsinspector_modern::HostTarget>(std::__ndk1::shared_ptr<facebook::react::jsinspector_modern::HostTarget>, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>)::'lambda'(facebook::react::jsinspector_modern::HostTarget&&)::operator()<std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)> >(facebook::react::jsinspector_modern::HostTarget&&) const::'lambda'()&)+20) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #13 pc 0000000000afb384  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #14 pc 0000000000afa2e0  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libreactnative.so (offset 0x1438000) (std::__ndk1::__function::__func<auto std::__ndk1::function<void (std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)>&&)> facebook::react::jsinspector_modern::makeScopedExecutor<facebook::react::jsinspector_modern::HostTarget>(std::__ndk1::shared_ptr<facebook::react::jsinspector_modern::HostTarget>, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>)::'lambda'(facebook::react::jsinspector_modern::HostTarget&&)::operator()<std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)> >(facebook::react::jsinspector_modern::HostTarget&&) const::'lambda'(), std::__ndk1::allocator<auto std::__ndk1::function<void (std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)>&&)> facebook::react::jsinspector_modern::makeScopedExecutor<facebook::react::jsinspector_modern::HostTarget>(std::__ndk1::shared_ptr<facebook::react::jsinspector_modern::HostTarget>, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>)::'lambda'(facebook::react::jsinspector_modern::HostTarget&&)::operator()<std::__ndk1::function<void (facebook::react::jsinspector_modern::HostTarget&)> >(facebook::react::jsinspector_modern::HostTarget&&) const::'lambda'()>, void ()>::operator()()+24) (BuildId: 909aec441f8d961f)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #15 pc 0000000000019804  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libfbjni.so (offset 0xe34000) (facebook::jni::detail::MethodWrapper<void (facebook::jni::JNativeRunnable::*)(), &(facebook::jni::JNativeRunnable::run()), facebook::jni::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*>)+72) (BuildId: a22242831a7971267de570e06121acb588ce64cd)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #16 pc 0000000000019744  /data/app/~~MPfLA5kT-3hD4Rjmhz5bYw==/com.invertase.testing-hpiE_L0G1fusbcCghh-zGg==/base.apk!libfbjni.so (offset 0xe34000) (facebook::jni::detail::FunctionWrapper<void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*>), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*, void>::call(_JNIEnv*, _jobject*, void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*>))+60) (BuildId: a22242831a7971267de570e06121acb588ce64cd)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #17 pc 0000000000377030  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #18 pc 00000000003605a4  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #19 pc 00000000004906b4  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1248) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #20 pc 000000000050aca4  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+4124) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #21 pc 00000000003797d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #22 pc 00000000001d6bb4  /system/framework/framework.jar (android.os.Handler.handleCallback+0)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #23 pc 000000000037cde0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1377403774332988508)+356) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #24 pc 000000000049120c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #25 pc 000000000050a2f8  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #26 pc 00000000003797d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #27 pc 00000000001d69fc  /system/framework/framework.jar (android.os.Handler.dispatchMessage+0)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #28 pc 000000000037cde0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1377403774332988508)+356) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #29 pc 000000000049120c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #30 pc 0000000000509f94  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #31 pc 00000000003797d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #32 pc 00000000001fbe08  /system/framework/framework.jar (android.os.Looper.loopOnce+0)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #33 pc 000000000037cde0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1377403774332988508)+356) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #34 pc 000000000049120c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #35 pc 000000000050a2f8  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #36 pc 00000000003797d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #37 pc 00000000001fc57c  /system/framework/framework.jar (android.os.Looper.loop+0)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #38 pc 000000000037cde0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1377403774332988508)+356) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #39 pc 000000000049120c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #40 pc 000000000050a2f8  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #41 pc 00000000003797d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #42 pc 00000000001c3970  /system/framework/framework.jar (android.app.ActivityThread.main+0)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #43 pc 000000000037cde0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1377403774332988508)+356) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #44 pc 000000000037c560  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+672) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #45 pc 0000000000377168  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #46 pc 0000000000360880  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #47 pc 000000000026a904  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+780) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #48 pc 000000000026a5e8  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*) (.__uniq.165753521025965369065708152063621506277)+32) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #49 pc 0000000000377030  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #50 pc 00000000003605a4  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #51 pc 00000000004906b4  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1248) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #52 pc 0000000000509f94  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #53 pc 00000000003797d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #54 pc 000000000050cd00  /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+0)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #55 pc 000000000037cde0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1377403774332988508)+356) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #56 pc 000000000037c560  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+672) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #57 pc 0000000000377168  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #58 pc 0000000000758f58  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3160) (BuildId: d78a45b435dbd99c4526a33e3674ae4ee6ada328)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #59 pc 0000000000360880  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #60 pc 00000000004944c4  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+516) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #61 pc 0000000000553528  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+112) (BuildId: b10f5696fea1b32039b162aef3850ed3)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #62 pc 00000000000e1ab4  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+104) (BuildId: c741d6d101847b558f8cdb0633f23335)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #63 pc 00000000000ed7c4  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+840) (BuildId: c741d6d101847b558f8cdb0633f23335)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #64 pc 000000000001052c  /system/bin/app_process64 (main+1240) (BuildId: d5d56c38dabc17bd99cd0a7e469056fb)
11-17 08:27:24.957  3085  3085 F DEBUG   :       #65 pc 000000000005f610  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+104) (BuildId: a87908b48b368e6282bcc9f34bcfc28c)

This looks like the important line:

 : /__w/react-native/react-native/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.cpp:184: InstanceTarget &facebook::react::jsinspector_modern::HostTarget::registerInstance(InstanceTargetDelegate &): assertion "!currentInstance_ && "Only one instance allowed"" failed

@mikehardy mikehardy added the blocked: react-native Issue or PR blocked by a React Native issue or change. label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: react-native Issue or PR blocked by a React Native issue or change. impact: crash Behaviour causing app to crash. Needs Attention platform: android type: bug New bug report
Projects
None yet
Development

No branches or pull requests

3 participants