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

MediaProxy fails with https homeserver.url #507

Closed
heftig opened this issue Sep 9, 2024 · 2 comments · Fixed by #508
Closed

MediaProxy fails with https homeserver.url #507

heftig opened this issue Sep 9, 2024 · 2 comments · Fixed by #508

Comments

@heftig
Copy link

heftig commented Sep 9, 2024

After upgrading the IRC bridge from 2.0.1 to 3.0.1, the media URLs provided to IRC no longer work. The proxy returns a 500 Internal Server Error with content {"errcode":"M_AS_UNKNOWN","error":"An internal error occured"}.

The logs contain:

Sep 09 04:00:27 matrix.archlinux.org node[701]: ERROR 04:00:27:536 [MediaProxy] TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
Sep 09 04:00:27 matrix.archlinux.org node[701]:     at new ClientRequest (node:_http_client:194:11)
Sep 09 04:00:27 matrix.archlinux.org node[701]:     at request (node:http:103:10)
Sep 09 04:00:27 matrix.archlinux.org node[701]:     at get (node:http:114:15)
Sep 09 04:00:27 matrix.archlinux.org node[701]:     at /var/lib/synapse/matrix-appservice-irc/node_modules/matrix-appservice-bridge/lib/components/media-proxy.js:151:28
Sep 09 04:00:27 matrix.archlinux.org node[701]:     at new Promise (<anonymous>)
Sep 09 04:00:27 matrix.archlinux.org node[701]:     at MediaProxy.onMediaRequest (/var/lib/synapse/matrix-appservice-irc/node_modules/matrix-appservice-bridge/lib/components/media-proxy.js:150:16)
Sep 09 04:00:27 matrix.archlinux.org node[701]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
Sep 09 04:00:27 matrix.archlinux.org node[701]:   code: 'ERR_INVALID_PROTOCOL'
Sep 09 04:00:27 matrix.archlinux.org node[701]: }
archlinux-github pushed a commit to archlinux/infrastructure that referenced this issue Sep 9, 2024
Currently needs a hack in
/var/lib/synapse/matrix-appservice-irc/node_modules/matrix-appservice-bridge/lib/components/media-proxy.js
to replace the `"http"` require with `"https"` or the proxy won't work.

See: matrix-org/matrix-appservice-bridge#507
@mweinelt
Copy link

mweinelt commented Sep 10, 2024

This breaks media for the hackint IRC bridge. Can someone PTAL.

@Half-Shot @tadzik

@tadzik
Copy link
Contributor

tadzik commented Sep 18, 2024

Should be all good now in https://github.com/matrix-org/matrix-appservice-irc/releases/tag/3.0.2.

Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants