Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

WebSocket connection issues #112

Closed
xsmile opened this issue Oct 22, 2017 · 10 comments
Closed

WebSocket connection issues #112

xsmile opened this issue Oct 22, 2017 · 10 comments
Labels

Comments

@xsmile
Copy link
Collaborator

xsmile commented Oct 22, 2017

This latest version 62.0.3202.62-1 broke a bunch of sites for me. Discord voice chat, twitch text chat.

When I try to write in discord text chat I get this:
worker-cc6cefad358a964412c188043046809c.js:1 Uncaught (in promise) DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
at https://static.twitchcdn.net/assets/worker-cc6cefad358a964412c188043046809c.js:1:25868
at new Promise ()
at e.u._sendMessage (https://static.twitchcdn.net/assets/worker-cc6cefad358a964412c188043046809c.js:1:25536)
at e.say (https://static.twitchcdn.net/assets/worker-cc6cefad358a964412c188043046809c.js:1:51525)
at e.say (https://static.twitchcdn.net/assets/worker-cc6cefad358a964412c188043046809c.js:1:38955)
at e.maybeSay (https://static.twitchcdn.net/assets/worker-cc6cefad358a964412c188043046809c.js:1:45105)
at e.messageHandler (https://static.twitchcdn.net/assets/worker-cc6cefad358a964412c188043046809c.js:1:44423)
at https://static.twitchcdn.net/assets/worker-cc6cefad358a964412c188043046809c.js:1:46679

discord voice chat was also stuck in 'connecting' state, so I guess websockets no longer work.

Source: hollunder at https://aur.archlinux.org/packages/inox-bin

I can confirm the issue when trying to use Discord at https://discordapp.com.

Discord connects fine if Inox is built with all patches except 0001-fix-building-without-safebrowsing.patch. but I don't know any details yet.

@xsmile xsmile added the bug label Oct 22, 2017
@perfect7gentleman
Copy link
Contributor

confirm

@Eloston
Copy link
Contributor

Eloston commented Oct 22, 2017

This is a wild guess as I'm not able to inspect or test right now, but this change da32cbb#diff-06bb0d2b5cbd0f1dfbcaabf963cfa895R1363 doesn't feel right to me. I think io_thread->DisableQuic() might be something important.

Instead of deleting the entire DisableQuicOnIOThread, perhaps the safe_browsing_service argument can be removed, as well as all calls to safe_browsing_service?

@xsmile
Copy link
Collaborator Author

xsmile commented Oct 22, 2017

@Eloston Thanks for the hint. I tried keeping DisableQuicOnIOThread but it didn't help. The method was missing in previous versions too, see da32cbb#diff-06bb0d2b5cbd0f1dfbcaabf963cfa895L1082. It was relocated in 62.

I went trough the patch and tried to make some parts less invasive but didn't have any success.

I noticed that a browser restart results in Discord loading successfully. It fails on subsequent page reloads though.

@Eloston
Copy link
Contributor

Eloston commented Oct 22, 2017

@xsmile

I noticed that a browser restart results in Discord loading successfully. It fails on subsequent page reloads though.

With the safe browsing patch unapplied, does it fail on subsequent reloads too?

Another thing that touches WebRTC is the VA-API patch. I don't know of any other patch that would remotely come close.

@xsmile
Copy link
Collaborator Author

xsmile commented Oct 22, 2017

@Eloston If only the safe browsing patch is not applied but the rest is applied then the subsequent reloads do work.

I tried disabling VA-API at chrome://flags, it has no influence.

@Eloston
Copy link
Contributor

Eloston commented Oct 22, 2017

@xsmile So do these tests fail for you?:

https://www.websocket.org/echo.html
http://websocketstest.com/

@Eloston
Copy link
Contributor

Eloston commented Oct 22, 2017

Earlier I was confused with WebRTC, so we should make certain which one is actually broken. I thought Discord uses WebRTC for voice, but they could be using both technologies for a variety of things. WebRTC testing sites:

https://test.webrtc.org/
https://webrtc.github.io/samples/

@xsmile
Copy link
Collaborator Author

xsmile commented Oct 22, 2017

WebSocket support is detected in all cases.

with safebrowsing patch

on browser restart
https://www.websocket.org/echo.html - connect, send, receive work
http://websocketstest.com/ - port 80, 443 work; 8080, 443 SSL don't work

on page reload
https://www.websocket.org/echo.html - connect, send, receive don't work
http://websocketstest.com/ - port 80, 443, 8080, 443 SSL don't work

without safebrowsing patch

all tests pass

I can't comment on WebRTC since I didn't (actively) use it yet and denied most permissions for audio/video access. WebRTC tests at https://test.webrtc.org/ fail with and without the patch, I guess that's fine.

@Hoshpak
Copy link

Hoshpak commented Oct 27, 2017

This is what I get in the console when trying to join a discord voice chat:

0b9f04505572f4fcf028.js:79 [RTCConnection(368662581868756994)] Connecting to RTC server wss://eu-central129.discord.gg/.
0b9f04505572f4fcf028.js:79 [RTCControlSocket] [WS CLOSED] (false, 0, The connection timed out after 20000 ms - did not receive OP_HELLO in time.) retrying in 1.99 seconds.
e.(anonymous function) @ 0b9f04505572f4fcf028.js:79
e.log @ 585f67207dbce403ecec.js:1
e.warn @ 585f67207dbce403ecec.js:1
t._handleClose @ 585f67207dbce403ecec.js:1
(anonymous) @ 585f67207dbce403ecec.js:1
r @ 0b9f04505572f4fcf028.js:79
09:36:56.900 0b9f04505572f4fcf028.js:79 [RTCControlSocket] [RECONNECT] wasClean=false code=0 reason=The connection timed out after 20000 ms - did not receive OP_HELLO in time.

@xsmile
Copy link
Collaborator Author

xsmile commented Oct 27, 2017

Closing, as this should be fixed in the next release.

@xsmile xsmile closed this as completed Oct 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants