Mapbox-gl-native: No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize()

Created on 7 Aug 2019  路  12Comments  路  Source: mapbox/mapbox-gl-native

Hi, this is obviously a reintroduction of of #14428, #11390, #13045 and maybe else.
After releasing our app with updated Mapbox to:

    implementation "com.mapbox.mapboxsdk:mapbox-android-sdk:8.2.1"
    implementation "com.mapbox.mapboxsdk:mapbox-android-navigation:0.41.0"
    implementation "com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.41.0"

We got a spike with this crash:

Fatal Exception: java.lang.UnsatisfiedLinkError
No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() (tried Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize and Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize__)
com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize (NativeConnectivityListener.java)
com.mapbox.mapboxsdk.net.NativeConnectivityListener. (NativeConnectivityListener.java:4)
com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance (ConnectivityReceiver.java:43)
com.mapbox.mapboxsdk.Mapbox.getInstance (Mapbox.java:60)

mapbox_crash

Could it be caused by mismatch version where 8.2.1 is requested in unrelesed 0.42.0 (as suggested in #14428)?

Configuration

Android versions: 5-9
Device models: various
Mapbox SDK versions: included above

Android

Most helpful comment

Having the same problem in production mode?
Anyone found any solution?

All 12 comments

What was the previous version of the SDK that you've used? We've recently changed the native library loader from ReLinker to the SoLoader in https://github.com/mapbox/mapbox-gl-native/pull/14890.

Previous versions were

    implementation "com.mapbox.mapboxsdk:mapbox-android-sdk:7.4.0"
    implementation "com.mapbox.mapboxsdk:mapbox-android-navigation:0.38.0"
    implementation "com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.38.0"

The SoLoader has been introduced in v8.0.1, so it does seem to be caused by that.

We're currently not planning to revert this change, but If you feel like you've had better results loading native code using ReLinker (or you want to try any other library), you can overwrite the default:

LibraryLoader.setLibraryLoader(new LibraryLoader() {
  @Override
  public void load(String name) {
    // load the library with the provided name
  }
});

This should be done before any code accesses SDK classes (Mapbox.java, layout inflation with MapView etc.).

I'm going to close as not actionable from the Maps SDK perspective.

@LukasPaczos this is not a good answer. We are several people who have difficulties with the sdk and firing this error in production.

My error still occur in production and I need a fix :

Fatal Exception: java.lang.UnsatisfiedLinkError No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() (tried Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize and Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize__)

This error is fired by my application class

` @Override
public void onCreate() {
super.onCreate();

    mContext = this.getBaseContext();

    Mapbox.getInstance(mContext, getString(R.string.mapbox_api_key));`

Same problem here! How do I prevent soloader from crashing my app?

Having the same problem in production mode?
Anyone found any solution?

@hrach @Ruyven did you found any workaround for this issue.

Well, I have realized that the majority of crashes are caused by custom installation of our app (read as cracked), e.g. this is because they do not installed all the needed apks since we use AAB ...

Actually, we had the same problem during Google Play feature verification process, the guys at Google used some apk (do not know which) and after telling them to use version from PlayStore everything was good.

@hrach I generate .aab file which when I test on Firebase testlab, it fails on around 4 to 6 devices out of 15. Due to which in crashes I'm not releasing the .aab on playstore. Do this issue has any link with .aab?

I have the same problem on circle ci with this configuration :

implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.6.2'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.9.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.4'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.4'

This issue is duplicate and I solved it in #14428

Was this page helpful?
0 / 5 - 0 ratings