Skip to content

MalformedJsonException: Unterminated string occurs infrequently #1273

@gbakeman

Description

@gbakeman

Checklist

  • I've already searched in existing issues and haven't found a similar problem reported.
  • I'm using the latest version of the app
  • This error caused the app to crash
  • This error is reproducible

Which category best fits this error?

Feed Sync

App version

0.16.1

Reproduction steps

Unclear how to reproduce, happens infrequently and typically with the app in background and/or screen off. Syncing to FreshRSS server 1.28.1. Hopefully easy enough to catch exceptions like this and implement further functionality to troubleshoot incomplete/corrupt streams of data.

Crash report

Device: OnePlus ONEPLUS A6013
System: Android 9 (API 28)

Stack trace: 

.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 3 path $.
	at com.google.gson.Gson.fromJson(Gson.java:22)
	at me.ash.reader.domain.data.DiffMapHolder$commitDiffsFromCache$1.invokeSuspend(DiffMapHolder.kt:66)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:8)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:93)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@1bac0be, Dispatchers.IO]
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 3 path $.
	at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:18)
	at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:124)
	at com.google.gson.stream.JsonReader.nextString(JsonReader.java:35)
	at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:27)
	at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:104)
	at com.google.gson.Gson.fromJson(Gson.java:18)
	... 6 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguntriagedThis issue hasn't been triaged yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions