React-native: App keeps stopping

Created on 17 Jul 2018  Â·  12Comments  Â·  Source: facebook/react-native

App is not working even every thing build successfully ... ->

keeppingstop

image

Android Locked

Most helpful comment

Same issue. If I commend, in the app/build.gradle, the implementations of fresco it starts again.

I comment these rows:

//implementation 'com.facebook.fresco:fresco:1.+'
    // For animated GIF support
    //implementation 'com.facebook.fresco:animated-gif:1.+'
    // For WebP support, including animated WebP
    //implementation 'com.facebook.fresco:animated-webp:1.+'
    //implementation 'com.facebook.fresco:webpsupport:1.+'

I think I had executed react-native upgarde and after that the app keep crashing.

To fix it, specify the version 1.9.0 to all fresco implementations into the dependeces like:

implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.facebook.fresco:fresco:1.9.0'
    // For animated GIF support
    implementation 'com.facebook.fresco:animated-gif:1.9.0'
    // For WebP support, including animated WebP
    implementation 'com.facebook.fresco:animated-webp:1.9.0'
    implementation 'com.facebook.fresco:webpsupport:1.9.0'

All 12 comments

@piyushdesuvit Thank you for reaching out. To investigate this further it would be really helpful to provide atleast a stacktrace of the crash.

To prevent this issue from being closed, please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library.

Facing same issue in android.
Following is the stacktrace
E/AndroidRuntime: FATAL EXCEPTION: Thread-5 Process: com.lssss, PID: 21128 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.lssss-2/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:762)

same issue in Android here.

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)

I'm facing the same issue since yesterday evening, no major changes and the app won't open. Tried going back a few commits on my repo just to make sure it wasn't me. But even the old code won't run.

The exact same exception as @iamsourabhhh and @piyushdesuvit

The complete stacktrace

`07-17 10:08:41.133 20305-20305/? I/art: Late-enabling -Xcheck:jni
07-17 10:08:41.211 20305-20305/com.hys D/SoLoader: init start
adding system library source: /vendor/lib
07-17 10:08:41.212 20305-20305/com.hys D/SoLoader: adding system library source: /system/lib
07-17 10:08:41.213 20305-20305/com.hys D/SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.hys-1/lib/arm flags = 0]
07-17 10:08:41.214 20305-20305/com.hys D/SoLoader: adding backup source: com.facebook.soloader.ApkSoSource[root = /data/data/com.hys/lib-main flags = 1]
Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2]
Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.hys-1/lib/arm flags = 0]
Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.hys/lib-main flags = 1]
07-17 10:08:41.215 20305-20305/com.hys V/fb-UnpackingSoSource: locked dso store /data/data/com.hys/lib-main
07-17 10:08:41.216 20305-20305/com.hys I/fb-UnpackingSoSource: dso store is up-to-date: /data/data/com.hys/lib-main
07-17 10:08:41.216 20305-20305/com.hys V/fb-UnpackingSoSource: releasing dso store lock for /data/data/com.hys/lib-main
07-17 10:08:41.217 20305-20305/com.hys D/SoLoader: init finish: 4 SO sources prepared
init exiting
07-17 10:08:41.247 20305-20305/com.hys D/ReactNative: ReactInstanceManager.ctor()
07-17 10:08:41.247 20305-20305/com.hys D/SoLoader: init exiting
07-17 10:08:41.303 20305-20305/com.hys D/ReactNative: ReactInstanceManager.createReactContextInBackground()
ReactInstanceManager.recreateReactContextInBackgroundInner()
07-17 10:08:41.304 20305-20305/com.hys D/ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
ReactInstanceManager.recreateReactContextInBackground()
07-17 10:08:41.305 20305-20305/com.hys D/ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()

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

07-17 10:08:41.313 20305-20328/com.hys E/AndroidRuntime: FATAL EXCEPTION: Thread-5429
Process: com.hys, PID: 20305
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-1/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:818)
07-17 10:08:41.342 20305-20331/com.hys W/unknown:InspectorPackagerConnection: Couldn't connect to packager, will silently retry
07-17 10:08:41.356 20305-20338/com.hys D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
07-17 10:08:41.372 20305-20305/com.hys D/Atlas: Validating map...`

Can it be related to the path in the crash Lcom/facebook/soloader/SoLoader; ? what about that L at the beggining. Searching through the class, I can see the missing method loadLibrary is declared.

Seems related to SoLoader Issue

Same with me

Same issue. If I commend, in the app/build.gradle, the implementations of fresco it starts again.

I comment these rows:

//implementation 'com.facebook.fresco:fresco:1.+'
    // For animated GIF support
    //implementation 'com.facebook.fresco:animated-gif:1.+'
    // For WebP support, including animated WebP
    //implementation 'com.facebook.fresco:animated-webp:1.+'
    //implementation 'com.facebook.fresco:webpsupport:1.+'

I think I had executed react-native upgarde and after that the app keep crashing.

To fix it, specify the version 1.9.0 to all fresco implementations into the dependeces like:

implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.facebook.fresco:fresco:1.9.0'
    // For animated GIF support
    implementation 'com.facebook.fresco:animated-gif:1.9.0'
    // For WebP support, including animated WebP
    implementation 'com.facebook.fresco:animated-webp:1.9.0'
    implementation 'com.facebook.fresco:webpsupport:1.9.0'

I have this problem since yesterday
I have cluttered me

This seems to be the same issue as #20268, #20252 and #20251. More information: facebook/SoLoader#13

Hi, I know this is old but I seem to be experiencing the same problem right now. In my case I don't get any error on the console, the app simply does what the question's gif image does.

My current environment runs.
React: 16.6.3
React Native: 0.57.*
NodeJS: 8.11.3
OS: Mac OS Mojave

Not sure if it really counts but I noticed React Native from version 57 downwards have been failing to build on AppVeyor, so I moved to 58 and it worked fine. Hope this can serve as a contribution and help out someone out there.

Was this page helpful?
0 / 5 - 0 ratings