YunoHost-Apps / funkwhale_ynh

A modern, convivial and free music server on YunoHost
https://funkwhale.audio/
GNU Affero General Public License v3.0
73 stars 22 forks source link

WebSocket connection refused with 403 after update to 1.3.0 #229

Closed orhtej2 closed 1 year ago

orhtej2 commented 1 year ago

Describe the bug

After upgrade to 1.3.0 I'm no longer able to play music. When checking UI with Inspector (Firefox) I see HTTP 403 when UI tries to connect to wss:///api/v1/activity

UI and activity feed (latest uploads, last played tracks etc) loads just fine.

I can see my avatar and profile - I was successfully logged in.

Context

Expected behavior

Funkwhale working as before, especially playing music.

Logs

Thovi98 commented 1 year ago

Thanks for your issue! It’s probably a nginx issue (I had to rewrite it for this version). Could you please share your Funkwhale’s ngnix logs (you may want to change your domain by a random one)?

orhtej2 commented 1 year ago

Attached, mind you it's a mix of new and old as I uninstalled 1.3.0 and restored pre-upgrade backup of 1.2.10 (worked, yay! :))

domain.tld-access.zip

Thovi98 commented 1 year ago

First of all, glad the restore worked 😄 And thanks for the logs.

Am I correct to say that your tracks were uploaded directly in Funkwhale (and not by the in place function)?

Could you please try the testing branch, I've updated some nginx config.

orhtej2 commented 1 year ago

Not sure what you mean, I've uploaded the music via normal 'Upload music from other artists' functionality.

Installing from testing made things worse.

I no longer see any 'dynamic' content of main page (no albums, recent activity etc), just static/empty content and red box to upper right says 'An unexpected error occurred.'

If I dig into Inspector's console I get:

Unexpected API error 
Object { stack: "Z@https://domain.tld/assets/index-0ab871f8.js:5:18973\na_@https://domain.tld/assets/index-0ab871f8.js:7:947\nd@https://domain.tld/assets/index-0ab871f8.js:7:4045\n", message: "Request failed with status code 502", name: "AxiosError", code: "ERR_BAD_RESPONSE", config: {…}, request: XMLHttpRequest, response: {…}, backendErrors: (605) […], isHandled: false, rawPayload: "<!DOCTYPE html>\n<html>\n<head>\n<title>502 Bad Gateway</title>\n<style>\n    body {\n        width: 35em;\n        margin: 0 auto;\n        font-family: Tahoma, Verdana, Arial, sans-serif;\n    }\n</style>\n</head>\n<body>\n<h1>502 Bad Gateway</h1>\n<p>If you see this page, your connection with the server is working but the internal service providing this path is not responding.</p>\n<p>Administrator, make sure that the service is running, and check its logs if it is not.\nThe Services page is in your webadmin, under <code>Tools > Services</code>.</p>\n<p><em>Thank you for using YunoHost.</em></p>\n</body>\n</html>\n" }

Array(605) [ "<", "!", "D", "O", "C", "T", "Y", "P", "E", " ", … ]
useLogger-964d3ffc.js:5:1869
orhtej2 commented 1 year ago

Come to think about it let me try again, perhaps it's #206 striking again.

orhtej2 commented 1 year ago

Yeah, adding --timeout 120 (as always) brings gunicorns workers back online and I'm able to play the music.

Thovi98 commented 1 year ago

I've uploaded the music via normal 'Upload music from other artists' functionality

Yes, it’s what I meant.

Okay so if I understand well, the testing branch resolves your issue? I will soon have a look at your issue in #206, sorry for not have looked at it yet

orhtej2 commented 1 year ago

Yes, code from testing branch works for me 👍