mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

UnsatisfiedLinkError: No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize()

Open arbitur opened this issue 7 years ago • 9 comments

There seems to be an intermittent issue with Mapbox 8.2.1 (I updated from 5.5 to 8.2). I get an UnsatisfiedLinkError No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() on some of my customers devices. The crash happens on several different Android version (Observed 6.x.x-9.x.x) and different hardware. The only common characteristic is that the devices are rooted.

Any ideas?

arbitur avatar Sep 02 '19 08:09 arbitur

Hey @arbitur, when are you calling Mapbox#getInstance? Also, you could experiment with different native library loaders like ReLinker using the LibraryLoader#setLibraryLoader. Maps SDK uses the SoLoader by default.

LukasPaczos avatar Sep 02 '19 09:09 LukasPaczos

@LukasPaczos Hi, Im calling it in Application.java::onCreate:

public final class MainApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Mapbox.getInstance(this, getString(R.string.mapbox_access_token));
    }
}

arbitur avatar Sep 02 '19 09:09 arbitur

Thanks @arbitur, this looks good. In this case, it looks like the library loader is failing. Are you getting any logs with Mbgl-LibraryLoader tag?

Please feel free to experiment with the library loaders linked above, or even reverting back to the system one (System#loadLibrary).

Closing as this is not actionable from the Maps SDK perspective, this is a native library loader or Android OS issue.

LukasPaczos avatar Sep 02 '19 09:09 LukasPaczos

@LukasPaczos But Mapbox are the ones using a potentially flawed loader so this is very much actionable from the Mapbox perspective.

arbitur avatar Sep 02 '19 10:09 arbitur

@arbitur We've iterated through all system, ReLinker and SoLoader libraries and SoLoader has proven to be the most reliable one to date. Unfortunately, there's not much more we can do at this point, with the limited information and reports we have.

LukasPaczos avatar Sep 02 '19 10:09 LukasPaczos

@LukasPaczos Which loader did you use in v5? This issue started once I updated to v8.

arbitur avatar Sep 02 '19 10:09 arbitur

Looks like it was a System one - https://github.com/mapbox/mapbox-gl-native/blob/release-agua/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java#L15.

LukasPaczos avatar Sep 02 '19 10:09 LukasPaczos

Hello, fyi I opened a similar issue, with "steps" to reproduce the crash.

philemonmerlet avatar Nov 07 '19 10:11 philemonmerlet

This issue is duplicate and I solved it in #14428

caovanthanh203 avatar Feb 13 '20 17:02 caovanthanh203