Status Update
Comments
ma...@gmail.com <ma...@gmail.com> #2
ma...@gmail.com <ma...@gmail.com> #3
br...@gmail.com <br...@gmail.com> #4
ASEC storage has been deprecated several years ago and installs are banned since Android O (8.0), so I suspect that the exceptions you see on version 8.0+ are unrelated. Could you please check that the exceptions on devices on 8.0+ have indeed different stacktraces?
To mitigate this issue, bundletool could leave the native libraries compressed in the APKs on O+ whenever installLocation is set to "auto" or "preferExternal".
br...@gmail.com <br...@gmail.com> #5
Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.lds.ldssa-Ms3Se_bJEm53xgnoNTHnxg==/base.apk"],nativeLibraryDirectories=[/data/app/org.lds.ldssa-Ms3Se_bJEm53xgnoNTHnxg==/lib/arm, /system/lib, /vendor/lib]]] couldn't find "libsqliteX.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
....
Here is another one for a Android 8.1.0 on device LM-V405
Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.lds.ldssa-v8dzvQ_3IHJacrVlTX6c5A==/base.apk"],nativeLibraryDirectories=[/data/app/org.lds.ldssa-v8dzvQ_3IHJacrVlTX6c5A==/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libsqliteX.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
....
Here is another one for a Android 8.1.0 on device SM-J327W
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map "/mnt/asec/org.lds.ldssa-1/split_config.armeabi_v7a.apk!/lib/armeabi-v7a/libsqliteX.so" segment 1: Permission denied
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1657)
....
Let me know if you need more logs or more data....
jo...@google.com <jo...@google.com> #6
Samsung Galaxy S9+ (star2qltesq), Android 9
java.lang.UnsatisfiedLinkError:
at java.lang.Runtime.loadLibrary0 (Runtime.java:1012)
at java.lang.System.loadLibrary (System.java:1669)
at com.crashlytics.android.ndk.JniNativeApi.<clinit> (JniNativeApi.java:13)
at com.crashlytics.android.ndk.CrashlyticsNdk.onPreExecute (CrashlyticsNdk.java:50)
...
at io.fabric.sdk.android.Fabric.with (Fabric.java:339)
at [Application class].onCreate
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1154)
...
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1445)
LGE LG Stylo 4 (cv7a), Android 8.1
java.lang.UnsatisfiedLinkError:
at java.lang.Runtime.loadLibrary0 (Runtime.java:1016)
at java.lang.System.loadLibrary (System.java:1657)
at com.crashlytics.android.ndk.JniNativeApi.<clinit> (JniNativeApi.java:13)
at com.crashlytics.android.ndk.CrashlyticsNdk.onPreExecute (CrashlyticsNdk.java:50)
...
at io.fabric.sdk.android.Fabric.with (Fabric.java:339)
at [Application class].onCreate
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1120)
...
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:810
Since we've disabled the ability to install the app to external storage, I'm not sure if this is the same issue or if I should open a new one.
jo...@google.com <jo...@google.com> #7
ex...@gmail.com <ex...@gmail.com> #8
tg...@google.com <tg...@google.com> #9
ma...@gmail.com <ma...@gmail.com> #10
WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported. The current default is 'true'.
Is this expected? Sounds scary.
uc...@google.com <uc...@google.com>
jo...@google.com <jo...@google.com> #11
ma...@gmail.com <ma...@gmail.com> #12
ma...@gmail.com <ma...@gmail.com> #13
I can confirm that using android.bundle.enableUncompressedNativeLibs=false fixes this issue. The crash disappeared in the update that we rolled out with this setting, and we have reports from users that did have the issue on their device before, that confirm that this fixes it. Some were also able to confirm that they did have the app on external storage when it crashed.
This workaround is the safest and makes sense since it exactly reverses the behavior introduced in android gradle plugin v3.3.0, and builds I made after updating the plugin are the ones that had the issue.
I would very strongly suggest making the 'false' setting the default in subsequent android gradle plugin updates. This on-disk optimization is unusable as the combo of building app bundles, devices that have noexec external storage, users storing apps on said external storage, and ndk libs, will always result in these hard to track down, hard to reproduce for the developer but systematic crashes, unless the server-side split apk delivery blacklists these devices for delivering the optimization (there's quite a few of these devices).
an...@supercell.com <an...@supercell.com> #14
See
This change will be effective when testing locally in Android Studio 3.6.
ex...@gmail.com <ex...@gmail.com> #15
jo...@google.com <jo...@google.com> #16
It's not clear to me how this interacts with the recent changes in AGP 3.6 which cause APK sizes to double as native libs are no longer compressed.
ar...@google.com <ar...@google.com>
np...@gmail.com <np...@gmail.com> #17
If you were having this issue, then yes, you should be removing 'android.bundle.enableUncompressedNativeLibs=false' from the gradle.properties.
The size of the APK being bigger because of the native libs not being compressed is (counter-intuitively) a benefit for your users: the Android platform will be able to read the native libs directly from the APK without having to uncompress them on the device first during the installation which leads to your app having a smaller footprint on the device. The APK is also compressed when it's served from the Play Store to users and the compression is usually better when the native libs are uncompressed, which leads to smaller download sizes as well. Overall, smaller download size and smaller size on device which is a win-win for end-users: the only thing that's bigger is the file you upload to the Play Console.
tg...@google.com <tg...@google.com> #18
Recently I encountered this issue after upgrading to Android Studio 3.6, without 'android.bundle.enableUncompressedNativeLibs=false' in the gradle.properties.
The call stack is as below:
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map "/mnt/asec/my.test.app-2/split_config.armeabi_v7a.apk" segment 1: Permission denied
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at go.Seq.<clinit>(Seq.java:37)
at go.Seq.touch(Seq.java)
at mobile.Mobile.<clinit>(Mobile.java:12)
Should I try to add 'android.bundle.enableUncompressedNativeLibs=false' or not?
np...@gmail.com <np...@gmail.com> #19
Could you please share on what device you have seen this issue happen? (Brand, Model, Android API)
[Deleted User] <[Deleted User]> #20
One from firebase:
Brand: HUAWEI
Model: Y3III
Orientation: Portrait
RAM free: 367.13 MB
Disk free: 875.23 MB
plat_android Operating System
Version: 6.0
Orientation: Portrait
Rooted: No
bug_report Crash
Date: Mar 4, 2020, 3:02:00 AM
One from google play console:
moto e5
RAM 2048MB (TotalMem: 1837MB)
System on Chip: Qualcomm MSM8920 (Snapdragon 427)
Screen size: 720 x 1440 (normal)
CPU: 4x ARM Cortex-A53 (1400 Mhz)
Screen density (DPI): 320
ABI: armeabi-v7a , armeabi
SDK: Android 8.1 (SDK 27)
GPU: Qualcomm Adreno 308 (650 Mhz)
OpenGL ES version: 3.0
an...@supercell.com <an...@supercell.com> #21
LGE V30 Version: 9
Galaxy A3 (2017) Version 8.0.0
Galaxy S7 Version 8.0.0
How to fix it?
jo...@google.com <jo...@google.com> #22
Re
an...@supercell.com <an...@supercell.com> #23
Yes. It's the same error.
ava.lang.UnsatisfiedLinkError: dlopen failed: couldn't map "/mnt/asec/.../base.apk!/lib/arm64-v8a/libc++_shared.so" segment 0: Permission denied
But I am not sure that it is connected with an external sd card. I don't have this information from users
74...@gmail.com <74...@gmail.com> #24
Because I see in the docs that "android.bundle.enableUncompressedNativeLibs = false" is for Bundles
qu...@gmail.com <qu...@gmail.com> #25
That property is for Bundles only indeed.
/mnt/asec/
suggests that this is related to ASEC external storage as well though.
Do you have the property android:extractNativeLibs=false
set in your AndroidManifest.xml? If so, removing it could possibly fix the issue (since that's effectively what the enableUncompressedNativeLibs property is enabling for Bundles).
tg...@google.com <tg...@google.com>
jo...@google.com <jo...@google.com>
ma...@gmail.com <ma...@gmail.com> #26
I don't have this property in current version.
ar...@google.com <ar...@google.com> #27
Aha, that probably explains it, yes.
ro...@gmail.com <ro...@gmail.com> #28
1. Variant for Android < 9.0 with extractNativeLibraries set to true and native libraries are compressed inside zip.
2. Variant for Android >= 9.0 with extractNativeLibraries set to false and native libraries are uncompressed inside zip.
If you still have this issue could you please provide information how do you generate APKs from Bundle, using Play Console or running Bundle Tool locally? If running locally which version do you run?
If it is possible could you also specify your app package name it would be very helpful for investigation.
ar...@google.com <ar...@google.com> #29
[Deleted User] <[Deleted User]> #30
What devices on Android 9 please? Do you have a list? It would help us so we can reach out to OEMs so they can fix those devices via OTA updates.
ro...@gmail.com <ro...@gmail.com> #31
For us, data from the past 7 days:
Android 10: <1% Android 9: 94% Android 8: 5%
LG: 91%
- G6: 21%
- V40 ThinQ: 13%
- LG G7 ThinQ: 10%
- other (15 devices): 47%
-
- LG Stylo 4
-
- LG Premier Pro
-
- LG Q7+
-
- LG G7 ThinQ
-
- LG V35 ThinQ
-
- LG G6
-
- V30
-
- LG G6
-
- LG Aristo 3+
-
- LG Stylo 4
-
- LG K8(2018)
Samsung: 3%
- Galaxy J7 Crown: 1%
- other (10 devices): 2%
-
- Galaxy J7 Aura
-
- SM-J337A
-
- Galaxy S9+
-
- Galaxy J7
-
- Galaxy J7 Star
-
- Galaxy S9
-
- Galaxy Tab S3
-
- Galaxy S7
-
- Galaxy A70
-
- Galaxy A20
Lenovo: 3%
- Lenovo Tab E7
Huawei: 1%
- HUAWEI Y6 2018
- HUAWEI Y7 2018
- P8 lite 2017
- Mate 20 lite
- HUAWEI P smart
- HUAWEI Y6 2018
95% of the time it's happening in the background. Unfortunately, I don't have the stat breakdown of which OEM devices are on Android 9.
We do not have extractNativeLibs
or enableUncompressedNativeLibs
set.
tg...@google.com <tg...@google.com> #32
Having issues as well on my bundled app. Several reports from Samsung devices on Android 9.0.
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map "/mnt/asec/PKG/split_config.arm64_v8a.apk!/lib/arm64-v8a/libFOO.so" segment 1: Permission denied
Samsung: SM-N9500 SM-M305F
Too bad, I liked the idea to have smaller install size, but this clearly should not be recommended.
ho...@gmail.com <ho...@gmail.com> #33
I can confirm it for an APK (non-bundle) app not setting android:extractNativeLibs="true"
on the following devices (according to Firebase):
- LG G7 ThinQ
- LG G6
- LG G5
In our case this is exclusive to LG devices. Amongst those, 90% of crashes happen with Android 9, only device shows the issue with Android 8.0.0.
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map "/mnt/asec/XXX-1/base.apk!/lib/arm64-v8a/libbarhopper_v2.so" segment 1: Permission denied
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1669)
at com.google.android.libraries.barhopper.BarhopperV2.<init>(BarhopperV2.java:5)
at com.google.firebase.ml.vision.barcode.zza.start(zza.java:14)
ar...@gmail.com <ar...@gmail.com> #34
I think your sentence needs to be corrected so we can understand:
Amongst those, 90% of crashes happen with Android 9, only device shows the issue with Android 8.0.0.
As is, it looks like you might have forgotten "one" between "only" and "device" but I can't be sure.
vi...@gmail.com <vi...@gmail.com> #35
Reopening for LG devices.
an...@supercell.com <an...@supercell.com> #36
Having issues as well on our bundled app. enableUncompressedNativeLibs
set to false.
Stack trace we are seeing in Firebase reports:
Caused by java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map "/mnt/asec/com.---.---/split_config.arm64_v8a.apk!/lib/arm64-v8a/libshinobicharts-android.so" segment 0: Permission denied
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1669)
Affected devices:
LG - 80%
Samsung - 20%.
no reports for other devices.
Affected android versions:
Android 7, 8, 9
mi...@gmail.com <mi...@gmail.com> #37
From the provided stack trace it looks like Android tries to read native library from the APK instead of file system location. Can you ensure that android:extractNativeLibs
is not set in Android manifest and gradle property android.bundle.enableUncompressedNativeLibs
is set to false
?
jo...@google.com <jo...@google.com> #38
android.bundle.enableUncompressedNativeLibs=false
- that's correct
regarding android:extractNativeLibs
: we are not setting it explicitly, but as i can see from Merged Manifest it is set to false
which is default value for gradle plugin 4.0.0 as i understood.
Description
There was also svn error, that said that my home folder was not in svn. Not sure if it tries to index my whole home folder now..
Everything works fast if I use experimental use active configuration only setting, but then I cant see my cpp files :(
Build: 3.3, AI-182.5107.16.33.5199772, 201812250239,
AI-182.5107.16.33.5199772, JRE 1.8.0_152-release-1248-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.1 unknown, screens 2560x1440; Retina
Android Gradle Plugin: 3.3.0
Gradle: 4.10.2
NDK: from local.properties: 18.1.5063045; latest from SDK: 18.1.5063045;
LLDB: LLDB 3.1 (revision: 3.1.4508709)
CMake: from local.properties: (not specified); latest from SDK: 3.6.0-rc2; from PATH: (not found);
Source: user_sentiment_feedback
IMPORTANT: Please read