nativescript-community / nativescript-community/ui-mapbox

Android - Exception on mapReady - black map

Open
#19 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
38
Forks
26
PR merge metrics
No merged PRs in 30d

Description

6.1.0 and 6.2.0

Android 11, tns-android 6.5.3
On the emulator it works fine. But on my Pixel 3, it never calls the mapReady function.
Looking at the adb logcat I see this..

01-30 15:19:24.206 13443 13597 W CrashReporter: Root directory doesn't exist
01-30 15:19:24.348 13443 13443 E TelemetryUtils: java.lang.SecurityException: getDataNetworkTypeForSubscriber
01-30 15:19:24.380 13443 13597 W eroInInstaller: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V (greylist-max-q,core-platform-api, reflection, denied)
01-30 15:19:24.381 13443 13597 E MapboxTelemetry: java.lang.ExceptionInInitializerError
01-30 15:19:24.389 13443 13475 W LocationController: Location permissions are not granted
01-30 15:19:24.411 13443 13599 I Mbgl-EGLConfigChooser: In emulator: false
01-30 15:19:24.426 13443 13613 I Mbgl : {GLThread 12942}[General]: GPU Identifier: Adreno (TM) 615
01-30 15:19:24.466 13443 13601 I eroInInstaller: Rejecting re-init on previously-failed class java.lang.Class<okhttp3.internal.platform.Platform>: java.lang.ExceptionInInitializerError:
01-30 15:19:24.466 13443 13601 I eroInInstaller: at okhttp3.internal.platform.Platform okhttp3.internal.platform.Platform.get() (Platform.java:85)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at javax.net.ssl.SSLSocketFactory okhttp3.OkHttpClient.newSslSocketFactory(javax.net.ssl.X509TrustManager) (OkHttpClient.java:263)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void okhttp3.OkHttpClient.(okhttp3.OkHttpClient$Builder) (OkHttpClient.java:229)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void okhttp3.OkHttpClient.() (OkHttpClient.java:202)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void com.mapbox.android.telemetry.MapboxTelemetry.initializeTelemetryClient() (MapboxTelemetry.java:235)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at boolean com.mapbox.android.telemetry.MapboxTelemetry.checkRequiredParameters(java.lang.String, java.lang.String) (MapboxTelemetry.java:191)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void com.mapbox.android.telemetry.MapboxTelemetry.sendEvents(java.util.List, boolean) (MapboxTelemetry.java:316)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void com.mapbox.android.telemetry.MapboxTelemetry.access$200(com.mapbox.android.telemetry.MapboxTelemetry, java.util.List, boolean) (MapboxTelemetry.java:37)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void com.mapbox.android.telemetry.MapboxTelemetry$4.run() (MapboxTelemetry.java:351)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641)
01-30 15:19:24.466 13443 13601 I eroInInstaller: at void java.lang.Thread.run() (Thread.java:923)
01-30 15:19:24.473 13443 13601 E libc++abi: terminating with uncaught exception of type jni::PendingJavaException
01-30 15:19:24.711 13443 13601 E libc++abi: terminate_handler unexpectedly threw an exception

Yes I have the tag in the manifest xml
Yes there is a accessToken set.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the black-map behavior on the Pixel 3 with Android 11 and inspect the adb logcat output around MapboxTelemetry and okhttp3 failures. Check the manifest XML service tag and access token configuration, then compare the device behavior with the working emulator case. Done means mapReady is called and the map renders without the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.