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

"SurfaceRegistryBinding::startSurface failed. Global was not installed". Getting this error on yarn android #50005

Open
DonovanEnas opened this issue Mar 13, 2025 · 5 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Platform: Android Android applications.

Comments

@DonovanEnas
Copy link

DonovanEnas commented Mar 13, 2025

Description

Upgrading my RN version from 0.67.3 to 0.76.7, first trying on getting the app running on android. After some amount of effort was able to get it to build but crashed immediately after its installed on the emulator. Tried reopening the app but still crashes.I have tried and all the cache clearing steps. Finally got this issue when i tried running from android studio and got this error from the Logcat. Might not be able to share the reproducer. Please help me out if this is any issue regarding my packages or any incompatibility issue.

Steps to reproduce

Install build with yarn android.

React Native Version

0.76.

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.3.1
  CPU: (10) arm64 Apple M4
  Memory: 147.08 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.6
    path: ~/.nvm/versions/node/v18.20.6/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v18.20.6/bin/npm
  Watchman:
    version: 2025.03.03.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.12816248
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/donovanenas/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.7
    wanted: 0.76.7
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

No package ID 76 found for resource ID 0x760b000f.
No package ID 76 found for resource ID 0x760b000f.
ReactNativeJS com.appName  TypeError: Cannot read property 'genericDirectEventTypes' of null
unknown:ReactNative com.appName Exception in native call                                                                                                  java.lang.RuntimeException: SurfaceRegistryBinding::startSurface failed. Global was not installed.
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)

unknown:ReactHost com.appname Unhandled SoftException                                                                                  com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "SurfaceRegistryBinding::startSurface failed. Global was not installed.")
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:942)
at com.facebook.react.runtime.ReactHostImpl.getOrCreateDestroyTask(ReactHostImpl.java:1575)
at com.facebook.react.runtime.ReactHostImpl.lambda$destroy$7(ReactHostImpl.java:541)
at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$uso21_D6dCZdcf-JomVD56kdG4c(Unknown Source:0)
at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda37.call(D8$$SyntheticClass:0)
at com.facebook.react.runtime.internal.bolts.Task$2.run(Task.java:240)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.RuntimeException: SurfaceRegistryBinding::startSurface failed. Global was not installed.
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) 
unknown:ReactNative com.appname Exception in native call from JS
com.facebook.react.common.JavascriptException: TypeError: Cannot read property 'genericDirectEventTypes' of null, stack:
                                                                                                    anonymous@402:5428
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@401:143
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@400:542
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@399:796
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@398:240
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@397:312
@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@396:119
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@6:57
v@2:1473
d@2:875
o@2:413
                                                                                                    global@1571:3
                                                                                                    
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.kt:52)
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)
unknown:ReactHost  com.appname  Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "TypeError: Cannot read property 'genericDirectEventTypes' of null, stack:
                                                                                                    anonymous@402:5428
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@401:143
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@400:542
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@399:796
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@398:240
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@397:312
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@396:119
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@6:57
v@2:1473
d@2:875
o@2:413
                                                                                                    global@1571:3
                                                                                                    ")
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:942)
at com.facebook.react.runtime.ReactHostImpl.getOrCreateDestroyTask(ReactHostImpl.java:1575)
at com.facebook.react.runtime.ReactHostImpl.lambda$destroy$7(ReactHostImpl.java:541)
at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$uso21_D6dCZdcf-JomVD56kdG4c(Unknown Source:0)
at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda37.call(D8$$SyntheticClass:0)
at com.facebook.react.runtime.internal.bolts.Task$2.run(Task.java:240)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: com.facebook.react.common.JavascriptException: TypeError: Cannot read property 'genericDirectEventTypes' of null, stack:
anonymous@402:5428
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@401:143
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@400:542
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@399:796
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@398:240
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@397:312
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@396:119
v@2:1473
d@2:945
o@2:413
                                                                                                    anonymous@6:57
v@2:1473
d@2:875
o@2:413
                                                                                                    global@1571:3
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.kt:52)
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)
... 1 more

Reproducer

https://github.com/DonovanEnas/rn-upgrade-0.76-issue-android

Screenshots and Videos

Image
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.7. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added Platform: Android Android applications. Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Mar 13, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@migueldaipre
Copy link
Collaborator

Please add a minimal reproducer using our Reproducer Template

@DonovanEnas
Copy link
Author

@migueldaipre Added a repo from Reproducer Template since its related to upgrade

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Platform: Android Android applications.
Projects
None yet
Development

No branches or pull requests

3 participants