Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotSerializableException attached to the crash logs instead of real crash logs when there is an error in the coroutine. #3901

Closed
MohitMaliFtechiz opened this issue Jun 27, 2024 · 0 comments · Fixed by #3904
Assignees
Labels
Milestone

Comments

@MohitMaliFtechiz
Copy link
Collaborator

Describe the bug
The crash report shows NotSerializableException when there is an error in the coroutine instead of the actual error see #3902. Coroutine has this issue when there is an error occured within the Coroutine.

Expected behavior
It should catch the real exception and attach it to the logs so that we can fix the actual problem.

Environment

  • Version of Kiwix Android: 3.11.0

Logs

Exception java.lang.RuntimeException:
  at android.os.Parcel.writeSerializable (Parcel.java:1770)
  at android.os.Parcel.writeValue (Parcel.java:1718)
  at android.os.Parcel.writeArrayMapInternal (Parcel.java:785)
  at android.os.BaseBundle.writeToParcelInner (BaseBundle.java:1510)
  at android.os.Bundle.writeToParcel (Bundle.java:1181)
  at android.os.Parcel.writeBundle (Parcel.java:825)
  at android.content.Intent.writeToParcel (Intent.java:9704)
  at android.app.IActivityManager$Stub$Proxy.startActivity (IActivityManager.java:4369)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1631)
  at android.app.ContextImpl.startActivity (ContextImpl.java:969)
  at android.app.ContextImpl.startActivity (ContextImpl.java:936)
  at android.content.ContextWrapper.startActivity (ContextWrapper.java:366)
  at org.kiwix.kiwixmobile.core.main.CoreMainActivity.onCreate$lambda-0 (CoreMainActivity.java:110)
  at java.lang.ThreadGroup.uncaughtException (ThreadGroup.java:1068)
  at java.lang.ThreadGroup.uncaughtException (ThreadGroup.java:1063)
  at kotlinx.coroutines.CoroutineExceptionHandlerImplKt.handleCoroutineExceptionImpl (CoroutineExceptionHandlerImpl.kt:61)
  at kotlinx.coroutines.CoroutineExceptionHandlerKt.handleCoroutineException (CoroutineExceptionHandler.kt:33)
  at kotlinx.coroutines.DispatchedTask.handleFatalException (DispatchedTask.kt:146)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:115)
  at kotlinx.coroutines.internal.LimitedDispatcher.run (LimitedDispatcher.kt:42)
  at kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:95)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:570)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:750)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:677)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:664)
Caused by java.io.NotSerializableException:
  at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1233)
  at java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1597)
  at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1558)
  at java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1481)
  at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1227)
  at java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1597)
  at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1558)
  at java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1481)
  at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1227)
  at java.io.ObjectOutputStream.writeObject (ObjectOutputStream.java:347)
  at java.util.ArrayList.writeObject (ArrayList.java:762)
  at java.lang.reflect.Method.invoke
  at java.io.ObjectStreamClass.invokeWriteObject (ObjectStreamClass.java:977)
  at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1545)
  at java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1481)
  at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1227)
  at java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1597)
  at java.io.ObjectOutputStream.defaultWriteObject (ObjectOutputStream.java:456)
  at java.lang.Throwable.writeObject (Throwable.java:977)
  at java.lang.reflect.Method.invoke
  at java.io.ObjectStreamClass.invokeWriteObject (ObjectStreamClass.java:977)
  at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1545)
  at java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1481)
  at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1227)
  at java.io.ObjectOutputStream.writeObject (ObjectOutputStream.java:347)
  at android.os.Parcel.writeSerializable (Parcel.java:1765)
@MohitMaliFtechiz MohitMaliFtechiz added this to the 3.11.1 milestone Jun 27, 2024
@MohitMaliFtechiz MohitMaliFtechiz self-assigned this Jun 27, 2024
@MohitMaliFtechiz MohitMaliFtechiz changed the title NotSerializableException attached to the crash logs when there is an error in the coroutine. NotSerializableException attached to the crash logs instead of real crash logs when there is an error in the coroutine. Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment