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

App crashes on starting in Android - SoLoader - base.apk problem #20251

Closed
nextdots opened this issue Jul 17, 2018 · 23 comments
Closed

App crashes on starting in Android - SoLoader - base.apk problem #20251

nextdots opened this issue Jul 17, 2018 · 23 comments
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@nextdots
Copy link

nextdots commented Jul 17, 2018

Environment

Environment:
OS: macOS High Sierra 10.13.5
Node: 9.11.1
Yarn: 1.7.0
npm: 6.1.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4819257

Packages: (wanted => installed)
react: 16.3.0-alpha.3 => 16.3.0-alpha.3
react-native: 0.54.2 => 0.54.2

Description

The app build successfully in debug and release in android but crashes on starting.

E/AndroidRuntime: FATAL EXCEPTION: Thread-2
Process: com.hys, PID: 23200
java.lang.NoSuchMethodError: No static method loadLibrary(Ljava/lang/String;)V in class Lcom/facebook/soloader/SoLoader; or its super classes (declaration of ‘com.facebook.soloader.SoLoader’ appears in /data/app/com.hys-vH4Q2uE5DrP5sdxI8aPjcA==/base.apk)
at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:20)
at com.facebook.react.bridge.NativeMap.(NativeMap.java:21)
at com.facebook.react.bridge.JSCJavaScriptExecutorFactory.create(JSCJavaScriptExecutorFactory.java:23)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:921)
at java.lang.Thread.run(Thread.java:764)

Complete stacktrace

--------- beginning of system
07-17 11:25:36.184 1655-31322/system_process I/ActivityManager: Force stopping com.hys appid=10105 user=0: from pid 26681
07-17 11:25:36.198 1882-1882/com.android.phone D/CarrierSvcBindHelper: No carrier app for: 0
07-17 11:25:36.273 1655-4537/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.hys/.MainActivity} from uid 2000
07-17 11:25:36.341 1655-4241/system_process I/ActivityManager: Start proc 26689:com.hys/u0a105 for activity com.hys/.MainActivity
07-17 11:25:36.342 1430-1960/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 8298496
07-17 11:25:36.351 26689-26689/? I/zygote: Not late-enabling -Xcheck:jni (already on)
07-17 11:25:36.379 26689-26689/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
07-17 11:25:36.449 2154-2589/com.google.android.googlequicksearchbox:search D/EGL_emulation: eglMakeCurrent: 0xceb3e620: ver 3 0 (tinfo 0xe6528400)
07-17 11:25:36.461 2248-2344/com.google.android.apps.nexuslauncher D/EGL_emulation: eglMakeCurrent: 0xd27149e0: ver 3 0 (tinfo 0xd2716670)
07-17 11:25:36.506 26689-26689/com.hys D/SoLoader: init start
adding system library source: /vendor/lib
07-17 11:25:36.508 26689-26689/com.hys D/SoLoader: adding system library source: /system/lib
07-17 11:25:36.509 26689-26689/com.hys D/SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.hys-_iLposT_b1mZkkXDfAhdyw==/lib/x86 flags = 0]
07-17 11:25:36.515 26689-26689/com.hys D/SoLoader: adding backup source: com.facebook.soloader.ApkSoSource[root = /data/data/com.hys/lib-main flags = 1]
07-17 11:25:36.518 26689-26689/com.hys D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
07-17 11:25:36.520 26689-26689/com.hys D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.hys-_iLposT_b1mZkkXDfAhdyw==/lib/x86 flags = 0]
07-17 11:25:36.521 26689-26689/com.hys D/SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.hys/lib-main flags = 1]
07-17 11:25:36.525 26674-26674/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
07-17 11:25:36.531 26689-26689/com.hys V/fb-UnpackingSoSource: locked dso store /data/user/0/com.hys/lib-main
07-17 11:25:36.542 26689-26689/com.hys I/fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.hys/lib-main
07-17 11:25:36.542 26689-26689/com.hys V/fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.hys/lib-main
07-17 11:25:36.542 26689-26689/com.hys D/SoLoader: init finish: 4 SO sources prepared
07-17 11:25:36.543 26689-26689/com.hys D/SoLoader: init exiting
07-17 11:25:36.583 26689-26689/com.hys D/ReactNative: ReactInstanceManager.ctor()
07-17 11:25:36.584 26689-26689/com.hys D/SoLoader: init exiting
07-17 11:25:36.605 26689-26689/com.hys D/NetworkSecurityConfig: No Network Security Config specified, using platform default
07-17 11:25:36.624 26674-26674/? W/app_process: Unexpected CPU variant for X86 using defaults: x86
07-17 11:25:36.626 26674-26674/? I/app_process: The ClassLoaderContext is a special shared library.
07-17 11:25:36.660 26689-26689/com.hys D/ReactNative: ReactInstanceManager.createReactContextInBackground()
ReactInstanceManager.recreateReactContextInBackgroundInner()
07-17 11:25:36.662 26689-26689/com.hys D/ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
07-17 11:25:36.663 26674-26674/? D/AndroidRuntime: Calling main entry com.android.commands.wm.Wm
07-17 11:25:36.663 26689-26689/com.hys D/ReactNative: ReactInstanceManager.recreateReactContextInBackground()
ReactInstanceManager.runCreateReactContextOnNewThread()
07-17 11:25:36.664 1655-25572/system_process W/WindowManager: Permission Denial: dismissKeyguard from pid=26674, uid=2000 requires android.permission.CONTROL_KEYGUARD
07-17 11:25:36.665 26674-26674/? D/AndroidRuntime: Shutting down VM

--------- beginning of crash

07-17 11:25:36.670 26689-26717/com.hys E/AndroidRuntime: FATAL EXCEPTION: Thread-2
Process: com.hys, PID: 26689
java.lang.NoSuchMethodError: No static method loadLibrary(Ljava/lang/String;)V in class Lcom/facebook/soloader/SoLoader; or its super classes (declaration of 'com.facebook.soloader.SoLoader' appears in /data/app/com.hys-_iLposT_b1mZkkXDfAhdyw==/base.apk)
at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:20)
at com.facebook.react.bridge.NativeMap.(NativeMap.java:21)
at com.facebook.react.bridge.JSCJavaScriptExecutorFactory.create(JSCJavaScriptExecutorFactory.java:23)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:921)
at java.lang.Thread.run(Thread.java:764)
07-17 11:25:36.677 1655-25572/system_process W/ActivityManager: Force finishing activity com.hys/.MainActivity
07-17 11:25:36.691 26689-26718/com.hys W/unknown:InspectorPackagerConnection: Couldn't connect to packager, will silently retry

@nextdots nextdots changed the title App crashes on starting in Android - SoLoader problem App crashes on starting in Android - SoLoader - base.apk problem Jul 17, 2018
@cristianonescu
Copy link

cristianonescu commented Jul 17, 2018

I have the same issue! Today happn to me for the first time. Even tried to revert but still getting this.

Even tried to update to latest but still persists.
react: 16.4.1
react-native: 0.56.0

@Gadigg
Copy link

Gadigg commented Jul 17, 2018

Yo

Happening here too

check this thread out
facebook/SoLoader#13

@cristianonescu
Copy link

@Gadigg we already there. Let's see if we get a solution

@anuruddhadinesh
Copy link

anuruddhadinesh commented Jul 17, 2018

Same issue here too it started to happen from today.
App crashes on starting with following log.

java.lang.NoSuchMethodError: No static method loadLibrary(Ljava/lang/String;)V in class Lcom/facebook/soloader/SoLoader; or its super classes (declaration of 'com.facebook.soloader.SoLoader' appears in /data/app/mx.com.project-1/base.apk) at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:18) at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:19) at com.facebook.react.bridge.JSCJavaScriptExecutorFactory.create(JSCJavaScriptExecutorFactory.java:21) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:912) at java.lang.Thread.run(Thread.java:818)

@kevenleone
Copy link

Same with me, anyone have a solution?

@Convict3d
Copy link

Same issue here, am running old build atm in order to continue development

@cristianonescu
Copy link

@Convict3d what configuration do you run in order to make it work? What is your react version? React native version?

@ShashikaVirajh
Copy link

@Convict3d What are your react and react-native versions? I also tried to downgrade but it did not work.

@Convict3d
Copy link

@ShashijaVirajh and @crisrianonescu I used an android apk I built the day before the problem started, same react-native version of 0.55 and react version of 16.0.0, it was an apk I built 2 days only, I noticed when I rebuilt android it downloaded new versions of facebook.fresco dependencies

@cristianonescu
Copy link

I use fresco in my app to display gifs. Are you using this too?

This might be one potential reason.

@anuruddhadinesh
Copy link

@Convict3d Is this something related to SDK and BuildTools ?
I am using
"react": "16.3.1",
"react-native": "0.55.3",
compileSdkVersion 26
buildToolsVersion '27.0.3'

Issue is still there.

@Convict3d
Copy link

Convict3d commented Jul 18, 2018

@cristianonescu yes am using fresco too for some loading animation, its the only thing that changed with gradle output when the app crashed.

Edit: am using gradle 4.4

@anuruddhadinesh
Copy link

@cristianonescu @Convict3d Im also using this fresco for animated gif this might be the reason let me remove this and try

@Convict3d
Copy link

@anuruddhadinesh I believe it's caused by fresco, I'll check when am at office

@cristianonescu
Copy link

I tried this right now. Still crashes. Nothing changed, I get the same error.

@anuruddhadinesh
Copy link

anuruddhadinesh commented Jul 18, 2018

Hi All
I just removed fresco from gradle and tried. Yes it worked. This is the reason for the crash. if you guys can confirm then we can close this bug.

@Convict3d
Copy link

I confirm it is caused by fresco, removed them dependencies from app/build.gradle deleted app/build folder and rebuilt, the app is running fine. I believe we can avoid crashing by identifying a specific version for fresco. Gonna try and report back.

@cristianonescu
Copy link

Guys, please try fresco 1.3.0 i am not able to test with it now. I'm on my way to the office.
1.3.0 fresco might be the solution to this

@Convict3d
Copy link

Edited gradle to use fresco dependencies v 1.9.0 and it is working
implementation 'com.facebook.fresco:fresco:1.9.0'
implementation 'com.facebook.fresco:animated-gif:1.9.0'

@Convict3d
Copy link

According to Maven Repository facebook.fresco:fresco and facebook.fresco:animated-gif v 1.10.0 were released 2 days ago, I can confirm it is what causing the issue.

@cristianonescu
Copy link

implementation 'com.facebook.fresco:fresco:1.9.0'
implementation 'com.facebook.fresco:animated-gif:1.9.0'
// IN CASE YOU NEED WEBP SUPPORT / MAKE SURE TO CHANGE THIS TOO TO 1.9.0
implementation 'com.facebook.fresco:animated-webp:1.9.0'
implementation 'com.facebook.fresco:webpsupport:1.9.0'

@nextdots
Copy link
Author

@cristianonescu thanks! it works

@kevenleone
Copy link

thanks @cristianonescu , now works

@facebook facebook locked as resolved and limited conversation to collaborators Jul 18, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants