Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() #15331

Closed
hrach opened this issue Aug 7, 2019 · 13 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@hrach
Copy link

hrach commented Aug 7, 2019

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

@LukasPaczos
Copy link
Member

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 #14890.

@LukasPaczos LukasPaczos added the Android Mapbox Maps SDK for Android label Aug 7, 2019
@hrach
Copy link
Author

hrach commented Aug 7, 2019

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"

@LukasPaczos
Copy link
Member

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.

@ben-j69
Copy link

ben-j69 commented Sep 18, 2019

@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));`

@Ruyven
Copy link

Ruyven commented Oct 2, 2019

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

@haroonkhan9426
Copy link

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

@haroonkhan9426
Copy link

haroonkhan9426 commented Oct 9, 2019

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

@hrach
Copy link
Author

hrach commented Oct 9, 2019

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 ...

@hrach
Copy link
Author

hrach commented Oct 9, 2019

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.

@haroonkhan9426
Copy link

@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?

@ben-j69
Copy link

ben-j69 commented Feb 3, 2020

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'

@caovanthanh203
Copy link

This issue is duplicate and I solved it in #14428

@lxzh
Copy link

lxzh commented Dec 16, 2022

Occasionally, the so is not loaded properly, causing initialization failure

12-15 17:41:10.547   827   827 D SoLoader: init start
12-15 17:41:10.547   827   827 D SoLoader: adding system library source: /vendor/lib
12-15 17:41:10.548   827   827 D SoLoader: adding system library source: /system/lib
12-15 17:41:10.548   827   827 D SoLoader: adding backup source from : i.f.a.b[root = /data/data/com.xxx.xxx/lib-main flags = 1]
12-15 17:41:10.548   827   827 D SoLoader: Preparing SO source: i.f.a.d[root = /system/lib flags = 2]
12-15 17:41:10.548   827   827 D SoLoader: Preparing SO source: i.f.a.d[root = /system/vendor/lib flags = 2]
12-15 17:41:10.548   827   827 D SoLoader: Preparing SO source: i.f.a.b[root = /data/data/com.xxx.xxx/lib-main flags = 1]
12-15 17:41:10.550   827   827 D SoLoader: init exiting
12-15 17:41:10.585   827   827 E art     : No implementation found for void com.mapbox.mapboxsdk.maps.renderer.MapRenderer.nativeInitialize(com.mapbox.mapboxsdk.maps.renderer.MapRenderer, float, java.lang.String) (tried Java_com_mapbox_mapboxsdk_maps_renderer_MapRenderer_nativeInitialize and Java_com_mapbox_mapboxsdk_maps_renderer_MapRenderer_nativeInitialize__Lcom_mapbox_mapboxsdk_maps_renderer_MapRenderer_2FLjava_lang_String_2)
12-15 17:41:10.586   827   827 D AndroidRuntime: Shutting down VM
12-15 17:41:10.586   827   827 E DEBUG   : encryptLog: false, zipCrashLog: false

mapbox version:

    implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:8.6.6')
    implementation('com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v8:0.7.0')
    implementation('com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v8:0.11.0')
    implementation('com.mapbox.mapboxsdk:mapbox-android-plugin-markerview-v8:0.3.0')
    implementation('com.mapbox.mapboxsdk:mapbox-android-plugin-offline-v8:0.6.0')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

7 participants