Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

media upload is broken #5591

Closed
richvdh opened this issue Jul 2, 2019 · 3 comments
Closed

media upload is broken #5591

richvdh opened this issue Jul 2, 2019 · 3 comments

Comments

@richvdh
Copy link
Member

richvdh commented Jul 2, 2019

It gives a 500:

2019-07-02 12:33:34,534 - synapse.access.http.8008 - 233 - INFO - OPTIONS-12451- 2001:8b0:ba7a:e98f:74ca:71dd:a262:d20e - 8008 - Received request: OPTIONS /_matrix/media/v1/upload
2019-07-02 12:33:34,535 - twisted - 253 - CRITICAL - OPTIONS-12451- 
RuntimeError: Producer was not unregistered for b'/_matrix/media/v1/upload'
2019-07-02 12:33:34,535 - synapse.access.http.8008 - 302 - INFO - OPTIONS-12451- 2001:8b0:ba7a:e98f:74ca:71dd:a262:d20e - 8008 - {None} Processed request: 0.001sec/-0.001sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 471B 500 "OPTIONS /_matrix/media/v1/upload HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 
2019-07-02 12:33:34,637 - synapse.access.http.8008 - 233 - INFO - OPTIONS-12452- 2001:8b0:ba7a:e98f:74ca:71dd:a262:d20e - 8008 - Received request: OPTIONS /_matrix/media/v1/upload?filename=cat_confused.gif
2019-07-02 12:33:34,638 - twisted - 253 - CRITICAL - OPTIONS-12452- 
RuntimeError: Producer was not unregistered for b'/_matrix/media/v1/upload?filename=cat_confused.gif'
2019-07-02 12:33:34,638 - synapse.access.http.8008 - 302 - INFO - OPTIONS-12452- 2001:8b0:ba7a:e98f:74ca:71dd:a262:d20e - 8008 - {None} Processed request: 0.001sec/-0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 497B 500 "OPTIONS /_matrix/media/v1/upload?filename=cat_confused.gif HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Ge
@richvdh richvdh changed the title "media upload is broken" "It gives a 500: 2019-07-02 12:33:34,637 - synapse.access.http.8008 - 233 - INFO - OPTIONS-12452- 2001:8b0:ba7a:e98f:74ca:71dd:a262:d20e - 8008 - Received request: OPTIONS /_matrix/media/v1/upload?filename=cat_confused.gif 2019-07-02 12:33:34,638 - twisted - 253 - CRITICAL - OPTIONS-12452- RuntimeError: Producer was not unregistered for b'/_matrix/media/v1/upload?filename=cat_confused.gif' 2019-07-02 12:33:34,638 - synapse.access.http.8008 - 302 - INFO - OPTIONS-12452- 2001:8b0:ba7a:e98f:74ca:71dd:a262:d20e - 8008 - {None} Processed request: 0.001sec/-0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 497B 500 "OPTIONS /_matrix/media/v1/upload?filename=cat_confused.gif HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Ge media upload is broken Jul 2, 2019
@richvdh
Copy link
Member Author

richvdh commented Jul 2, 2019

preview_url seems to be broken as well. Assuming that's the same problem.

@mvgorcum
Copy link
Contributor

mvgorcum commented Jul 2, 2019

Interestingly, I just uploaded an image from riotX to synapse 1.1.0rc1 without issue:

2019-07-02 14:19:11,424 - synapse.access.http.8008 - 233 - INFO - POST-19480- 80.89.227.170 - 8008 - Received request: POST /_matrix/media/v1/upload?filename=1561290160243
2019-07-02 14:19:11,428 - synapse.util.logcontext - 476 - WARNING - GET-19467- Expected logging context POST-19480 was lost
2019-07-02 14:19:11,437 - synapse.rest.media.v1.media_repository - 161 - INFO - POST-19480- Stored local media in file '/data/media_store/local_content/Jt/qC/<snip>'
2019-07-02 14:19:11,437 - synapse.metrics - 443 - INFO - - Collecting gc 1
2019-07-02 14:19:11,598 - synapse.access.http.8008 - 233 - INFO - PUT-19488- 94.142.241.148 - 8008 - Received request: PUT /_matrix/federation/v1/send/1561924187331
(...)
2019-07-02 14:19:13,331 - synapse.rest.media.v1.upload_resource - 85 - INFO - POST-19480- Uploaded content with URI 'mxc://matrix.vgorcum.com/<snip>'
2019-07-02 14:19:13,337 - synapse.access.http.8008 - 302 - INFO - POST-19480- 80.89.227.170 - 8008 - {@mathijs:matrix.vgorcum.com} Processed request: 1.908sec/0.004sec (1.756sec, 0.052sec) (0.005sec/0.015sec/6) 67B 200 "POST /_matrix/media/v1/upload?filename=1561290160243 HTTP/1.1" "RiotX/0.1.0 (Linux; U; Android 8.1.0;  Build/OPM7.181205.00; Flavour FDroid; MatrixAndroidSDK_X 0.0.1)" [0 dbevts]
2019-07-02 14:19:13,477 - synapse.access.http.8008 - 233 - INFO - PUT-19499- 173.249.27.165 - 8008 - Received request: PUT /_matrix/federation/v1/send/1561605223795

@richvdh
Copy link
Member Author

richvdh commented Jul 2, 2019

@mvgorcum it turned out it was the OPTIONS CORS preflight request failing, so I guess riotx does't preflight.

Fixed by #5593

@richvdh richvdh closed this as completed Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants