Skip to content

Infinite reconnect loop on parse error #1557

@MasterOdin

Description

@MasterOdin

Describe the bug

The socket.io-client would enter an infinite reconnect loop, where each time it would get a parse error. Our backend server was receiving each connection successfully and it did not seem like the client was disconnecting properly when it hit the parse error (because it didn't realize it was connected?).

We traced it and we think the root cause was that we were passing an Error object from @grpc/grpc-js library through socket.io and that it contained a Map<string, Buffer>, but socket.io-client doesn't provide much detail on what's causing the parse error so it's hard for us to concretely say. Having a fix for #1554 would make it easier for us to provide more detail here.

To Reproduce

Please fill the following code example:

Socket.IO server version: 4.5.2
Socket.IO client version: 4.5.2

Expected behavior
A clear and concise description of what you expected to happen.

Platform:

  • Device: [e.g. Samsung S8] macbook
  • OS: [e.g. Android 9.2] macOS
  • Browser: chrome

Additional context

I will try to update this ticket in the next week or so with additional details and code to reproduce that's separate from @grpc/grpc-js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    to triageWaiting to be triaged by a member of the team

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions