There are some errors which only occur in some specific mobiles and that are shown in crashlytics. In my mobile device app working fine but there are some mobiles where the screen is crashing. I am unable to identify how to resolve that issue without knowing the cause of error. For now it is showing me this error which I have pasted below.
This is the title on Crashlytics .
ConsumerSingleObserver.java line 49
and this exception is showing
Fatal Exception: io.reactivex.rxjava3.exceptions.CompositeException: 2 exceptions occurred.
at io.reactivex.rxjava3.internal.observers.ConsumerSingleObserver.onError(ConsumerSingleObserver.java:49)
at io.reactivex.rxjava3.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:79)
at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
at android.os.Handler.handleCallback(Handler.java:914)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
Caused by io.reactivex.rxjava3.exceptions.CompositeException$a: Multiple exceptions (2)
|-- androidx.room.rxjava3.EmptyResultSetException: Query returned empty result set: select * from FamilyDetails where serverId=?
at b.g.i.a.f.i$g.call(FamilyDetailsDao_Impl.java:90)
|-- java.lang.NullPointerException: null
at b.g.n.d.q.i.k(ConsentStepViewModel.kt:2)
CompositeException is usually thrown when your error handler itself throws an exception when it's handling an error thrown in the stream.
Make sure your error handling code is not throwing any exceptions.
Usually the stack trace will have the root cause below the CompositeException, prefixed with Caused by.
Related
I use Retrofit 2.8.1 to make a network call. When I disable my network connection, the app crashes. But strangely I've got nothing about stack trace on logcat. Just says:
E/AndroidRunTime: FATAL EXEPTION: main
Process: ir.kaaveh.recyclerviewmvvm, PID: 31179
When I surround my network call with try/catch and use e.printStackTrace(), I find out that:
java.net.UnknownHostException: Unable to resolve host "www.omdbapi.com": No address associated with hostname
Why Android studio don't show me stack trace in this case? Usually, it tells you which line causes throw exception.
You can find the full source code here.
Crashlytics report for my android app shows that a considerable number of my users are getting the following null pointer exception. Most of my users who get this error are on Android 6. It happens only when the build is obfuscated.
The crash is caused by a call to,
org.stellar.sdk.Server(String uri)
How do I fix this? Any help would be appreciated.
Caused by java.lang.NullPointerException: Attempt to invoke virtual method
'java.util.Enumeration java.security.KeyStore.aliases()' on a null object reference
at com.android.org.conscrypt.TrustManagerImpl.acceptedIssuers(TrustManagerImpl.java:185)
at com.android.org.conscrypt.TrustManagerImpl.getAcceptedIssuers(TrustManagerImpl.java:603)
at shadow.okhttp3.internal.platform.Platform.buildTrustRootIndex(Platform.java)
at shadow.okhttp3.internal.platform.Platform.afterHandshake(Platform.java)
at shadow.okhttp3.internal.tls.CertificateChainCleaner.get(CertificateChainCleaner.java:8)
at shadow.okhttp3.OkHttpClient.<init>(OkHttpClient.java:8)
at shadow.okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:7)
at org.stellar.sdk.Server.<init>(Server.java:7)
at com.myapp.MyStellarManager.<clinit>(MyStellarManager.java)
at com.myapp.MainVM$observableData$1.invokeSuspend(MainVM.java:2)
at kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(Intrinsics.java)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:2)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$getCorePoolSize$p(CoroutineScheduler.java)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.java:18)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:18)
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 am using newrelic for crash reports. In newrelic crash list I can see a exception inside Android SharedPreferenceImpl. Can someone help me debug the crash cause ?
crash:
EXCEPTION java.lang.ArrayIndexOutOfBoundsException
LOCATION FastXmlSerializer.java line 70 in FastXmlSerializer.append()
TIME Today, xx:yy
MESSAGE length=0; index=699
Huawei Device (HUAWEI Y320-U30) Android 4.2.2 (C307B600)
Below is complete stack trace provided by newrelic
java.lang.ArrayIndexOutOfBoundsException: length=0; index=699
at com.android.internal.util.FastXmlSerializer.append()(FastXmlSerializer.java:70)
at com.android.internal.util.FastXmlSerializer.startTag()(FastXmlSerializer.java:335)
at com.android.internal.util.XmlUtils.writeValueXml()(XmlUtils.java:468)
at com.android.internal.util.XmlUtils.writeMapXml()(XmlUtils.java:245)
at com.android.internal.util.XmlUtils.writeMapXml()(XmlUtils.java:185)
at android.app.SharedPreferencesImpl.writeToFile()(SharedPreferencesImpl.java:598)
at android.app.SharedPreferencesImpl.access$800()(SharedPreferencesImpl.java:52)
at android.app.SharedPreferencesImpl$2.run()(SharedPreferencesImpl.java:513)
at java.util.concurrent.ThreadPoolExecutor.runWorker()(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run()(ThreadPoolExecutor.java:573)
at java.lang.Thread.run()(Thread.java:838)
When the Eclipse debugger stops due to an exception in my Android project, I can see the exception message in the variables window (e.g., "null pointer"), but how can I find out what Java code line my app was at when the exception occurred?
I can see a stack trace in the LH window, but selecting any of them doesn't seem to reveal anything that relates to my code.
Look in the LogCat view (in Eclipse Window-->Show View-->Other...-->Android-->LogCat) or in the adb logcat output from a terminal. The place to look will likely be the first mention of one of your classes below the line:
E/AndroidRuntime( ####): Caused by: