Skip to content

Errors on JetStream #117

@lamrongol

Description

@lamrongol

These may occur only on Java, but following error sometimes occur.

MissingFieldException: Field 'handle' for Identity

Detail is:

kotlinx.serialization.MissingFieldException: Field 'handle' is required for type with serial name 'work.socialhub.kbsky.stream.entity.app.bsky.model.Identity', but it was missing at path: $.identity
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:95)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:78)
	at work.socialhub.kbsky.stream.entity.app.bsky.model.Event$$serializer.deserialize(Event.kt:6)
	at work.socialhub.kbsky.stream.entity.app.bsky.model.Event$$serializer.deserialize(Event.kt:6)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:165)
	at work.socialhub.kbsky.stream.entity.app.bsky.JetStreamClient.onMessage(JetStreamClient.kt:81)
	at work.socialhub.kbsky.stream.entity.app.bsky.JetStreamClient.access$onMessage(JetStreamClient.kt:14)
	at work.socialhub.kbsky.stream.entity.app.bsky.JetStreamClient$2.invokeSuspend(JetStreamClient.kt:36)
	at work.socialhub.kbsky.stream.entity.app.bsky.JetStreamClient$2.invoke(JetStreamClient.kt)
	at work.socialhub.kbsky.stream.entity.app.bsky.JetStreamClient$2.invoke(JetStreamClient.kt)
	at work.socialhub.khttpclient.websocket.WebsocketRequest$start$2$4$1.invokeSuspend(WebsocketRequest.kt:105)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
Caused by: kotlinx.serialization.MissingFieldException: Field 'handle' is required for type with serial name 'work.socialhub.kbsky.stream.entity.app.bsky.model.Identity', but it was missing
	at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
	at work.socialhub.kbsky.stream.entity.app.bsky.model.Identity.<init>(Identity.kt:5)
	at work.socialhub.kbsky.stream.entity.app.bsky.model.Identity$$serializer.deserialize(Identity.kt:5)
	at work.socialhub.kbsky.stream.entity.app.bsky.model.Identity$$serializer.deserialize(Identity.kt:5)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
	... 20 more

EOFException

Exception in thread "DefaultDispatcher-worker-10" java.io.EOFException
	at okio.RealBufferedSource.require(RealBufferedSource.kt:204)
	at okio.RealBufferedSource.readByte(RealBufferedSource.kt:214)
	at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
	at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@55ba5eb1, Dispatchers.Default]

Both are related to kotlinx.coroutines

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmore infomationNeeds more information about this issue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions