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

MapBox crashing with x86 issues #320

Closed
dan-0 opened this issue Apr 10, 2020 · 3 comments
Closed

MapBox crashing with x86 issues #320

dan-0 opened this issue Apr 10, 2020 · 3 comments

Comments

@dan-0
Copy link

dan-0 commented Apr 10, 2020

We're seeing crashes that appear to be related to x86 issues.

Stacktrace:

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__)
     FATAL EXCEPTION: main
Process: com.crash.mapboxcrash, PID: 7496
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__)
	at com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize(Native Method)
	at com.mapbox.mapboxsdk.net.NativeConnectivityListener.<init>(NativeConnectivityListener.java:27)
	at com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:43)
	at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:67)
	at com.crash.mapboxcrash.MainActivity.onCreate(MainActivity.kt:14)
	at android.app.Activity.performCreate(Activity.java:6975)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
	at android.app.ActivityThread.-wrap11(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
	at android.os.Handler.dispatchMessage(Handler.java:105)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6541)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Gradle config / Mapbox Version:

        implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0'
        implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0'

Currently, we're only able to replicate using Firebase Test Lab. To replicate the issue:

  1. Create a new Android Project with a MainActivity
  2. Import the above Mapbox dependencies in gradle.
  3. Initialize Mapbox via Mapbox.getInstance(this, MAPBOX_TOKEN) in MainActivity
  4. Build a signed debug APK
  5. Upload the APK to Firebase Test Lab doing a "Robo" test using the Nexus 5x virtual device on SDK 26 (also replicable with valid Instrumentation tests)
  6. After running you will see the crash with the provided stacktrace.

We were able to isolate the issue based on this comment: mapbox/mapbox-gl-native#14428 (comment)

The proposed solution of adding this did not work:

defaultConfig {
       ...
       ndk {
           abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
       }
}

However, explicitly specifying the following configuration does work (note: we can't do this for production, so the above comment's solution is not viable in our case)

defaultConfig {
       ...
       ndk {
           abiFilters "x86"
       }
}

We've tested this against the following versions:
com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0
com.mapbox.mapboxsdk:mapbox-android-sdk:9.0.0

We've had no issues with our x86 emulators when running locally so we're assuming this is some form of odd device configuration issue.

@reline
Copy link

reline commented Apr 16, 2020

Possibly related to or a duplicate of #111

@tobrun
Copy link
Member

tobrun commented Apr 21, 2020

Thank you for reaching out and providing a lot of information to help reproduce. This indeed looks like a duplicate of #111, prioritizing this to be investigated in #111 (comment). Thanks again for the report.

@tobrun
Copy link
Member

tobrun commented Jun 3, 2020

Following up on this in #416

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

No branches or pull requests

3 participants