Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NullPointer on toLowerCase but I don't use that method anywhere

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) 
like image 264
Peter Keefe Avatar asked Mar 24 '17 21:03

Peter Keefe


1 Answers

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

like image 193
Teun Vos Avatar answered Sep 22 '22 09:09

Teun Vos