Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Socket connection failed #2

Open
cal0pteryx opened this issue Jan 17, 2023 · 9 comments
Open

Windows: Socket connection failed #2

cal0pteryx opened this issue Jan 17, 2023 · 9 comments

Comments

@cal0pteryx
Copy link

Running Converse Tauri (beta-2022-11-01-1379c7f) on Windows 11 fails with:

WebSocket connection to 'ws://127.0.0.1:10032/xmpp-websocket/' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

Am I missing a server extension or configuration?

@licaon-kter
Copy link

You have websockets active?

@moparisthebest
Copy link
Collaborator

Very odd, can you tell if there is anything running on that port ?

@cal0pteryx
Copy link
Author

You have websockets active?

Nope, first time trying to connect with Converse.js, sorry.

I know it's not the right place to mention this, but don't you think a user error should be shown when trying to connect and it doesn't work? I had to open the browser's console for that ;)

@moparisthebest
Copy link
Collaborator

Hang on, what did you change to make it work? The user shouldn't have to do anything but input a username and password

@cal0pteryx
Copy link
Author

Hang on, what did you change to make it work? The user shouldn't have to do anything but input a username and password

I didn't, because my server wasn't capable (but the GUI did not show this, no error was exposed to the user). Now it works, after I enabled Websocket support on my server :)

@cal0pteryx
Copy link
Author

Sorry, after setting up websocket support, I tested Converse Tauri using Linux (which works as expected). On Windows however, I still get

WebSocket connection to 'ws://127.0.0.1:10032/xmpp-websocket/' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received
_connect @ converse.min.js:2
connect @ converse.min.js:2
connect @ converse.min.js:2
wc @ converse.min.js:2
_c @ converse.min.js:2
login @ converse.min.js:2
converse.min.js:2 
        
        ERROR: Websocket error {"isTrusted":true}
log @ converse.min.js:2
error @ converse.min.js:2
J.error @ converse.min.js:2
_onError @ converse.min.js:2
socket.onerror @ converse.min.js:2
error (asynchron)
_connect @ converse.min.js:2
connect @ converse.min.js:2
connect @ converse.min.js:2
wc @ converse.min.js:2
_c @ converse.min.js:2
login @ converse.min.js:2
await in login (asynchron)
reconnect @ converse.min.js:2
await in reconnect (asynchron)
m @ converse.min.js:2
v @ converse.min.js:2
p @ converse.min.js:2
setTimeout (asynchron)
f @ converse.min.js:2
y @ converse.min.js:2
reconnect @ converse.min.js:2
onDisconnected @ converse.min.js:2
onConnectStatusChanged @ converse.min.js:2
_changeConnectStatus @ converse.min.js:2
_doDisconnect @ converse.min.js:2
_onClose @ converse.min.js:2
socket.onclose @ converse.min.js:2
converse.min.js:2 
        
        ERROR: Websocket closed unexcectedly

There doesn't seem to be any service listening on Port 10032 when Converse is not started. When it's started, I can see

  TCP    127.0.0.1:10032        0.0.0.0:0              LISTEN

@cal0pteryx cal0pteryx reopened this Jan 27, 2023
@moparisthebest
Copy link
Collaborator

Yea your server shouldn't need WebSocket support, that's why xmpp-proxy is listening on that port.

So if the port is listening I'm wondering if the windows firewall is stopping it from being connected to, or making outgoing connections, is there a way to check that in windows?

@cal0pteryx
Copy link
Author

I tried both, without success:

  • Adding explicit allow rules to the Windows Firewall
  • Completely disabling the Windows Firewall

netstat -a lists Converse Tauri listening on port 10032.

Anything I can do to debug this?

@cal0pteryx
Copy link
Author

I just tried with Converse Desktop. It did not work right away. But after adding /.well-known/host-meta data, it actually connected. Converse Tauri on the other side still doesn't connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants