bobboau / Bragi-MPD

Full featured, mobile friendly MPD web client, based on MPD.js
GNU General Public License v2.0
35 stars 13 forks source link

Websocket keeps disconnecting, web client stuck at "Connecting..." #14

Open jcoffland opened 4 years ago

jcoffland commented 4 years ago

I get this output from websockify:

$ websockify 8800 localhost:6600
WebSocket server settings:
  - Listen on :8800
  - No SSL/TLS support (no cert file)
  - proxying from :8800 to localhost:6600
127.0.0.1 - - [22/Sep/2020 18:13:55] 127.0.0.1: Plain non-SSL (ws://) WebSocket connection
127.0.0.1 - - [22/Sep/2020 18:13:55] connecting to: localhost:6600
127.0.0.1 - - [22/Sep/2020 18:13:58] 127.0.0.1: Plain non-SSL (ws://) WebSocket connection
127.0.0.1 - - [22/Sep/2020 18:13:58] connecting to: localhost:6600
127.0.0.1 - - [22/Sep/2020 18:14:01] 127.0.0.1: Plain non-SSL (ws://) WebSocket connection
127.0.0.1 - - [22/Sep/2020 18:14:01] connecting to: localhost:6600
127.0.0.1 - - [22/Sep/2020 18:14:04] 127.0.0.1: Plain non-SSL (ws://) WebSocket connection
127.0.0.1 - - [22/Sep/2020 18:14:04] connecting to: localhost:6600
127.0.0.1 - - [22/Sep/2020 18:14:07] 127.0.0.1: Plain non-SSL (ws://) WebSocket connection
127.0.0.1 - - [22/Sep/2020 18:14:07] connecting to: localhost:6600

The mdp log shows this:

Sep 22 18:13 : client: [348] opened from 127.0.0.1:41806
Sep 22 18:13 : client: [348] closed
Sep 22 18:13 : client: [349] opened from 127.0.0.1:41828
Sep 22 18:13 : client: [349] closed
Sep 22 18:13 : client: [350] opened from 127.0.0.1:41832
Sep 22 18:13 : client: [350] closed
Sep 22 18:14 : client: [351] opened from 127.0.0.1:41836
Sep 22 18:14 : client: [351] closed
Sep 22 18:14 : client: [352] opened from 127.0.0.1:41838
Sep 22 18:14 : client: [352] closed
Sep 22 18:14 : client: [353] opened from 127.0.0.1:41844
Sep 22 18:14 : client: [353] closed
Sep 22 18:14 : client: [354] opened from 127.0.0.1:41848
Sep 22 18:14 : client: [354] closed
Sep 22 18:14 : client: [355] opened from 127.0.0.1:41850
Sep 22 18:14 : client: [355] closed
Sep 22 18:14 : client: [356] opened from 127.0.0.1:41854

Is this some sort of incompatibility with the current version of mpd? I have mpd 0.21.22-1+b3 and websockify 0.9.0+dfsg1-2. I'm on Debian 10 and I'm using nginx to serve Bragi.

josedpedroso commented 4 years ago

Hi. Could you please test with my fork of Bragi-MPD? You can find it at https://github.com/josedpedroso/Bragi-MPD

Your issue might be what prompted PR #13, which my fork had already fixed.

Also, you could serve Bragi directly from Websockify, using --web=/path/to/bragi, unless you need nginx for something else too.

Edit: if that doesn't fix it for you, could you check the browser's JS console for error messages?

jcoffland commented 4 years ago

Yes, that fork works.

josedpedroso commented 4 years ago

Your issue was probably caused by Websockify not accepting text frames anymore, then. I've been holding off on issuing a PR with my recent changes because the author of this project seems to be busy or unavailable.

jcoffland commented 4 years ago

Probably best if you create the PR.

jehon commented 2 years ago

Other solution (while the PR is under review (hum)), is to checkout websockify 0.8.0...