Firebase Authentication using Google fails below Android Lollipop - android

I have an app which stores data on Firebase and needs authentication (google) for the same. The login seems to work on other devices, however when I try to login from Nexus 7 it simply fails.
After some research I found some suggestions and I tried updating firebase app settings, adding new SHA and downloading the latest google-services.json but nothing seems to work.
Below is the log.
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9001, result=0, data=null} to activity
{com.culminanttech.carmate/com.culminanttech.carmate.GoogleSignInActivity}:
java.lang.NullPointerException
at android.app.ActivityThread.deliverResults(ActivityThread.java:3351)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3394)
at android.app.ActivityThread.access$1300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.culminanttech.carmate.GoogleSignInActivity.onActivityResult(GoogleSignInActivity.java:127)
at android.app.Activity.dispatchActivityResult(Activity.java:5423)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3347)... 11 more
java.lang.NullPointerException
at com.culminanttech.carmate.GoogleSignInActivity.onActivityResult(GoogleSignInActivity.java:127)
at android.app.Activity.dispatchActivityResult(Activity.java:5423)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3347)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3394)
at android.app.ActivityThread.access$1300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
EDIT: I tried this example also but I get the same crash.
2nd EDIT: After testing on some devices I realised that it seems to work on Lollipop and above only. Wonder what is the issue below lollipop. Does it have to do something with the play services?

Related

NullPointerException in pre-launch report

I am now having several failures in the google-play pre-launch report. But I am not sure what to do about this as I do not have the crashing part under control.
This is the stacktrace
FATAL EXCEPTION: main
Process: com.google.android.apps.docs, PID: 12587
java.lang.NullPointerException
at com.google.android.apps.docs.shareitem.UploadSharedItemActivityDelegate.a(UploadSharedItemActivityDelegate.java:352)
at com.google.android.apps.docs.shareitem.UploadSharedItemActivityDelegate.b(UploadSharedItemActivityDelegate.java:315)
at gm.run(BaseActivity.java:236)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5097)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Seems to affect Motorola mainly:

Sudden jump in particular crash(NoClassDefFoundError) in fabric

Can any one please help with debugging following crash log
Fatal Exception: java.lang.NoClassDefFoundError: us
at up.(SourceFile:145)
at ixc.e(SourceFile:250)
at bqf.run(SourceFile:74)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5433)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(NativeStart.java)
I got above crash log from fabric, So I don't know why this is happening.
99% of time it is in Android version 4.3 to 4.4.4

java.io.FileNotFoundException on posting data from Android

I am trying to post data from my android device to server through HTTPS Url, I am getting this error
java.io.FileNotFoundException:https://URL
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:246)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Can anyone help me?

com.android.org.chromium.content.browser.ResourceExtractor.getOutputDirFromContext(ResourceExtractor.java:307)

I am getting a strange error in android 4.4, this seems to be in webview, anybody have any idea to fix the bug, since the crash looks native, and i am not able figure out which class has the crash, so that i can handle the exception
java.lang.NullPointerException
at com.android.org.chromium.content.browser.ResourceExtractor.getOutputDirFromContext(ResourceExtractor.java:307)
at com.android.org.chromium.content.browser.ResourceExtractor.<init>(ResourceExtractor.java:266)
at com.android.org.chromium.content.browser.ResourceExtractor.get(ResourceExtractor.java:232)
at com.android.org.chromium.content.browser.BrowserStartupController.prepareToStartBrowserProcess(BrowserStartupController.java:266)
at com.android.org.chromium.content.browser.BrowserStartupController.startBrowserProcessesSync(BrowserStartupController.java:186)
at com.android.org.chromium.android_webview.AwBrowserProcess$1.run(AwBrowserProcess.java:49)
at com.android.org.chromium.base.ThreadUtils.runOnUiThreadBlocking(ThreadUtils.java:64)
at com.android.org.chromium.android_webview.AwBrowserProcess.start(AwBrowserProcess.java:45)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.startChromiumLocked(WebViewChromiumFactoryProvider.java:185)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.access$100(WebViewChromiumFactoryProvider.java:58)
at com.android.webview.chromium.WebViewChromiumFactoryProvider$1.run(WebViewChromiumFactoryProvider.java:123)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5635)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)

java.lang.RuntimeException: createWindowSurface failed EGL_BAD_ALLOC

java.lang.RuntimeException: createWindowSurface failed EGL_BAD_ALLOC
at android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1359)
at android.view.HardwareRenderer$GlRenderer.createEglSurface(HardwareRenderer.java:1245)
at android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:1062)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1877)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1256)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6652)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)
at android.view.Choreographer.doCallbacks(Choreographer.java:613)
at android.view.Choreographer.doFrame(Choreographer.java:583)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:799)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Yesterday, a user reported this bug in Google Play in one of my apps. Don't know why this occured. I am not sure atleast how to reproduce this. I found a similar question with no answers.

Categories

Resources