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

Self-hosted standalone android apps crash on first Update #10746

Closed
cruzach opened this issue Oct 20, 2020 · 7 comments
Closed

Self-hosted standalone android apps crash on first Update #10746

cruzach opened this issue Oct 20, 2020 · 7 comments
Assignees

Comments

@cruzach
Copy link
Contributor

cruzach commented Oct 20, 2020

🐛 Bug Report

Summary of Issue

Standalone, self hosted, android apps on SDK 39 will crash on the first update

Environment - output of expo diagnostics & the platform(s) you're targeting

  Expo CLI 3.27.14 environment info:
    npmPackages:
      expo: ~39.0.2 => 39.0.3
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2
      react-native-web: ~0.13.12 => 0.13.18
    Expo Workflow: managed

Reproducible Demo

expo init selfHostCrash
expo export --public-url https://cruzach.github.io/selfHostCrash/dist/
git add dist/
git commit -m "first export"
git push
expo build:android -t apk --public-url https://cruzach.github.io/selfHostCrash/dist/android-index.json

install apk, runs fine 👍

make any change to app.js

expo export --public-url https://cruzach.github.io/selfHostCrash/dist/ --force
git add dist/
git commit -m "second export"
git push

kill/reopen installed apk to launch update, and the app will crash

repo i tested this on: https://github.com/cruzach/selfHostCrash

Relevant adb logcat

not going to share the full logs, but here are some maybe relevant messages:

10-20 12:13:03.197 27992 28056 W ReactNativeJS: The "UMNativeModulesProxy" native module is not exported through NativeModules; verify that @unimodules/react-native-adapter's native code is linked properly
...
10-20 12:13:03.315 27992 28056 W ReactNativeJS: No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?
10-20 12:13:03.332 27992 28056 E ReactNativeJS: Error: Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.io.
10-20 12:13:03.334 27992 28056 E ReactNativeJNI: logMarker RUN_JS_BUNDLE_END
10-20 12:13:03.337 27992 28056 E ReactNativeJS: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
10-20 12:13:03.339 27992 28057 E unknown:ReactNative: CatalystInstanceImpl caught native exception
10-20 12:13:03.339 27992 28057 E unknown:ReactNative: com.facebook.react.common.JavascriptException: Error: Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.io., stack:
@panlei09
Copy link

Hello, when can it be repaired?

@brentvatne
Copy link
Member

@esamelson is investigating this! he will post updates here

@esamelson
Copy link
Contributor

Hey everyone -- a fix for this issue has landed and has been deployed to our builders. You'll need to rebuild your app using expo build:android to get the fix. Apologies for any inconvenience this has caused 😞

@rodrigohgpontes
Copy link

@esamelson I had the same (or very similar) issue, but on an ejected Android app (built with Android Studio). I did a simple, unrelated update, published it on Play Store and now the app is crashing for everyone who updated the app.

What would be the solution? Upgrade Expo, eject, and build again?

@cruzach
Copy link
Contributor Author

cruzach commented Nov 20, 2020

@rodrigohgpontes this issue was for the managed workflow, are you certain your crash isn't due a to a fatal JS error in your app? You should investigate the logs with adb logcat to find out more

@PerishableDave
Copy link

PerishableDave commented Dec 11, 2020

@esamelson @cruzach @rodrigohgpontes

I'm getting similar issues to Rodrigo. I have an ejected app that breaks after its initial update. This only happens on Android builds. Any ideas?

Logcat output:

    Process: com.redacted.redacted, PID: 14297
    com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'r(d[0]).NativeModules.SourceCode.scriptURL.split('://')[1].split'), stack:
    <unknown>@915:186
    v@2:1473
    <unknown>@591:161
    v@2:1473
    <unknown>@6:134
    v@2:1473
    d@2:875
    global code@1659:3
    
        at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:83)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:223)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:923)```

@cruzach
Copy link
Contributor Author

cruzach commented Jan 19, 2021

closing since the fix for this has landed. An issue has been opened for this problem in the bare workflow - #11652

@cruzach cruzach closed this as completed Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants