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

Media loading/accessing problems #29329

Closed
ssantosgr opened this issue Feb 21, 2025 · 5 comments
Closed

Media loading/accessing problems #29329

ssantosgr opened this issue Feb 21, 2025 · 5 comments
Labels
A-Media O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@ssantosgr
Copy link

Steps to reproduce

I'm running the matrixdotorg/synapse image with postgres (or sqlite3, it doesn't matter) and element-web.

If i open Chrome browser (133.0.6943.98) or Firefox's latest version (it doesn't matter either), access the element-web instance and try to send an image or a video, they are not loading. This happens in both public and private rooms (encrypted and unencrypted). It is possible to send other types of files (e.g pdf), but if anyone tries to open or download these, there is an undefined error.

I've also tried with other web-based clients (e.g. Cinny) and the situation is the same. Some clients report the following: matrix {"errcode":"M_MISSING_TOKEN","error":"Missing access token"}. I also tried with older Chrome browser versions

Trying to read any logs (browser, docker logs, etc.) didn't got me anywhere.

The only way to overcome this is to visit the URL with "localhost" on the same machine that the containers are running. If i even type the IP of the machine instead of "localhost", media don't work. That is where i concluded.

In http://localhost everything works.
Visiting anything else not.

(not sure if relevant) Setting the enable_authenticated_media to either true or false doesn't help either.

Outcome

What did you expect?

What happened instead?

Operating system

any

Browser information

any

URL for webapp

No response

Application version

latest

Homeserver

No response

Will you send logs?

No

@dosubot dosubot bot added A-Media O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Feb 21, 2025
@t3chguy
Copy link
Member

t3chguy commented Feb 21, 2025

Without logs there is nothing to look at. Sounds like your Matrix homeserver requires authenticated media, which on Element Web and most other web Matrix clients requires service-worker support, so make sure your browser supports service workers. If logs won't be provided this issue will be closed.

@t3chguy t3chguy added the X-Needs-Info This issue is blocked awaiting information from the reporter label Feb 21, 2025
@ssantosgr
Copy link
Author

ssantosgr commented Feb 21, 2025

Thanks for the answer.

I'm using latest versions of both Chrome and Firefox which should support service workers.

Also, as mentioned before, everything works fine when visiting any client under localhost and not its IP or domain name.

I have set the enable_authenticated_media to false in my homeserver.yaml.

Can you please tell me which logs should i provide?

@t3chguy
Copy link
Member

t3chguy commented Feb 21, 2025

I have set the enable_authenticated_media to false in my homeserver.yaml.

Well if your server is still requiring auth then it sounds like an issue for https://github.com/element-hq/synapse/

Can you please tell me which logs should i provide?

Image

@ssantosgr
Copy link
Author

Another really strange thing (which i believe is related) is the fact that by visiting localhost, element pops up immediately. But if i try to visit it by typing anything else (host's IP or domain name), the warning for the browser appears. Again, i'm trying from Chrome or Firefox latest version and i even tried older ones (like Chrome 131)

Image
Image

@t3chguy
Copy link
Member

t3chguy commented Feb 21, 2025

You're using http which disables a lot of features including service workers, encryption, and many more forcibly in your browser, the exception is localhost. This is a feature of your browser https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts

@t3chguy t3chguy closed this as completed Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Media O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants