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 build using 0.62, application keeps stopping #28677

Closed
huferry opened this issue Apr 18, 2020 · 13 comments
Closed

Release build using 0.62, application keeps stopping #28677

huferry opened this issue Apr 18, 2020 · 13 comments
Labels
Needs: Author Feedback Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@huferry
Copy link

huferry commented Apr 18, 2020

I followed the exact instruction on the page for Windows.
I created the app by react-native init TestApp.
I followed the instruction to build the release apk and tested with run-android --version release
The app is installed successfully on the emulator. However it will not run, and says:

TestApp keeps stopping

Please help!

System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
Memory: 3.92 GB / 15.89 GB
Binaries:
Node: 12.8.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.19.1 - C:\Users\hufer\AppData\Roaming\npm\yarn.CMD
npm: 6.5.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 27, 28
Build Tools: 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Version 3.6.0.0 AI-192.7142.36.36.6308749
Languages:
Java: 1.8.0_232
Python: 3.7.4
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  1. I followed the exact instruction on the page for Windows.
  2. I created the app by react-native init TestApp.
  3. I followed the instruction to build the release apk and tested with run-android --version release
  4. The app is installed successfully on the emulator. However it will not run, and says:

Expected Results

expected: application run on emulator, but it says 'TestApp keeps stopping'

Snack, code example, screenshot, or link to a repository:

It's just the code created by init and didn't change any code yet.

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels Apr 18, 2020
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@rolivegab
Copy link

Same problem here, my environments:

System:
    OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
    Memory: 733.48 MB / 15.65 GB
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 13.9.0 - ~/.nvm/versions/node/v13.9.0/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v13.9.0/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v13.9.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: 11.0.7 - /usr/bin/javac
    Python: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

@gokhandoslu
Copy link

Hi,
replace run-android --version release with run-android --variant=release
For more detail: https://reactnative.dev/docs/signed-apk-android#testing-the-release-build-of-your-app

@huferry
Copy link
Author

huferry commented Apr 23, 2020

Hi,
replace run-android --version release with run-android --variant=release
For more detail: https://reactnative.dev/docs/signed-apk-android#testing-the-release-build-of-your-app

Same outcome. It doesn't resolve my problem.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Apr 23, 2020
@q-bird
Copy link

q-bird commented Apr 25, 2020

@huferry Seems like you using x86 emulator right?
Have you tried with x86_64 / arm64-v8a / armeabi-v7a emulator instead of x86?
I got the same problem but only with x86 emulator, otherwise working well

@okwast
Copy link

okwast commented May 8, 2020

Hey, I found the same issue.

The problem also occurs for a complete fresh app.

  • npx react-native init CrashApp
  • cd CrashApp/
  • yarn android --variant=release

The compilation works fine however the app crashes at launch.

LogCat shows a couple of error messages regarding the soloader.
Two of them are these:

05-08 09:32:27.450  5352  5352 W System.err: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfb.so caused by: APK was built for a different platform
05-08 09:32:27.450  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:587)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:111)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:71)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:458)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:731)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:297)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:271)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:87)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.crashapp.MainApplication.onCreate(MainApplication.java:47)
05-08 09:32:27.451  5352  5352 W System.err: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
05-08 09:32:27.451  5352  5352 W System.err: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
05-08 09:32:27.451  5352  5352 W System.err: 	at android.app.ActivityThread.access$1100(ActivityThread.java:199)
05-08 09:32:27.451  5352  5352 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
05-08 09:32:27.451  5352  5352 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
05-08 09:32:27.451  5352  5352 W System.err: 	at android.os.Looper.loop(Looper.java:193)
05-08 09:32:27.451  5352  5352 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6669)
05-08 09:32:27.451  5352  5352 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
05-08 09:32:27.451  5352  5352 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

and

05-08 09:32:27.446  5352  5352 W System.err: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.crashapp/lib-main/libc++_shared.so" has unexpected e_machine: 40 (EM_ARM)
05-08 09:32:27.446  5352  5352 W System.err: 	at java.lang.Runtime.load0(Runtime.java:928)
05-08 09:32:27.446  5352  5352 W System.err: 	at java.lang.System.load(System.java:1633)
05-08 09:32:27.446  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader$1.load(SoLoader.java:393)
05-08 09:32:27.446  5352  5352 W System.err: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:77)
05-08 09:32:27.446  5352  5352 W System.err: 	at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:458)
05-08 09:32:27.446  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:731)
05-08 09:32:27.446  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
05-08 09:32:27.446  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:587)
05-08 09:32:27.446  5352  5352 W System.err: 	at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:111)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:71)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:458)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:731)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:587)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:111)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:71)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:458)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:731)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:297)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:271)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:87)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.crashapp.MainApplication.onCreate(MainApplication.java:47)
05-08 09:32:27.447  5352  5352 W System.err: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
05-08 09:32:27.447  5352  5352 W System.err: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
05-08 09:32:27.447  5352  5352 W System.err: 	at android.app.ActivityThread.access$1100(ActivityThread.java:199)
05-08 09:32:27.447  5352  5352 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
05-08 09:32:27.447  5352  5352 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
05-08 09:32:27.447  5352  5352 W System.err: 	at android.os.Looper.loop(Looper.java:193)
05-08 09:32:27.447  5352  5352 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6669)
05-08 09:32:27.447  5352  5352 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
05-08 09:32:27.447  5352  5352 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

With a bit of research I found this thread: facebook/SoLoader#55.
When I understood correctly x86 is not working anymore even on device.

x86 devices seem to be very rare nowadays.

npx react-native info gives that:

System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 2.25 GB / 16.00 GB
    Shell: 3.0.2 - /usr/local/bin/fish
  Binaries:
    Node: 14.1.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.8.4 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 28
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6392135
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_232 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2
  npmGlobalPackages:
    *react-native*: Not Found

@q-bird
Copy link

q-bird commented May 8, 2020

Following this guide @okwast

@okwast
Copy link

okwast commented May 8, 2020

For people watching this thread, I found a solution for my problem here: #25923 (comment)

@chrisglein
Copy link

@huferry did any of the new solutions work for you?

@chrisglein chrisglein added Needs: Author Feedback and removed Needs: Attention Issues where the author has responded to feedback. Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. labels May 13, 2020
@stale
Copy link

stale bot commented Aug 16, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 16, 2020
@stale
Copy link

stale bot commented Aug 23, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 23, 2020
@mohshbool
Copy link

Hey did anyone find a solution?

@rolivegab
Copy link

I updated to a newer version, and my problem was solved.
Remember to run graddle clean script (cd android && ./gradlew clean), and npx react-native start --reset-cache.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Author Feedback Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

8 participants