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

Release variant crashing on startup #2450

Closed
midrizi opened this issue May 25, 2023 · 1 comment
Closed

Release variant crashing on startup #2450

midrizi opened this issue May 25, 2023 · 1 comment
Labels

Comments

@midrizi
Copy link
Contributor

midrizi commented May 25, 2023

Describe the bug

Create a new project, and run yarn android --variant Release

adb logcat output

05-25 18:21:37.000 15013 15042 E ReactNativeJS: * A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes
05-25 18:21:37.003 15013 15043 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
05-25 18:21:37.003 15013 15043 E AndroidRuntime: Process: com.pizzaapp, PID: 15013
05-25 18:21:37.003 15013 15043 E AndroidRuntime: com.facebook.react.common.JavascriptException: Invariant Violation: "PizzaApp" has not been registered. This can happen if:
05-25 18:21:37.003 15013 15043 E AndroidRuntime: * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
05-25 18:21:37.003 15013 15043 E AndroidRuntime: * A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes, stack:
05-25 18:21:37.003 15013 15043 E AndroidRuntime: invariant@1:74973
05-25 18:21:37.003 15013 15043 E AndroidRuntime: runApplication@1:269009
05-25 18:21:37.003 15013 15043 E AndroidRuntime: __callFunction@1:83734
05-25 18:21:37.003 15013 15043 E AndroidRuntime: anonymous@1:82245
05-25 18:21:37.003 15013 15043 E AndroidRuntime: __guard@1:83182
05-25 18:21:37.003 15013 15043 E AndroidRuntime: callFunctionReturnFlushedQueue@1:82203
05-25 18:21:37.003 15013 15043 E AndroidRuntime:
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:72)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at com.facebook.jni.NativeRunnable.run(Native Method)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
05-25 18:21:37.003 15013 15043 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:920)
05-25 18:21:37.005   512 15050 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
05-25 18:21:37.005   512   526 W ActivityTaskManager:   Force finishing activity com.pizzaapp/.MainActivity

Setting main to index.js works, but I guess this would break expo.

diff --git a/package.json b/package.json
index 556f44b..8aa06b6 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "name": "pizza-app",
   "version": "0.0.1",
   "private": true,
-  "main": "node_modules/expo/AppEntry.js",
+  "main": "index.js",
   "scripts": {
     "start": "react-native start",
     "ios": "react-native run-ios",
@@ -196,4 +196,4 @@
       "space-before-function-paren": 0
     }
   }
-}
\ No newline at end of file
+}

Ignite version

8.8.1

Additional info

npx ignite-cli doctor
System
  platform           darwin
  arch               arm64
  cpu                8 cores      Apple M2
  directory          PizzaApp     /Volumes/Github/PizzaApp

JavaScript (and globally-installed packages)
  node               16.20.0      /Volumes/[user]/.nvm/versions/node/v16.20.0/bin/node
  npm                8.19.4       /Volumes/[user]/.nvm/versions/node/v16.20.0/bin/npm
    @rxdi/firelink   0.9.2
    corepack         0.17.0
    expo-cli         6.3.7
    firebase-tools   11.29.1
    ios-deploy       1.12.2
    npm              8.19.4
    yarn             1.22.19
  yarn               1.22.19      /Volumes/[user]/.nvm/versions/node/v16.20.0/bin/yarn
    expo-cli         6.3.7
    ignite-cli       8.6.2
    ios-deploy       1.12.2
  pnpm               -            not installed
  expo               48.0.17      managed

Ignite
  ignite-cli         8.8.1        /Volumes/[user]/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
  ignite src         build        /Volumes/[user]/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build

Android
  java               20.0.1       /opt/homebrew/opt/openjdk/bin/java
  android home       -            /Volumes/[user]/Library/Android/sdk

iOS
  xcode              14.3
  cocoapods          1.12.1       /opt/homebrew/bin/pod

Tools
  git                git version 2.40.1   /opt/homebrew/bin/git
@midrizi midrizi added the bug label May 25, 2023
@frankcalise
Copy link
Contributor

Duplicate of #2431

@frankcalise frankcalise marked this as a duplicate of #2431 May 25, 2023
@midrizi midrizi closed this as completed May 25, 2023
@midrizi midrizi reopened this May 25, 2023
@midrizi midrizi closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants