Skip to content

Startup crash on Pixel 6 Pro caused by Mapbox SDK initialization #2721

@KishorePrimeMover

Description

@KishorePrimeMover

Environment

  • Android OS version: 12
  • Devices affected: 1
  • Device model: Pixel 6 Pro
  • Maps SDK Version:
    • com.mapbox.maps:android-ndk27:11.13.1
    • com.mapbox.extension:maps-compose:11.13.1

Observed behavior and steps to reproduce

Image

Application crashes immediately during startup while initializing Mapbox SDK in Application.onCreate().

Fatal Exception: java.lang.ExceptionInInitializerError
    at com.mapbox.common.MapboxOptionsImpl.setAccessToken(MapboxOptionsImpl.java)
    at com.mapbox.common.MapboxOptions.setAccessToken(MapboxOptions.kt:23)
    at com.ackcio.beam.App.onCreate(App.kt:96)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1223)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6762)
    at android.app.ActivityThread.access$1500(ActivityThread.java:256)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7870)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009)

Steps to reproduce

  1. Install and launch the application on Pixel 6 Pro running Android 12.
  2. Application crashes during startup.
  3. Crash occurs while calling:

Expected behavior

Application should initialize Mapbox SDK successfully and continue loading without crashing.

Notes / preliminary analysis

Crash occurs during static initialization of Mapbox native components.

  • Failure point is:
  • MapboxOptions.setAccessToken(...)

Application is using:
* com.mapbox.maps:android-ndk27:11.13.1
* com.mapbox.extension:maps-compose:11.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions