I am working in an app with maps using Here Maps but when the navigation launchs, the lane information doesn't show. I am following this example --> https://github.com/heremaps/here-android-sdk-examples/tree/master/advanced-navigation/app/src/main/java/com/here/android/example/advanced/navigation
I have tried debbug mode but it doesn't enter in LaneInfoUtils.java.
There is a error in the log, I don't know if it's related.
D/EgretLoader: EgretLoader(Context context)
The context is not activity
W/cr_AwContents: Application attempted to call on a destroyed WebView
java.lang.Throwable
at org.chromium.android_webview.AwContents.r(chromium-TrichromeWebViewGoogle.aab-stable-447212033:2)
at com.android.webview.chromium.WebViewChromium.addJavascriptInterface(chromium-TrichromeWebViewGoogle.aab-stable-447212033:6)
at android.webkit.WebView.addJavascriptInterface(WebView.java:1924)
at miui.contentcatcher.sdk.utils.WebViewUtils$NativeWebViewUtils.addJavascriptInterface(WebViewUtils.java:245)
at miui.contentcatcher.sdk.utils.WebViewUtils.initWebViewJsInterface(WebViewUtils.java:158)
at miui.contentcatcher.InterceptorProxy$1.run(InterceptorProxy.java:190)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
W/ConnectivityManager.CallbackHandler: callback not found for CALLBACK_AVAILABLE message
W/ConnectivityManager.CallbackHandler: callback not found for CALLBACK_AVAILABLE message
Thank you :)
I was having issues with the Lane information as well. I ended up just going with the Realistic view, this shows a 2d image that shows you which lane you should take.
https://developer.here.com/documentation/android-premium/3.18/dev_guide/topics/map-guidance-events.html
Go to the link provided and scroll down to Realistic View. This will give you more information on how to implement it. I was able to get it working with the code provided in the docs, I didn't have to put the images on the app itself like I did with just the Lane Information.
Related
Every day I face with a lot of crash reports from the production mode by crashlytics on Android React Native. It is not possible to detect this crashes in the develop mode. Just stacktrace from firebase. And all this stacks describes what is happening on the native Java's side. By the name of the exception we can assume the approximate cause of the error. Some methods that was called before the crash and numbers of the lines that say nothing for you. And more over this methods could be called in so many places of the app, even in the third party libraries. In some lucky cases you can find the same errors maybe on GitHub or StackOverflow, but it is all individually, because if it works somewhere it does not mean it will work in your situation. And every day I try find the cause of the error in React Native app by test in many places of my app, but nothing to find there even if I now the approximate cause of the error from the stacktrace. Can somebody tell me please is it possible to detect the exact line code from Java side in React Native by this stacktrace or it is not enough information for it. Maybe to share your experience or recommend something how to go ahead at this. Thanks in advance!
Fatal Exception: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy#5f1e209 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:1122)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:439)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
at android.app.Dialog.show(Dialog.java:473)
at com.facebook.react.views.modal.ReactModalHostView.showOrUpdate(ReactModalHostView.java:307)
at com.facebook.react.views.modal.ReactModalHostManager.onAfterUpdateTransaction(ReactModalHostManager.java:137)
at com.facebook.react.views.modal.ReactModalHostManager.onAfterUpdateTransaction(ReactModalHostManager.java:30)
at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:51)
at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:279)
at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:180)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:786)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:903)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2400(UIViewOperationQueue.java:43)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:963)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:994)
at android.view.Choreographer.doCallbacks(Choreographer.java:794)
at android.view.Choreographer.doFrame(Choreographer.java:725)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:981)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7814)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
Fatal Exception: java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Bitmap.java)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1095)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1041)
at android.graphics.Bitmap.createBitmap(Bitmap.java:991)
at android.graphics.Bitmap.createBitmap(Bitmap.java:952)
at com.facebook.imagepipeline.memory.BucketsBitmapPool.alloc(BucketsBitmapPool.java:54)
at com.facebook.imagepipeline.memory.BucketsBitmapPool.alloc(BucketsBitmapPool.java:29)
at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:266)
at com.facebook.imagepipeline.platform.DefaultDecoder.decodeFromStream(DefaultDecoder.java:217)
at com.facebook.imagepipeline.platform.DefaultDecoder.decodeJPEGFromEncodedImageWithColorSpace(DefaultDecoder.java:155)
at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decodeJpeg(DefaultImageDecoder.java:181)
at com.facebook.imagepipeline.decoder.DefaultImageDecoder$1.decode(DefaultImageDecoder.java:58)
at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decode(DefaultImageDecoder.java:121)
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.doDecode(DecodeProducer.java:281)
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.access$200(DecodeProducer.java:128)
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder$1.run(DecodeProducer.java:170)
at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:202)
at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:22)
at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:73)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
at java.lang.Thread.run(Thread.java:764)
First of all, try using try catch statements on all those places which you think can cause the crash like api calls, async functions, data processing etc.
There are multiple activity tracking sdk available out there for tracking activities like:
AppsFlyer: https://www.appsflyer.com/
Leanplum: https://www.leanplum.com/
CleverTap: https://clevertap.com/
You can use any of these sdk to track events/activities/errors. This will help you to identify steps to reproduce crash and sometimes this can provide you actual error message by passing it to the activity/event. You can get the error message in catch block and then pass that error message with the activity/event to the sdk.
Is there a way to message a user who sent in a crash report - to ask them about what was happening right before?
Also this is my stack trace:
java.lang.RuntimeException: Unable to stop activity
{com.alexgierczyk.starific/com.alexgierczyk.starific.RunnerActivity}:
java.lang.NullPointerException: Attempt to read from field
'com.alexgierczyk.starific.DemoRenderer
com.alexgierczyk.starific.DemoGLSurfaceView.mRenderer' on a null
object reference at
android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4507)
at
android.app.ActivityThread.handleStopActivity(ActivityThread.java:4560)
at android.app.ActivityThread.access$1300(ActivityThread.java:197)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:145) at
android.app.ActivityThread.main(ActivityThread.java:6891) at
java.lang.reflect.Method.invoke(Native Method) at
java.lang.reflect.Method.invoke(Method.java:372) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.NullPointerException: Attempt to read from field
'com.alexgierczyk.starific.DemoRenderer
com.alexgierczyk.starific.DemoGLSurfaceView.mRenderer' on a null
object reference at
com.alexgierczyk.starific.RunnerActivity.onStop(RunnerActivity.java:851)
at
android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1291)
at android.app.Activity.performStop(Activity.java:6752) at
android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4504)
... 10 more
It says ... 10 more, is there a way to see those other 10?
You can not initiate a discussion with the user from google play console as it does not give you enough data to do so. In case your user left you a message with the error report, you can read it in the User Message tab.
In case you want to initiate communication with your user, you can probably try some in-app feedback tool that has crash reporting enabled so that you get some more information about the crash, and also can initiate a communication with the user if needed.
I used a sdk called instabug that gave me steps performed by the user to get a crash. But there are other tools in the market as well which might help in your case.
Is there a way to message a user who sent in a crash report - to ask
them about what was happening right before?
No not possible, because with crash reports Google is not providing any user related information which is required to contact like email,phone number,...
When I did as Parse guided for adding Parse.enableLocalDatastore(this) in my MainActivity onCreate() (with fragments) it caused my app to crash when I was changing the orientation of the device.
My logcat:
06-02 12:13:07.036 14407-14407/com.example.android.donotbelateapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.android.donotbelateapp, PID: 14407
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.donotbelateapp/com.example.android.donotbelateapp.ui.MainActivity}: java.lang.IllegalStateException: `Parse#enableLocalDatastore(Context)` must be invoked before `Parse#initialize(Context)`
Caused by: java.lang.IllegalStateException: `Parse#enableLocalDatastore(Context)` must be invoked before `Parse#initialize(Context)`
However when I added a separate class that extends Application and placed the following Parse-related code in it:
Parse.enableLocalDatastore(this);
Parse.initialize(this, "xxx", "xxx");
the problem was resolved.
Why did I have to use those commands to make it work?
Hmm, well, first, let me just read the error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.donotbelateapp/com.example.android.donotbelateapp.ui.MainActivity}: java.lang.IllegalStateException: `Parse#enableLocalDatastore(Context)` must be invoked before `Parse#initialize(Context)`
Ok, so the error says that Parse.enableLocalDataStore() must be called before Parse.initialize().
Then, you create a class extending Application which you clearly use and in it call Parse.enableLocalDataStore(). Probably early in the application lifecycle, which means it gets called before your Activity calls Parse.initialize().
So, you're confused that when you fixed the problem, the problem was fixed. . .
Anyway, I was curious to see what "Parse guided for adding Parse.enableLocalDatastore(this) in my MainActivity" so I went to this page, helpfully titled "Using the Local DataStore". I then actually read through it. Under section 2, Enable the local datastore, it says (emphasis mine):
TodoListApplication is also where we add in our Parse credentials, set
our default access controls, and set up our app to use Anonymous
Users, so that people can save todos locally without having to log in.
Next, to enable the local datastore, simply add a call to
Parse.enableLocalDatastore() before our call to Parse.initialize():
Recently my error reporting tool started to show this crash (varies slightly depending on the manufacturer of the device due to the webviews implementation)
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:4317)
at android.view.ViewRootImpl.invalidateChild(ViewRootImpl.java:892)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:941)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:4019)
at android.view.View.invalidate(View.java:8621)
at android.webkit.WebView.invalidate(WebView.java:1743)
at android.webkit.WebView.viewInvalidate(WebView.java:4065)
at android.webkit.WebView.invalidateContentRect(WebView.java:4084)
at android.webkit.WebView.setNewPicture(WebView.java:14353)
at android.webkit.WebView$PrivateHandler.handleMessage(WebView.java:13747)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
I think this error comes from the Mopub's implementation (or from other ads sdk mediated with mopub) since I have no webviews in my app.
How can I isolate and determinate if is an error I introduced or a bug in the SDK?
Only UIThread can handle the views (ui), so try to use this code to notify your app UI
runOnUiThread(new Runnable() {
#Override
public void run() { // add your code here
}});
Or you can use the AsyncTask
This error occur when you try to update a UI view in a background thread. Make sure you are not updating any view in your background thread like edit text, text view etc. Update your views in a UI thread. See this for example.
I am creating an android app, and i get spammed by a certain error(not affecting the app functionality). I have like 300k + errors in 5 seconds. I cannot view other errors from my app because of this spam.
Error is as following:
10-12 19:58:25.248 20268-20287/com.example.boacterapp.Pages E/ParseCommandCache﹕saveEventually thread had an error.
java.lang.IllegalStateException: Tried to serialize a command referencing a new, >unsaved object.
at com.parse.ParseCommand.resolveLocalIds(ParseCommand.java:472)
at com.parse.ParseCommand.onPreExecute(ParseCommand.java:371)
at com.parse.ParseRequest$7.then(ParseRequest.java:299)
at com.parse.ParseRequest$7.then(ParseRequest.java:296)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.continueWithTask(Task.java:364)
at com.parse.ParseRequest.executeAsync(ParseRequest.java:296)
at com.parse.ParseRequest.executeAsync(ParseRequest.java:286)
at com.parse.ParseCommandCache.maybeRunAllCommandsNow(ParseCommandCache.java:487)
at com.parse.ParseCommandCache.runLoop(ParseCommandCache.java:611)
at com.parse.ParseCommandCache.access$000(ParseCommandCache.java:26)
at com.parse.ParseCommandCache$2.run(ParseCommandCache.java:146)
Is there a way to apply a filter to exclude a certain error from the logcat?
Thank you in advance.
Try to change the filters in Logging with your package name
Attach a custom log_tag for each class at starting of the class
private static String LOG_TAG = MyClass.class.getName();
In Filter Configuration give your MyClass.class.getName() to filter out
In error log use Log.e(LOG_TAG,"message") this reduce number of loggings