Web3.js: Invalid Websocket headers in 1.0.0-beta.34

Created on 18 Apr 2018  Â·  6Comments  Â·  Source: ChainSafe/web3.js

So the issue came when updating to 1.0.0-beta.34 version, the websocket connection fails to a parity node with the following error.

WebSocket connection to 'wss://kovan.decenter.com:4443/' failed: Error during WebSocket handshake: Unexpected response code: 403

The issue is that in the request headers we have value of Sec-WebSocket-Protocol: undefined which gets handled badly on the node since it's undefined. Reverting the version to 1.0.0-beta.33 fixes the issue.

Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9,sr-RS;q=0.8,sr;q=0.7 Cache-Control: no-cache Connection: Upgrade DNT: 1 Host: kovan.decenter.com:4443 Origin: http://127.0.0.1:8080 Pragma: no-cache Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits Sec-WebSocket-Key: l+ZG48eY3Nt11jph4pXlYA== Sec-WebSocket-Protocol: undefined Sec-WebSocket-Version: 13 Upgrade: websocket User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Most helpful comment

The next release will be .36 try the 1.0 branch please.

All 6 comments

Confirmed.

Should be fixed in the next release.

I tried the 1.0.0-beta.35, still not working and the same issue. the 1.0.0-beta.33 works

It will be available in 1.0.0-beta.36

wodxumingxu notifications@github.com schrieb am So., 12. Aug. 2018, 16:54:

I tried the 1.0.0-beta.35, still not working and the same issue. the
1.0.0-beta.33 works

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/web3.js/issues/1559#issuecomment-412348171,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWUes1hhMUApqWwmx9bf2Ul-vghddAqks5uQEGagaJpZM4TZ3tW
.

The next release will be .36 try the 1.0 branch please.

thank you guys for the clarification

Was this page helpful?
0 / 5 - 0 ratings