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 Not Working #1816

Closed
voice06 opened this issue Sep 4, 2024 · 2 comments · Fixed by matrix-org/matrix-appservice-bridge#505 or #1817
Closed

MediaProxy Not Working #1816

voice06 opened this issue Sep 4, 2024 · 2 comments · Fixed by matrix-org/matrix-appservice-bridge#505 or #1817
Labels
S-Critical Prevents work, causes data loss, affects many users, and/or has no workaround. T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.

Comments

@voice06
Copy link

voice06 commented Sep 4, 2024

Tried setting up the new MediaProxy but it appears I can only get it as far as pinging my Synapse server, at that point it appears MediaProxy / matrix-bot-sdk is hard coded to use the old unauthenticated method resulting in a 404 returned to MediaProxy.

2024-09-04 09:15:27 ERROR:main TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "content-disposition"
at ServerResponse.setHeader (node:_http_outgoing:662:3)
at ClientRequest. (/home/matrixserv/matrix-appservice-irc/node_modules/matrix-appservice-bridge/lib/components/media-proxy.js:151:17)
at Object.onceWrapper (node:events:634:26)
at ClientRequest.emit (node:events:519:28)
at ClientRequest.emit (node:domain:488:12)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:698:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at Socket.socketOnData (node:_http_client:540:22)
at Socket.emit (node:events:519:28)
at Socket.emit (node:domain:488:12)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:191:23)
2024-09-04 09:15:27 ERROR:main Terminating (exitcode=1)

2024-09-04 09:15:27,523 - synapse.http.server - 130 - INFO - GET-2998 - <XForwardedForRequest at 0x7f9af82a2f10 method='GET' uri='/_matrix/media/v3/download/randomsonicnet.org/aslVYQQXqxHqirkfqNLkcvdh' clientproto='HTTP/1.1' site='8449'> SynapseError: 404 - Not found

https://github.com/matrix-org/matrix-appservice-bridge/blob/develop/src/components/media-proxy.ts#L150
https://github.com/turt2live/matrix-bot-sdk/blob/main/src/MatrixClient.ts#L1580

@Half-Shot Half-Shot added T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. S-Critical Prevents work, causes data loss, affects many users, and/or has no workaround. labels Sep 4, 2024
@Half-Shot
Copy link
Contributor

Thanks for the report, we've identified this and will have a fix ready to go this week.

@tadzik
Copy link
Contributor

tadzik commented Sep 5, 2024

Should be all good on 3.0.1 – thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Critical Prevents work, causes data loss, affects many users, and/or has no workaround. T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
3 participants