I'm getting the following crash dump in Firebase Crash Reports:
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
bnp.run (bnp.java:56)
java.lang.Thread.run (Thread.java:818)
The problem is that I don't use the String.toLowerCase() method anywhere in the project. In Android Studio, I did Edit->Find In Path for the method and got no results, however, it does appear 100+ times if I search in the libraries. But I cannot find the "bnp.java" anywhere.
Thanks for your help!
Edit: A previous crash report was not proguard-affected and revealed it may be due to google-play-services or Firebase. I only use gms:play-services-places and gms:play-services-auth in my app, along with many Firebase dependencies.
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
bnp.run (:com.google.android.gms.DynamiteModulesC:56)
java.lang.Thread.run (Thread.java:818)
I can't comment yet, so I will post this as a possible solution, but this seems like an error on Google's side. Multiple people are reporting this crash on the exact same device with the exact same region. So it seems Google runs your app on a virtual or automated device and then that device crashes. This device seems to be a Nexus 5x with local us-US and API level 23.
Source: https://code.google.com/p/android/issues/detail?id=233549
I got this error when my code was trying to create a connection to certain amqp service using an invalid URL. Once I modified it to the proper value, the exception is gone. So check your code.
My app ran into a similar issue.
When launched in Stock android devices(Mi A1), the App crashed with " keeps stopping popup". The Crashlytics in Fabric reported it as the
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
at bfx.run(:com.google.android.gms.dynamite_dynamitemodulesc#13452060#13.4.52 (040708-202483333):80)
at java.lang.Thread.run(Thread.java:818)
But when I checked the Pre-launch report of the Release management in Google Play Console, it showed that the app was crashing for Pixel & Pixel 2 for an entirely different reason. The issue shown was
FATAL EXCEPTION: main Process: in.quickall.quickall, PID: 8345
java.lang.RuntimeException: Unable to start activity ComponentInfo{in.quickall.quickall/in.quickall.quickall.Main.MainActivity}: android.content.res.Resources$NotFoundException: Drawable in.quickall.quickall:drawable/splash_screen with resource ID #0x7f0700c0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
And the issue started from the APK version were I implemented the code (given below) to remove the white screen on launch.
<style name="SplashTheme" parent="AppTheme">
<item name="android:windowBackground">#drawable/splash_screen</item>
</style>
I removed this piece of code and now the Pre-launch report shows it as working fine in the Pixel devices.
Now the app launches correctly, but has to have the white screen at launch.
Related
I am trying to launch my app into Production on Google Playstore. I have used Flutter to create the app. But in the pre-launch report I am getting error:
Stacktrace:
java.lang.RuntimeException: Unable to destroy activity {com.stech.ebox_expenses/com.example.ebox_expenses.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.e.c(androidx.lifecycle.h)' on a null object reference
FATAL EXCEPTION: main
Process: com.stech.ebox_expenses, PID: 12391
java.lang.RuntimeException: Unable to destroy activity {com.stech.ebox_expenses/com.example.ebox_expenses.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.e.c(androidx.lifecycle.h)' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4504)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4522)
at android.app.ActivityThread.-wrap5(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1697)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6647)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.e.c(androidx.lifecycle.h)' on a null object reference
at com.mr.flutter.plugin.filepicker.FilePickerPlugin.j(Unknown Source:21)
at com.mr.flutter.plugin.filepicker.FilePickerPlugin.e(Unknown Source:0)
at io.flutter.embedding.engine.c.h(Unknown Source:54)
at io.flutter.embedding.android.f.o(Unknown Source:58)
at io.flutter.embedding.android.e.G(Unknown Source:7)
at io.flutter.embedding.android.e.onDestroy(Unknown Source:11)
at android.app.Activity.performDestroy(Activity.java:7241)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnDestroy(MonitoringInstrumentation.java:1)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4491)
... 9 more
I try to find anything discussing this and I found one Stackoverflow question which was recieved badly and downvoted; Here's a ref to the post. I am not to sure why this is happening and I am not sure whether it is external problem which I can fix or an internal bug.
When I downloaded the app from the Playstore when it was production, it displayed a white screen when I opened it and stayed like this. I am not sure if me getting this error is a result of that or not either.
Any help on the matter will be appreciated!
I have managed to fix both problems which I was having. I fixed the first problem of this error by updating file_picker library to version 2.10. The issue was fixed in version 2.0.12. I also fixed the second issue of the white screen in the app when it started by downgrading to: classpath 'com.android.tools.build:gradle:3.4.3'. Here's the reference to the post which helped me.
Crashlytics is reporting NullPointerException related to Auto Fill as shown below:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method
'boolean com.android.server.autofill.RemoteFillService$PendingRequest.cancel()' on a null object reference
at android.os.Parcel.readException(Parcel.java:1965)
at android.os.Parcel.readException(Parcel.java:1905)
at android.app.IActivityManager$Stub$Proxy.reportAssistContextExtras(IActivityManager.java:8297)
at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:3210)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by android.os.RemoteException: Remote stack trace:
at com.android.server.autofill.RemoteFillService.cancelCurrentRequest(RemoteFillService.java:177)
at com.android.server.autofill.Session.cancelCurrentRequestLocked(Session.java:465)
at com.android.server.autofill.Session.access$1000(Session.java:118)
at com.android.server.autofill.Session$1.onHandleAssistData(Session.java:322)
at com.android.server.am.ActivityManagerService.reportAssistContextExtras(ActivityManagerService.java:14713)
However, the stack does not include anything from my app yet crash is happening on my side.
This is not an issue with your app but with specific Android OEMs. Seems to be happening more frequently on Samsung Devices and not seen on Pixel Devices. Here is an issue report to Google which is closed as 'Won't Fix'.
https://issuetracker.google.com/issues/123311621
Since the crash is happening because of autofill. I would recommend disabling autofill for the specific view by setting importanForAutofill as false/no.
https://developer.android.com/reference/android/R.attr.html#importantForAutofill
When request permissions, the system show an error message, "System UI has stopped" and keeps restarting until you give the permissions;
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.systemui, PID: 3910
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.systemui.statusbar.phone.NavigationBarFragment.onKeyguardOccludedChanged(boolean)' on a null object reference
at com.android.systemui.statusbar.phone.StatusBar.onKeyguardOccludedChanged(StatusBar.java:3843)
at com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager.setOccluded(StatusBarKeyguardViewManager.java:277)
at com.android.systemui.keyguard.KeyguardViewMediator.handleSetOccluded(KeyguardViewMediator.java:1176)
at com.android.systemui.keyguard.KeyguardViewMediator.-wrap14(Unknown Source:0)
at com.android.systemui.keyguard.KeyguardViewMediator$4.handleMessage(KeyguardViewMediator.java:1531)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
I've tried those answers[1][2], none of them solved my problem.
This is happening only in the emulator, on physical devices it's OK;
[1] Unfortunately System UI has stopped
[2] Android Studio gradle Error: your emulator is out of date
May be its too late but this might help others, its a bug on the emulator's soft buttons, the workaround is to increase the resolution of the emulator and don't forget to add soft-button.
This helped me out
I have an Android app with Dropbox support. Lately I've started getting an exception for some users. I can not reproduce it. It affects just a few users. The exception happens when Dropbox tries to access /sdk-version.txt which is one of their resources. On Android Studio I can see the resource is there, here is a screenshot:
And like I said, it doesn't happen for me or for most of my users. If I use apktool on my apk, the sdk-version.txt file shows up on a folder called unknown. I see a lot of other files there but most have a package, this one doesn't. Not sure if that matters.
I also have this line on my gradle file multiDexKeepFile file('multidex-config.txt') and in there I have:
com.dropbox.core.DbxRequestUtil
com.dropbox.core.http.HttpRequestor
com.dropbox.core.DbxSdkVersion
Those were all attempts at fixing this but it didn't help.
So far the exception has happened on Android 5 and 6 across multiple manufacturers. This is the exception:
Fatal Exception: java.lang.ExceptionInInitializerError
at com.dropbox.core.DbxRequestUtil.buildUserAgentHeader(DbxRequestUtil.java:151)
at com.dropbox.core.DbxRequestUtil.addUserAgentHeader(DbxRequestUtil.java:136)
at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:233)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:107)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:284)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:102)
at com.dropbox.core.v2.users.DbxUserUsersRequests.getCurrentAccount(DbxUserUsersRequests.java:120)
at mypackage.UserDropbox.(UserDropbox.java)
at mypackage.DropboxHelper$1.run(DropboxHelper.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:81smiling face with sunglasses
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.jar.JarVerifier.removeMetaEntries()' on a null object reference
at java.util.jar.JarFile.getInputStream(JarFile.java:381)
at libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222)
at java.net.URL.openStream(URL.java:470)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444)
at java.lang.Class.getResourceAsStream(Class.java:1412)
at com.dropbox.core.DbxSdkVersion.loadLineFromResource(DbxSdkVersion.java:34)
at com.dropbox.core.DbxSdkVersion.loadVersion(DbxSdkVersion.java:56)
at com.dropbox.core.DbxSdkVersion.(DbxSdkVersion.java)
at com.dropbox.core.DbxRequestUtil.buildUserAgentHeader(DbxRequestUtil.java:151)
at com.dropbox.core.DbxRequestUtil.addUserAgentHeader(DbxRequestUtil.java:136)
at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:233)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:107)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:284)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:102)
at com.dropbox.core.v2.users.DbxUserUsersRequests.getCurrentAccount(DbxUserUsersRequests.java:120)
at mypackage.UserDropbox.(UserDropbox.java)
This isn't a direct solution.
You can integrate fabric clashlytics into your app to get a full report on the cause of the exception and information on the type and OS of devices experiencing the Exception.
I currently have an issue when I deploy my Titanium alloy application to the play store, when I launch it for the first time it crashes. This only happens in production.
When I reported the issue the following is what I found in the developer console:
java.lang.NullPointerException: Attempt to invoke virtual method
'android.content.res.Resources android.content.Context.getResources()'
on a null object reference at
android.view.ViewConfiguration.get(ViewConfiguration.java:359) at
android.view.View.(View.java:3663) at
android.view.View.(View.java:3758) at
android.widget.TextView.(TextView.java:650) at
android.widget.TextView.(TextView.java:645) at
android.widget.TextView.(TextView.java:641) at
android.widget.TextView.(TextView.java:637) at
ti.modules.titanium.ui.widget.TiUILabel$1.(TiUILabel.java:58)
at ti.modules.titanium.ui.widget.TiUILabel.(TiUILabel.java:57)
at ti.modules.titanium.ui.LabelProxy.createView(LabelProxy.java:63)
at
org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:490)
at
org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476)
at
org.appcelerator.titanium.proxy.TiViewProxy.handleToImage(TiViewProxy.java:965)
at
org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:280)
at android.os.Handler.dispatchMessage(Handler.java:98) at
android.os.Looper.loop(Looper.java:211) at
android.app.ActivityThread.main(ActivityThread.java:5373) 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:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
Since I don't know where excalty it went wrong since it is in production I don't know what code to supply. I understand it is a null reference error, but nowhere in my application I use a getResources() function, or something like that.
The second time I run it it just works
Titanium Version: 6.0.1.GA
Mac OS X: 10.12.3
Target android SDK: 23
Android version: 5.1
Any help would be appriciated!