Closed ivabra closed 2 years ago
Thanks for reporting this to us @ivabra. Let me try to help.
It would be most helpful if you could send us logs from the Customer.io SDK so we can debug this easier.
Follow these steps, please:
win [at] customer.io
referencing this GitHub issue in the body of the message. We will take a look at the logs to see what we think this issue is for.
@levibostian Thanks, will do, but the thing is that the crash has never occurred during development and we only getting reports from some of our production users. We had to fork the repository and use lenient()
to temporary stop crashes for these users.
@ivabra Thanks for the updates. The crash should be fixed in 2.1.1
. Please try the latest release and re-open it if the crash still occurs.
I'm using the last version of CustomerIO 2.1.1
, however, this crash still happens.
Someone could help me?
Stack trace:
Fatal Exception: com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
at com.squareup.moshi.JsonReader.syntaxError(JsonReader.java:243)
at com.squareup.moshi.JsonUtf8Reader.checkLenient(JsonUtf8Reader.java:1152)
at com.squareup.moshi.JsonUtf8Reader.doPeek(JsonUtf8Reader.java:384)
at com.squareup.moshi.JsonUtf8Reader.peek(JsonUtf8Reader.java:206)
at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:38)
at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:70)
at io.customer.sdk.queue.QueueStorageImpl.get(QueueStorage.kt:208)
at io.customer.sdk.queue.QueueRunRequestImpl.runTasks(QueueRunRequest.kt:37)
at io.customer.sdk.queue.QueueRunRequestImpl.goToNextTask(QueueRunRequest.kt:84)
at io.customer.sdk.queue.QueueRunRequestImpl.runTasks(QueueRunRequest.kt:43)
at io.customer.sdk.queue.QueueRunRequestImpl.goToNextTask(QueueRunRequest.kt:84)
at io.customer.sdk.queue.QueueRunRequestImpl.runTasks(QueueRunRequest.kt:43)
at io.customer.sdk.queue.QueueRunRequestImpl.runTasks$default(QueueRunRequest.kt:26)
at io.customer.sdk.queue.QueueRunRequestImpl.run(QueueRunRequest.kt:23)
at io.customer.sdk.queue.QueueImpl.run(Queue.kt:99)
at io.customer.sdk.queue.QueueImpl$runAsync$1.invokeSuspend(Queue.kt:109)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Hey, @SeijiFukuoka thanks for writing in, that's odd, would it be possible to share more logs? you can enable logs by setting the configuration logLevel to debug .
Unfortunately, I don't have more logs about, it because I can't reproduce this crash. I have only firebase crashlytics log.
I have some information about firebase crashlytics stack log, I don't know if it helps.
@SeijiFukuoka Thanks for sharing the logs, it will help. This looks like coming from a different path, we'll make this parsing safe too and include in our next release. Meanwhile, please let us know if you face more occurrences of this or if there is any similar crash.
@SeijiFukuoka 3.1.0-alpha.1
is out with the fix, can you please check and confirm, if possible?
Ok, @Shahroz16. I will put this version on our next release and bring updates soon.
Version(s) of SDK bug appears: 2.0.1 Android versions: 9-12 Kotlin version: 1.7.10
Current Behavior
The app is crashed in first 5 seconds.
Steps to Reproduce
Initialise customer io sdk with this code:
Expected Behavior
The app shouldn't be crashed.
Any other info?
Stack trace: