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

UnsatisfiedLinkError: No implementation found for void org.maplibre.android.net.NativeConnectivityListener.initialize() #2907

Open
lordtao opened this issue Oct 7, 2024 · 5 comments
Labels
android bug Something isn't working more info needed Further information is requested

Comments

@lordtao
Copy link

lordtao commented Oct 7, 2024

Firebase crash log

 Fatal Exception: java.lang.UnsatisfiedLinkError: No implementation found for void org.maplibre.android.net.NativeConnectivityListener.initialize() (tried Java_org_maplibre_android_net_NativeConnectivityListener_initialize and Java_org_maplibre_android_net_NativeConnectivityListener_initialize__) - is the library loaded, e.g. System.loadLibrary?
       at org.maplibre.android.net.NativeConnectivityListener.initialize(NativeConnectivityListener.java)
       at org.maplibre.android.net.NativeConnectivityListener.<init>(NativeConnectivityListener.java:27)
       at org.maplibre.android.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:45)
       at org.maplibre.android.MapLibre.getInstance(MapLibre.java:62)

libs.version.toml

maplibre-android-sdk = "11.4.0"
maplibre-android-plugin-annotation-v9 = "3.0.1"

maplibre-android-sdk = { group = "org.maplibre.gl", name = "android-sdk", version.ref = "maplibre-android-sdk" }
maplibre-android-plugin-annotation-v9 = { group = "org.maplibre.gl", name = "android-plugin-annotation-v9", version.ref = "maplibre-android-plugin-annotation-v9" }

To Reproduce
Steps to reproduce the behavior:

  1. Open a simple fullscreen map on an Android device

Platform information

The crash was only seen on this user's devices:

Device
Brand: Vivo
Model: Y27s
Orientation: Portrait
RAM free: 3.87 GB
Disk free: 189.88 GB

Device
Brand: Vivo
Model: Y18
Orientation:Portrait
RAM free: 2.34 GB
Disk free: 81.6 GB

Operating System
Version: Android 14
Orientation: Portrait
Rooted: No

@lordtao lordtao added the bug Something isn't working label Oct 7, 2024
@lordtao
Copy link
Author

lordtao commented Oct 7, 2024

build.gradle

included

ndk {
			abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
	}

@louwers
Copy link
Collaborator

louwers commented Oct 7, 2024

Some discussion on an old Mapbox issue: mapbox/mapbox-gl-native#15331

Not sure how to reproduce this...

@louwers louwers added android more info needed Further information is requested labels Oct 7, 2024
@lordtao
Copy link
Author

lordtao commented Oct 7, 2024

Additional information

compileSdk = "34"
targetSdk = "34"
minSdk = "26"
androidBuildTools = "34.0.0"

@louwers
Copy link
Collaborator

louwers commented Oct 7, 2024

Ruben from Flitsmeister shared on Slack:

According to our crashlytics this happened to 47 users in the last month, which is like ~0.005% of our monthly android userbase so it doesn't happen often.

Some more devices this is happening with:

image

image

@kodebach
Copy link
Contributor

kodebach commented Oct 8, 2024

We're seeing this issue too. It occurs very rarely, but for the users it affects the issue is permanent. AFAICT the affected devices are either very cheap Android phones or automated testing devices through in Google Play pre-launch reports. So far we ignored the issue because it is so exceedingly rare among our users.

Our assumption so far was that the database behind Google Play's app bundle (.aab) to APK conversion has incorrect information about the supported ABIs of the devices, i.e. the .so variant the device actually tries to load is not included in the APK produced by Google Play. Most likely the device supports multiple ABIs (e.g. armeabi-v7a and arm64-v8a) but the prioritization is different between the on-device logic and Google Play. Only one .so variant will be included in the APK (that's kind of the point of the app bundle system) and the device tries to load the other one.

If this assumption is correct, the remaining question is: Why does the device not fall back to loading the other supported ABI? Is this something maplibre can solve or is it a bug in the Android implementation of the device?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working more info needed Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants