cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.98k stars 257 forks source link

Media Files unable to load (401); Regression #1993

Open hexchen opened 1 month ago

hexchen commented 1 month ago

Describe the bug

No media files load, homeserver returns 401 for everything.

Platform and versions

OS: MacOS 15.0
Browser: Firefox 131.0
Homeserver Version: dendrite 0.13.8
Homeserver: colon.at
Cinny Version: v4.2.1

Tested on multiple devices and multiple browsers, above OS/Browser is just my primary device.

Additional context

Regression was introduced by 4923b17ad6b247bb2d2298d6bd08101fd48d8e09 / #1952.

Verified by checking Release v4.2.0 with https://1949--pr-cinny.netlify.app; all media loads fine there.

I don't understand why the added check causes authenticated media to break. To my understanding it shouldn't make much of a difference.

ashkitten commented 3 weeks ago

The reason this breaks for you is because authenticated media is now enabled, whereas it wasn't before. Dendrite does not advertise v1.11 of the matrix spec, but it does advertise org.matrix.msc3916.stable.

What may have happened for you, which happened to me (and is how I found this issue), is that the necessary reverse proxy configuration changed when the authenticated media ServiceWorker was introduced in Cinny. Please check out https://github.com/cinnyapp/cinny/blob/dev/docker-nginx.conf#L12.

B14CK313 commented 3 weeks ago

@ashkitten Thank you so much, that fixed it for me! Maybe the required config change should have been listed in the release changelog as a breaking change (or did I miss it?). Thanks again for the hint, I would not have looked at the nginx config without it!

hexchen commented 3 weeks ago

I am using the hosted version of cinny at app.cinny.in; so I don't think the nginx config in the repo has anything to do with this. The serviceworker does in fact get registered.

Lunaphied commented 1 week ago

Linking https://github.com/cinnyapp/cinny/issues/2055#issuecomment-2474671130 because I'm hitting the same exact issue suddenly after updating. I've used both the desktop app (on macOS) and app.cinny.in and both show the same issue. There's no authorization header being offered on the media fetches after the update to v4.2.1 or later