cinnyapp/cinny

Media Files unable to load (401); Regression

Opened this issue · 4 comments

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 4923b17 / #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.

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.

@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!

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.

Linking #2055 (comment) 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