Invalid payload #4976
-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Hi! That's weird indeed. Could you please provide the payload that triggers the parser error? |
Beta Was this translation helpful? Give feedback.
-
Hi! Yes! Method for emit JSON from server: My JSON to send from the server to socket client: After an invalid payload error, the client socket reconnected and the socket server created a new socket without restoring the old socket, meaning the old socket remained on the server. If the client requests the same JSON again then the invalid payload errors will occur again - the client socket has reconnected and the socket server has created a new socket without recovery and so on. |
Beta Was this translation helpful? Give feedback.
-
That last screenshot indicates to me that the JSON payload is truncated as the name |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I added for 'httpCompression' transport polling settings from https://socket.io/docs/v4/server-options/ and it works perfect What settings should I use for compression then? |
Beta Was this translation helpful? Give feedback.
Interesting! Thanks for digging into this. It seems something between your server and your client does not properly handle gzip compression. Do you have any proxy (nginx, httpd, ...) in-between?
As a temporary workaround, you can set
httpCompression
tofalse
.