Android Here map not resuming in Nougat (API 24) - here-api

I have followed HERE maps tutorial and created simple map app
https://developer.here.com/mobile-sdks/documentation/android/topics/app-simple-android-studio.html
When my activity is resumed, the app sometimes doesnot load map. I have to close app and restart it for map engine (or whatever controls loading map inside map fragment) to load the tiles back again. Sometimes it works fine but when i zoom out to country level and go back to my city, i see this problem. I keep getting below error:
09-14 22:17:40.986 27447-27982/com.maps.apnawayz E/BaseTextureView: ******** GL Thread crash ********Thread[BaseTextureView-RenderThread,5,main]
09-14 22:17:40.988 27447-27982/com.maps.apnawayz W/System.err: java.lang.RuntimeException: createWindowSurface failed EGL_BAD_CONFIG
09-14 22:17:40.988 27447-27982/com.maps.apnawayz W/System.err: at com.here.android.mpa.internal.l$a.d(BaseTextureView.java:475)
09-14 22:17:40.988 27447-27982/com.maps.apnawayz W/System.err: at com.here.android.mpa.internal.l$a.run(BaseTextureView.java:298)
09-14 22:17:40.988 27447-27982/com.maps.apnawayz E/BaseTextureView: ******** GL Thread crash ********Thread[BaseTextureView-RenderThread,5,main]
09-14 22:17:40.992 27447-27982/com.maps.apnawayz E/libEGL: eglDestroySurface:603 error 300d (EGL_BAD_SURFACE)
09-14 22:17:40.992 27447-27982/com.maps.apnawayz E/libEGL: eglDestroyContext:701 error 3006 (EGL_BAD_CONTEXT)
Could someone tell me how to avoid this.Looks like it only appears in API 24 (nexus 5X), it works fine in API 21(HTC one M7).
I am using android Nougat, Here starter sdk.
I tried enabling destroy activity under development settings as suggested here but didnt help:
https://stackoverflow.com/questions/38232689/map-fragment-shows-blank-when-app-resumes-from-background-to-front-gl-thread-cr#=

We have added many new updates to our Android and iOS SDKs and your issue is currently not reproducible.
Upgrade to the latest SDK and check out the documentation and code examples:
https://developer.here.com/documentation/android-premium/dev_guide/topics/quick-start.html
https://github.com/heremaps/here-android-sdk-examples

Related

firebase-admin fails with error maxretry without much information about the underlying cause and stops the node script also

I have a mobile and web app that use firebase realtime database and there are some long running tasks which are served on servers with the help of firebase-queue and firebase-admin. The long running tasks is to find out who else is using the mobile app in a person's contact book. So, if you install the app, the app will send a task to the server with your contact book data and ask it to find the people in the contact book who are also using the app. Every now and then I see two types of errors in the logs. First error is below which also cause the node process to stop.
/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:15373
return queue[i].onComplete(new Error(abortReason), false, null);
^
Error: maxretry
at /Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:15373:52
at exceptionGuard (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:4018:9)
at repoRerunTransactionQueue (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:15386:9)
at repoRerunTransactions (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:15279:5)
at /Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:15260:13
at /Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:7061:17
at PersistentConnection.onDataMessage_ (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:7088:17)
at Connection.onDataMessage_ (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:5882:14)
at Connection.onPrimaryMessageReceived_ (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:5876:18)
at WebSocketConnection.onMessage (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:5778:27)
at WebSocketConnection.appendFrame_ (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:4491:18)
at WebSocketConnection.handleIncomingFrame (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:4539:22)
at Client.mySock.onmessage (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:4438:19)
at Client.dispatchEvent (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:2883:30)
at Client._receiveMessage (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:3042:10)
at Client$2.<anonymous> (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:2924:49)
at Client$2.emit (node:events:539:35)
at Client$2.emit (node:domain:475:12)
at Client$2.<anonymous> (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:2186:14)
at pipe (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:1503:40)
at Pipeline$1._loop (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:1510:3)
at Pipeline$1.processIncomingMessage (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:1479:8)
at Extensions$1.processIncomingMessage (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:1645:20)
at Client$2._emitMessage (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:2177:22)
at Client$2._emitFrame (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:2137:19)
at Client$2.parse (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:1863:18)
at Client$2.parse (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:2369:60)
at IO.write (/Users/varungupta/Projects/myapp-server/node_modules/#firebase/database-compat/dist/index.standalone.js:186:16)
at TLSSocket.ondata (node:internal/streams/readable:754:22)
at TLSSocket.emit (node:events:527:28)
at TLSSocket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
There isn't much information about what exactly caused the maxretry error. The error happens at random after a few days of running the script. It doesn't happen right away.
The second error that I see that isn't as disruptive as the one above is
[2022-06-01T10:30:49.722Z] #firebase/database: FIREBASE WARNING: transaction at /queue/tasks/-N3TDQCAdt4y-akb0_MK failed: disconnect
This doesn't stop the node process and I can see that a transaction failed but not sure why did it disconnect and how can I resolve this problem.
I am using firebase-admin 9.6.0.

App crashes on launch after adding Firebase Authentication dependency

I'm integrating firebase authentication into my android project with firebase assistant. After integrating firebase auth, it adds a dependency implementation 'com.google.firebase:firebase-auth:21.0.1' . when I use this dependency app crashes on launch.
and this is the log cat error
2021-07-13 14:03:04.319 20371-20371/? E/.store.admi: Unknown bits set in runtime_flags: 0x8000
2021-07-13 14:03:04.719 20371-20371/app.store.admin W/.ugpapers.admi: Accessing hidden method Ljava/lang/invoke/LambdaMetafactory;->metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (blacklist, linking, denied)
2021-07-13 14:03:04.719 20371-20371/app.store.admin D/AndroidRuntime: Shutting down VM
2021-07-13 14:03:04.720 20371-20371/app.store.admin E/AndroidRuntime: FATAL EXCEPTION: main
Process: app.ugpapers.admin, PID: 20371
java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar)
at com.google.firebase.components.ComponentDiscovery.discoverLazy(ComponentDiscovery.java:112)
at com.google.firebase.FirebaseApp.<init>(FirebaseApp.java:418)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:299)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:267)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:252)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2102)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2076)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:7430)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6934)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6851)
at android.app.ActivityThread.access$1600(ActivityThread.java:242)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2063)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:227)
at android.app.ActivityThread.main(ActivityThread.java:7822)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
2021-07-13 14:03:04.739 20371-20371/app.store.admin I/Process: Sending signal. PID: 20371 SIG: 9
after referring to my old projects I used the old dependency implementation 'com.google.firebase:firebase-auth:20.0.4' and now it's working fine.
Why is the latest dependency not working for me? I'm testing my app on android 10 device.
Also if I add the latest firestore dependency, the app crash on launch.
what's going wrong here?

Exception in thread "Build Event Notification" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext

I want to build an app with Ionic V3 for Android but I have an issue when I build it on release.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
Exception in thread "Build Event Notification" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.security.Provider$Service.getImplClass(Provider.java:1728)
at java.security.Provider$Service.newInstance(Provider.java:1686)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at com.crashlytics.reloc.org.apache.http.ssl.SSLContexts.createDefault(SSLContexts.java:51)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:56)
at com.crashlytics.api.net.proxy.ProxySettings.getClientFor(ProxySettings.java:56)
at com.crashlytics.api.RestfulWebApi.notifyBuildEvent(RestfulWebApi.java:1438)
at com.crashlytics.api.RestfulWebApi.access$100(RestfulWebApi.java:74)
at com.crashlytics.api.RestfulWebApi$10.run(RestfulWebApi.java:1371)
at java.lang.Thread.run(Thread.java:748)
It seems to be caused by Crashlytics (which I don't even use) which is integrated within this package https://github.com/dpa99c/cordova-plugin-firebasex.
When I build the app in debug mode, I still have the exception but the build proceed until the end and I still can run it on my phone.
How can I prevent this issue ? Is there anyway to disable entirely Crashlytics so I don't have this exception anymore ?
Thanks
Ok, so it was all because of the JDK version. I ended up updating the JDK and everything worked perfectly.

Flutter - http.get fails on macos build target: Connection failed

I started porting my Flutter app to macos Desktop. The UI started fine. However, as soon as the app makes a network call, it fails instantly with Connection failed (OS Error: Operation not permitted).
Running a one-liner:
final response = await http.get('https://jsonplaceholder.typicode.com/posts/1');
fails with:
Unhandled Exception: SocketException: Connection failed (OS Error:
Operation not permitted, errno = 1),
address = jsonplaceholder.typicode.com, port = 443
#0 IOClient.send (package:http/src/io_client.dart:33:23)
The macos build target comes from Google's sample here.
Flutter (Channel master, v1.9.8-pre.108)
Per my comment on the other answer, you should not use the Xcode capabilities UI for this. It will not correctly handle the two separate entitlement files in a Flutter project.
You need to add:
<key>com.apple.security.network.client</key>
<true/>
to macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements.
This is documented here and here.
Your macOS XCode project lacks Internet permission called "Outgoing Connections (Client)".
Open your macos xcode project - [root]/macos/Runner.xcworkspace
Click "Runner" in Project navigator - general settings will show up. Select "Capabilities" from tabbar and tick option "Outgoing Connections (Client)".
Rebuild your application inside XCode and launch the project.
If you are getting this error Only in Android release then Internet permission must be missing from main manifest. You just need to add Internet permission in Manifest file.
Just add this permission in manifest <uses-permission android:name="android.permission.INTERNET"/>
There are three manifest file available in Android folder
app/src/debug
app/src/main
app/src/profile

map fragment shows blank when app resumes from background to front. GL thread crash

I compiled a HERE tutorial app, "basic map solution", and installed it on Motorola XT1565(android 6.0.1). When I launch it, the map view can be shown, but if I move it to background and later bring it back to front, sometimes I see the map view is blank: no map content. I caught the following GL thread crash error in the log.
I am using HERE Android SDK 3.1.1, and I can not find same issue on Here official app from Google Playstore. So I wonder if this issue is related to EGL lib compatible issue or there are some bugs in Here SDK native lib?
07-05 13:56:02.034 18468-18952/com.here.android.tutorial I/Adreno: QUALCOMM build : 166ada0, Ifd751822f5
Build Date : 01/26/16
OpenGL ES Shader Compiler Version: XE031.06.00.05
Local Branch : AU12_SBA
Remote Branch :
Remote Branch :
Reconstruct Branch :
07-05 13:56:02.185 18468-18952/com.here.android.tutorial I/OpenGLRenderer: Initialized EGL, version 1.4
07-05 13:56:02.288 18468-2216/com.here.android.tutorial E/BaseTextureView: ******** GL Thread crash ********Thread[BaseTextureView-RenderThread,6,main]
07-05 13:56:02.391 18468-2216/com.here.android.tutorial W/System.err: java.lang.RuntimeException: createWindowSurface failed EGL_BAD_CONFIG
07-05 13:56:02.392 18468-2216/com.here.android.tutorial W/System.err: at com.nokia.maps.y$a.f(BaseTextureView.java:495)
07-05 13:56:02.392 18468-2216/com.here.android.tutorial W/System.err: at com.nokia.maps.y$a.run(BaseTextureView.java:301)
07-05 13:56:02.392 18468-2216/com.here.android.tutorial E/BaseTextureView: ******** GL Thread crash ********Thread[BaseTextureView-RenderThread,6,main]
07-05 13:56:02.445 18468-2216/com.here.android.tutorial E/libEGL: eglDestroySurface:595 error 300d (EGL_BAD_SURFACE)
07-05 13:56:02.445 18468-2216/com.here.android.tutorial E/libEGL: eglDestroyContext:697 error 3006 (EGL_BAD_CONTEXT)
Please check with SDK 4.x that was released last week, since this problem should be fixed with this version.

Resources