Skip to content

After receiving web socket error message "second and beyond of fragment message must be a continue frame", web socket fails until Apollo client recreated #3580

@dfed

Description

@dfed

Summary

I've seen a couple internal reports in the last week where my Apollo client's web socket fails with the error:

second and beyond of fragment message must be a continue frame

Seems like a transport issue, which should be transient. However, when a client gets into this state, it continues to fail to successfully receive a web socket event due to this error. Any reconnect, resubscription, or new subscription attempts result in the same error. It looks like a network glitch completely poisons the apollo web socket client

Version

1.23.0

Steps to reproduce the behavior

Unknown.

Logs

Anything else?

I'm very new to this code so forgive me if I'm off base: I do see a hint as to what could be causing the repeated failures. processOneRawMessage reads the last response in the read stack to determine what to expect from the next response. When it fails, it calls doDisconnect, which does not reset the readStack, which means that the readStack will always have a last response, which means (or at least I think it means) we'll always re-enter this second and beyond of fragment message must be a continue frame error loop.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions