Firebase Analytics - NPE in CrashReport - android

I've just migrated to Firebase Analytics 9.0.0 and when tried to launch the app on emulator api10/x86, then the following exception is thrown by the services. Any ideas how to work around that?
05-23 15:36:44.371 1280-1280/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.szyk.myheart/com.szyk.myheart.MyHeartActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.google.android.gms.flags.impl.FlagProviderImpl.getBooleanFlagValue(Unknown Source)
at com.google.android.gms.internal.zzsd$zza.zzb(Unknown Source)
at com.google.android.gms.internal.zzsd$zza.zza(Unknown Source)
at com.google.android.gms.internal.zzsf.zzb(Unknown Source)
at com.google.android.gms.internal.zzsd.get(Unknown Source)
at com.google.firebase.crash.FirebaseCrash.getInstance(Unknown Source)
at com.google.firebase.crash.FirebaseCrash.zzOW(Unknown Source)
at com.google.firebase.crash.FirebaseCrash.log(Unknown Source)
at com.szyk.extras.activities.UniversalActionBarActivity.onCreate(UniversalActionBarActivity.java:46)
at com.szyk.myheart.MyHeartActivity.onCreate(MyHeartActivity.java:99)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
The code is nothing more than activity with:
#Override
protected void onCreate(#Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FirebaseCrash.log("onCreate: " + getClass().getSimpleName());
}

Unfortunately, using Firebase on devices or emulators without Play Services isn't a supported use case. Crash Reporting will fail to initialize, and you will see a message to that effect in logcat when the app launches. However, if you are also seeing a crash when calling a method after failed init, that seems like a problem we should correct.
It sounds like you are doing the best thing you can by suppressing the exception, but I'd rather not make you go through that, so I'll pass it on as feedback to the team.

Just small correction on what Doug mentioned. Firebase Crash Reporting is not supported on non-play devices. Firebase Analytics in particular and some of the other Firebase product do support non-play devices.

Related

google app invites(beta) not working in android 2.3.6

Google App Invites(Beta) is not working in android 2.3.6 devices.
I tried out in a 4 devices of different versions & it failed only in 2.3.6.
Kindly point me to resources to resolve this error!
Below is the stacktrace
06-16 08:49:13.939 6396-6396/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.gms/com.google.android.gms.appinvite.AppInviteActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.google.android.gms.appinvite.ui.widget.g.<init>(SourceFile:167)
at com.google.android.gms.appinvite.ui.widget.s.b(SourceFile:80)
at com.google.android.gms.appinvite.ui.widget.d.a(SourceFile:76)
at com.google.android.gms.appinvite.ui.context.h.a(SourceFile:409)
at android.support.v4.app.Fragment.b(SourceFile:1786)
at android.support.v4.app.s.a(SourceFile:953)
at android.support.v4.app.s.a(SourceFile:1136)
at android.support.v4.app.a.run(SourceFile:739)
at android.support.v4.app.s.h(SourceFile:1499)
at android.support.v4.app.l.onStart(SourceFile:548)
at com.google.android.gms.appinvite.AppInviteActivity.onStart(SourceFile:270)

java.lang.NoClassDefFoundError when calling DolbyAudioProcessing.getDolbyAudioProcessing

I have integrated Dolby_audio_plugin_api_v1.1.1.0 into my Android app and am seeing this stack trace in a handful of cases:
java.lang.NoClassDefFoundError: com.dolby.dap.DsClientManager$AppActivityLifecycleCallbacks
at com.dolby.dap.DsClientManager.(DsClientManager.java:196)
at com.dolby.dap.DolbyAudioProcessing.(DolbyAudioProcessing.java:143)
at
com.dolby.dap.DolbyAudioProcessing.getDolbyAudioProcessing(DolbyAudioProcessing.java:125)
at com.houseofhighfives.saddest_trombone.Main.onCreate(Main.java:44)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(NativeStart.java)
Following the examples on the Dolby dev site, this is the call that tries to initialize the DolbyAudioProcessing instance:
mDolbyAudioProcessing = DolbyAudioProcessing.getDolbyAudioProcessing(this, PROFILE.MUSIC, this);
According to Crashlytics, all instances were on a Samsung GT-S5360B or GT-S5360L, running Android 2.3.6.
Very minor thing, given how infrequent it is, but it makes me curious. Has anyone else seen this before?
So this turned out to be a because the AppActivityLifecycleCallbacks is an ICS API Level interface. I should have been doing SDK_LEVEL check before calling DolbyAudioProcessing.getDolbyAudioProcessing(). – mmcmahon

App crashes when trying to extend SherlockActivity in android studio

After importing the actionbarsherlock module, my app crashes on any activity that extends the SherlockActivity. I am not sure if I had imported it incorrectly or something needs to be adjusted but I have followed a guide that was previously posted here on stackoverflow. If i extend Activity and not sherlockActivity there will be no crash.
Guide https://stackoverflow.com/a/16591272/1671933
Logcat
05-24 08:41:46.072 1241-1241/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.example.sandbox.TestingCam
at com.example.sandbox.LoginActivity$CheckLogin.onPostExecute(LoginActivity.java:204)
at com.example.sandbox.LoginActivity$CheckLogin.onPostExecute(LoginActivity.java:155)
at android.os.AsyncTask.finish(AsyncTask.java:417)
at android.os.AsyncTask.access$300(AsyncTask.java:127)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
You need to make sure that the dependency scope is set to "compile". In some cases it seem to be set to "provided" which will cause a NoClassDefFoundError.

Failed to register input channel - live wallpaper

I encountered similar problem as this.
The crash report is from Google Play and I can't reproduce it by myself. I tried to download Launcher Pro but that wasn't causing any troubles.
Here is the stack trace:
java.lang.RuntimeException: Failed to register input channel. Check logs for details.
at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:534)
at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:670)
at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:898)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)

AdWhirl with Admob bug fix

Updated to the latest version of AdWhirl and AdMob SDK but getting a known error from the AdMob SDK in Android 2.1-update1. Found in this thread https://groups.google.com/forum/#!topic/google-admob-ads-sdk/cNxRgIUHJH0
but it refers to only and AdMob fix not AdWhirl any clue what changes can be made to the AdWhirl SDK to fix this?
Thanks In Advance!
java.lang.NullPointerException
at android.webkit.WebView.getSettings(WebView.java:2791)
at android.webkit.WebView.onWindowFocusChanged(WebView.java:3616)
at android.view.View.dispatchWindowFocusChanged(View.java:3764)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:754)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1819)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4370)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
How about this one:
java.lang.NullPointerException
at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:227)
at com.adwhirl.AdWhirlLayout.access$3(AdWhirlLayout.java:215)
at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:410)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)
The issue is not in the AdWhirl code, or even the AdMob code. This is a NullPointerException in the Android WebView, and there is no known workaround for the AdMob/AdWhirl code. This shouldn't be happening that often, but if it really is a deal breaker, you may want to turn down the number of requests you're sending to AdMob.
Yes, I also have this problem.
My workaround: extend AdWhirlLayout, override dispatchWindowFocusChanged and every other method that have this exception occurring and catch the exception.

Categories

Resources