t2bot / matrix-media-repo

Highly configurable multi-domain media repository for Matrix.

Home Page:https://docs.t2bot.io/matrix-media-repo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure to import URL preview media from Synapse?

turt2live opened this issue · comments

synapse  | 2023-10-10 20:34:40,445 - synapse.access.http.8008 - 465 - INFO - GET-196734 - ::ffff:172.18.0.8 - 8008 - {None} Processed request: 0.014sec/0.001sec (0.001sec, 0.000sec) (0.000sec/0.006sec/1) 96B 404 "GET /_matrix/media/v3/download/shady.website/2023-10-10_ArPCFfBxcjafUyxB HTTP/1.1" "Go-http-client/1.1" [0 dbevts]
panic: received status code 404 [recovered]
	panic: received status code 404

goroutine 28 [running]:
main.main.func1({0xd7d220?, 0xc000274ad0?})
	/opt/cmd/import_synapse/main.go:118 +0x25
github.com/panjf2000/ants/v2.(*goWorker).run.func1.1()
	/go/pkg/mod/github.com/panjf2000/ants/v2@v2.8.1/worker.go:54 +0x75
panic({0xd7d220, 0xc000274ad0})
	/usr/local/go/src/runtime/panic.go:884 +0x213
main.doWork.func1()
	/opt/cmd/import_synapse/main.go:173 +0x578
github.com/panjf2000/ants/v2.(*goWorker).run.func1()
	/go/pkg/mod/github.com/panjf2000/ants/v2@v2.8.1/worker.go:67 +0x97
created by github.com/panjf2000/ants/v2.(*goWorker).run
	/go/pkg/mod/github.com/panjf2000/ants/v2@v2.8.1/worker.go:48 +0x65

Here's the relevant row, from Synapse's local_media_repository table:

"media_id" "media_type" "media_length" "created_ts" "upload_name" "user_id" "quarantined_by" "url_cache" "last_access_ts" "safe_from_quarantine"
"2023-10-10_ArPCFfBxcjafUyxB" "text/html; charset=utf-8" 2995 1696937550591 "@jordan:shady.website" "https://login.doo.dad/if/flow/signup/?itoken=[redacted]" 1696970121574 false