ui-mapbox
ui-mapbox copied to clipboard
Android - Exception on mapReady - black map
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.
Yes I have the
Also tried the current git app build, getting the same thing.
01-30 16:15:32.234 19167 19217 I TetheringManager: registerTetheringEventCallback:org.nativescript.mapbox
01-30 16:15:32.244 19167 19167 E TelemetryUtils: java.lang.SecurityException: getDataNetworkTypeForSubscriber
01-30 16:15:32.262 19167 19217 W vescript.mapbo: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V (greylist-max-q,core-platform-api, reflection, denied)
01-30 16:15:32.263 19167 19217 E MapboxTelemetry: java.lang.ExceptionInInitializerError
01-30 16:15:32.275 19167 19217 I vescript.mapbo: Rejecting re-init on previously-failed class java.lang.Class<okhttp3.internal.platform.Platform>: java.lang.ExceptionInInitializerError:
01-30 16:15:32.275 19167 19217 I vescript.mapbo: at okhttp3.internal.platform.Platform okhttp3.internal.platform.Platform.get() (Platform.java:85)
01-30 16:15:32.275 19167 19217 I vescript.mapbo: at javax.net.ssl.SSLSocketFactory okhttp3.OkHttpClient.newSslSocketFactory(javax.net.ssl.X509TrustManager) (OkHttpClient.java:263)
01-30 16:15:32.275 19167 19217 I vescript.mapbo: at void okhttp3.OkHttpClient.
Same for me on Android 11. On Android 10 works fine.
√ Getting NativeScript components versions information...
√ Component nativescript has 7.1.2 version and is up to date.
√ Component @nativescript/core has 7.1.4 version and is up to date.
√ Component @nativescript/ios has ^7.1.1 version and is up to date.
√ Component @nativescript/android has 7.0.1 version and is up to date.
Latest version from NPM: "@nativescript-community/ui-mapbox": "^6.2.0"
Adding bellow configuration to App_Resources\Android\app.gradle solves this issue.
dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
}
That did seem to work. I might have also had the default app id, but I dont know if that was the cause.
Updating to the latest Android SDKs fixed it for me.
So im having an new issue, same class / area of issues. I have to look at adb because nothing is erroring out. The mapReady function is never called. Samsung S20, all libs / tns / and os updated. Same exact build works on my Pixel 3. Yes the permission is added to the manifest.
TelemetryUtils: java.lang.SecurityException: getDataNetworkTypeForSubscriber: uid 10316 does not have android.permission.READ_PHONE_STATE. MapboxTelemetry: java.lang.IllegalArgumentException: Invalid pattern: FVQ3CP/SEI8eLPxHJnjyew2P5DTC1OBKK4Y6XkmC0WI=