You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this in my package.json, but still RN one again can't do even a simple task without errors:
⚠️ react-native depends on @react-native-community/cli for cli commands. To fix update your package.json to include:
"devDependencies": {
"@react-native-community/cli": "latest",
}
When upgrading from 0.75 to 0.77 I started getting this runtime error:
TypeError: Cannot read property 'ReactCurrentOwner' of undefined, js engine: hermes
TypeError: Cannot read property 'default' of undefined, js engine: hermes
TypeError: Cannot read property 'ReactCurrentOwner' of undefined, js engine: hermes
TypeError: Cannot read property 'default' of undefined, js engine: hermes
With new arch enabled I got this error:
AndroidRuntime java.lang.RuntimeException: Unable to start activity ComponentInfo{my.app/my.app.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'com.facebook.react.interfaces.fabric.ReactSurface com.facebook.react.ReactHost.createSurface(android.content.Context, java.lang.String, android.os.Bundle)' on a null object reference
AndroidRuntime at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4129)
AndroidRuntime at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4316)
AndroidRuntime at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:222)
AndroidRuntime at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:133)
AndroidRuntime at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:103)
AndroidRuntime at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
AndroidRuntime at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2719)
AndroidRuntime at android.os.Handler.dispatchMessage(Handler.java:109)
AndroidRuntime at android.os.Looper.loopOnce(Looper.java:232)
AndroidRuntime at android.os.Looper.loop(Looper.java:317)
AndroidRuntime at android.app.ActivityThread.main(ActivityThread.java:8787)
AndroidRuntime at java.lang.reflect.Method.invoke(Native Method)
AndroidRuntime at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
AndroidRuntime at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
AndroidRuntime Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'com.facebook.react.interfaces.fabric.ReactSurface com.facebook.react.ReactHost.createSurface(android.content.Context, java.lang.String, android.os.Bundle)' on a null object reference
AndroidRuntime at com.facebook.react.ReactDelegate.loadApp(ReactDelegate.java:293)
AndroidRuntime at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:155)
AndroidRuntime at com.facebook.react.ReactActivityDelegate.lambda$onCreate$0(ReactActivityDelegate.java:149)
AndroidRuntime at com.facebook.react.ReactActivityDelegate.$r8$lambda$HPdXfLmAU1y4Wc1XbwAHziPP2WA(Unknown Source:0)
AndroidRuntime at com.facebook.react.ReactActivityDelegate$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
AndroidRuntime at com.facebook.systrace.Systrace.traceSection(Systrace.kt:39)
AndroidRuntime at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:117)
AndroidRuntime at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:47)
AndroidRuntime at my.app.MainActivity.onCreate(MainActivity.java:172)
AndroidRuntime at android.app.Activity.performCreate(Activity.java:9019)
AndroidRuntime at android.app.Activity.performCreate(Activity.java:8997)
AndroidRuntime at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1528)
AndroidRuntime at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4111)
AndroidRuntime ... 13 more
With both new arch and hermes disabled:
TypeError: undefined is not an object (evaluating 'ReactSharedInternals.ReactCurrentOwner')
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[2], "../Renderer/shims/ReactNative").default')
TypeError: undefined is not an object (evaluating 'ReactSharedInternals.ReactCurrentOwner')
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[2], "../Renderer/shims/ReactNative").default')
Really hate this when every single time when I update RN the build breaks completely. Even when following the upgrade helper instructions. I really don't understand what the RN developers are doing when they can't keep comptability. Probably millions of developers just waste enormous amount of time just to fight with RN. Let's hope someone releases a better alternative than this total hack of a library.
Reproducible demo
The text was updated successfully, but these errors were encountered:
Environment
I have this in my package.json, but still RN one again can't do even a simple task without errors:
With npx:
Things I’ve done to figure out my issue
Upgrading version
0.77
Description
When upgrading from 0.75 to 0.77 I started getting this runtime error:
With new arch enabled I got this error:
With both new arch and hermes disabled:
Really hate this when every single time when I update RN the build breaks completely. Even when following the upgrade helper instructions. I really don't understand what the RN developers are doing when they can't keep comptability. Probably millions of developers just waste enormous amount of time just to fight with RN. Let's hope someone releases a better alternative than this total hack of a library.
Reproducible demo
The text was updated successfully, but these errors were encountered: