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

Android Crash: io.flutter.embedding.engine.FlutterJNI.loadLibrary #78285

Closed
frankyvij opened this issue Mar 16, 2021 · 2 comments
Closed

Android Crash: io.flutter.embedding.engine.FlutterJNI.loadLibrary #78285

frankyvij opened this issue Mar 16, 2021 · 2 comments
Labels
r: invalid Issue is closed as not valid

Comments

@frankyvij
Copy link

frankyvij commented Mar 16, 2021

In my recent release of flutter app using SDK: 2.0.2, I have some users for whom the application is crashing with the below exception.

Only change that I did is obviously update the SDK, and obfuscated the code before publishing the appbundle to the playstore.

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vetfinder.onepetstop/com.vetfinder.onepetstop.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/androidx.test.tools.crawler-S93K2rg0rAMonrBJ2iyQug==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.en.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.es.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.mdpi.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeMZG_nOandm6oGg==/split_config.x86.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-S93K2rg0rAMonrBJ2iyQug==/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/lib/x86, /data/app/androidx.test.tools.crawler-S93K2rg0rAMonrBJ2iyQug==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.en.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.es.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.mdpi.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.x86.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:193)
       at android.app.ActivityThread.main(ActivityThread.java:6669)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

This is my build command:

flutter build appbundle --obfuscate --split-debug-info=./debug/debug -t lib/config/main_prod.dart --release --bundle-sksl-path flutter_android.sksl.json

This is my flutter -doctor:

[✓] Flutter (Channel stable, 2.0.2, on Mac OS X 10.15.4 19E287 darwin-x64, locale en-SG)
    • Flutter version 2.0.2 at /Users/shauryanvij/development/tools/flutter
    • Framework revision 8962f6dc68 (4 days ago), 2021-03-11 13:22:20 -0800
    • Engine revision 5d8bf811b3
    • Dart version 2.12.1

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/shauryanvij/Library/Android/sdk
    • Platform android-30, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 54.0.3
    • Dart plugin version 203.7759

[✓] Connected device (2 available)
    • iPhone 8 (mobile) • 4D28B2CE-C52B-47FF-889E-53CA7D09BED5 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)      • chrome                               • web-javascript • Google Chrome 89.0.4389.82

• No issues found!

Some additional logs:

Caused by java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/androidx.test.tools.crawler-e-KHQ_Q1Ld5ROSc5SbP7Sg==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.en.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.es.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.mdpi.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.x86.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-e-KHQ_Q1Ld5ROSc5SbP7Sg==/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/lib/x86, /data/app/androidx.test.tools.crawler-e-KHQ_Q1Ld5ROSc5SbP7Sg==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.en.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.es.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.mdpi.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.x86.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
       at io.flutter.embedding.engine.loader.FlutterLoader.ensureInitializationComplete(FlutterLoader.java:370)
       at io.flutter.embedding.engine.FlutterEngine.<init>(FlutterEngine.java:202)
       at io.flutter.embedding.engine.FlutterEngine.<init>(FlutterEngine.java:16)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine(FlutterActivityAndFragmentDelegate.java:106)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:7)
       at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:13)
       at android.app.Activity.performCreate(Activity.java:7136)
       at android.app.Activity.performCreate(Activity.java:7127)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
       at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:2)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:193)
       at android.app.ActivityThread.main(ActivityThread.java:6669)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Caused by java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/androidx.test.tools.crawler-e-KHQ_Q1Ld5ROSc5SbP7Sg==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.en.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.es.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.mdpi.apk", zip file "/data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.x86.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-e-KHQ_Q1Ld5ROSc5SbP7Sg==/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/lib/x86, /data/app/androidx.test.tools.crawler-e-KHQ_Q1Ld5ROSc5SbP7Sg==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.en.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.es.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.mdpi.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-dAoIVDFEjbhhtRDnyV2fug==/split_config.x86.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
       at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
       at java.lang.System.loadLibrary(System.java:1669)
       at io.flutter.embedding.engine.FlutterJNI.loadLibrary(FlutterJNI.java:13)
       at io.flutter.embedding.engine.loader.FlutterLoader$1.call(FlutterLoader.java:14)
       at io.flutter.embedding.engine.loader.FlutterLoader$1.call(FlutterLoader.java)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:764)

It's important to note that I am not looking to build an apk, I want to build an appbundle. So please provide solutions that would support building of appbundle.

@frankyvij frankyvij changed the title Android Crash: Android Crash: io.flutter.embedding.engine.FlutterJNI.loadLibrary Mar 16, 2021
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Mar 16, 2021
@darshankawar
Copy link
Member

@frankyvij
Looking at the crash logs and considering the fact that you are trying to use appbundle, it specifically has:

Caused by java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file

and java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/androidx.test.tools.crawler-S93K2rg0rAMonrBJ2iyQug==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/base.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.en.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.es.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.mdpi.apk", zip file "/data/app/com.vetfinder.onepetstop-pnbzbTeMZG_nOandm6oGg==/split_config.x86.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-S93K2rg0rAMonrBJ2iyQug==/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/lib/x86, /data/app/androidx.test.tools.crawler-S93K2rg0rAMonrBJ2iyQug==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/base.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.en.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.es.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.mdpi.apk!/lib/x86, /data/app/com.vetfinder.onepetstop-pnbzbTeM0ZG_nOandm6oGg==/split_config.x86.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"

Check this similar issue and corresponding issue comment from core team member.

I am going ahead and closing this as not a Flutter issue. If you disagree, write in comments and I'll reopen it.
Thanks.

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

2 participants