ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

Indexing link generated by ARK Shelf Desktop leads to a crash #287

Closed mdrlzy closed 2 years ago

mdrlzy commented 2 years ago
kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 199: Encountered an unknown key 'created_time'.
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: .....top/actions/runs/2677480454","created_time":{"secs_since_epo.....
    at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
    at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
    at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:524)
    at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:520)
    at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:165)
    at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:153)
    at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:92)
    at space.taran.arknavigator.mvp.model.repo.kind.JsonLink$$serializer.deserialize(LinkKindFactory.kt:48)
    at space.taran.arknavigator.mvp.model.repo.kind.JsonLink$$serializer.deserialize(LinkKindFactory.kt:48)
    at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
    at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:36)
    at kotlinx.serialization.json.JvmStreamsKt.decodeFromStream(JvmStreams.kt:65)
    at space.taran.arknavigator.mvp.model.repo.kind.LinkKindFactory.fromPath(LinkKindFactory.kt:52)
    at space.taran.arknavigator.mvp.model.repo.kind.LinkKindFactory.fromPath(LinkKindFactory.kt:10)
    at space.taran.arknavigator.mvp.model.repo.kind.GeneralKindFactory.fromPath(ResourceKindFactory.kt:34)
    at space.taran.arknavigator.mvp.model.repo.index.ResourceMeta$Companion.fromPath(ResourceMeta.kt:29)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex$reindexRoot$2.invokeSuspend(PlainResourcesIndex.kt:137)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex$reindexRoot$2.invoke(Unknown Source:8)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex$reindexRoot$2.invoke(Unknown Source:4)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex.reindexRoot$app_release(PlainResourcesIndex.kt:108)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex$reindex$2.invokeSuspend(PlainResourcesIndex.kt:72)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex$reindex$2.invoke(Unknown Source:8)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex$reindex$2.invoke(Unknown Source:4)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
    at space.taran.arknavigator.mvp.model.repo.index.PlainResourcesIndex.reindex(PlainResourcesIndex.kt:71)
    at space.taran.arknavigator.mvp.model.repo.index.ResourcesIndexRepo$loadFromDatabase$2.invokeSuspend(ResourcesIndexRepo.kt:42)
    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.kt: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)
kirillt commented 2 years ago

We need to reproduce this using Desktop version. It seemed to me that @nagato-chan already made Desktop version storing .link files without created_date.

Or maybe we should just move "Link to web" resource kind into arklib.

kirillt commented 2 years ago

https://github.com/ARK-Builders/arklib/issues/10 https://gitcoin.co/issue/29182