You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
As i understand the option the URL should return an image because Matrix should generate a cached image from source by the request with parameters width/height.
the image thingy worked once without problems but i dont know which point made the breaking change.
Dimension isn't handling the error gracefully, but the fact that synapse is returning M_NOT_FOUND for a thumbnail is the problem. There should be at least something in the synapse logs to highlight the request and what happened though.
I don't know if it is connected but I get this tracebacks since the last update, the config is mostly the same as vmario89s:
synapse.http.server: [GET-680119] Failed handle request via 'ThumbnailResource': <XForwardedForRequest at 0x7f7bb9a10f60 method='GET' uri='/_matrix/media/v1/thumbnail/web3r.de/oDSvAQybETGHteNLFuZgIOTU?width=120&height=120&method=scale' clientproto='HTTP/1.1' site=8008>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/synapse/http/server.py", line 81, in wrapped_request_handler
yield h(self, request)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python3/dist-packages/synapse/rest/media/v1/thumbnail_resource.py", line 78, in _async_render_GET
width, height, method, m_type
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python3/dist-packages/synapse/rest/media/v1/thumbnail_resource.py", line 221, in _select_or_generate_remote_thumbnail
desired_height, desired_method, desired_type
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python3/dist-packages/synapse/rest/media/v1/media_repository.py", line 540, in generate_remote_exact_thumbnail
t_width, t_height, t_type, t_method, t_len
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 516, in _simple_insert
self._simple_insert_txn, table, values,
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 408, in runInteraction
*args, **kwargs
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 457, in runWithConnection
inner_func, *args, **kwargs
File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
result = inContext.theWork()
File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/usr/lib/python3/dist-packages/twisted/enterprise/adbapi.py", line 306, in _runWithConnection
compat.reraise(excValue, excTraceback)
File "/usr/lib/python3/dist-packages/twisted/python/compat.py", line 464, in reraise
raise exception.with_traceback(traceback)
File "/usr/lib/python3/dist-packages/twisted/enterprise/adbapi.py", line 297, in _runWithConnection
result = func(conn, *args, **kw)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 453, in inner_func
return func(conn, *args, **kwargs)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 329, in _new_transaction
r = func(txn, *args, **kwargs)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 536, in _simple_insert_txn
txn.execute(sql, vals)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 119, in execute
self._do_execute(self.txn.execute, sql, *args)
File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 149, in _do_execute
sql, *args
psycopg2.IntegrityError: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »remote_media_cache_thumbnails_media_origin_media_id_thumbna_key«
DETAIL: Schlüssel »(media_origin, media_id, thumbnail_width, thumbnail_height, thumbnail_type)=(web3r.de, oDSvAQybETGHteNLFuZgIOTU, 120, 120, image/png)« existiert bereits.
Hi @richvdh , the following i found in log. seems to be same behaviour like @L0ric0 has got.
2019-03-22 10:42:59,016 - synapse.http.server - 112 - ERROR - GET-3590- Failed handle request via 'ThumbnailResource': <XForwardedForRequest at 0x7f5490213d68 method='GET' uri='/_matrix/media/r0/thumbnail/t2bot.io/193408b58f5e1eb72d9bea13f23914e6?width=120&height=120&method=scale&animated=true' clientproto='HTTP/1.1' site=8008>
Traceback (most recent call last):
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler yield h(self, request)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/rest/media/v1/thumbnail_resource.py", line 78, in _async_render_GET width, height, method, m_type
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/rest/media/v1/thumbnail_resource.py", line 221, in _select_or_generate_remote_thumbnail desired_height, desired_method, desired_type
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/rest/media/v1/media_repository.py", line 540, in generate_remote_exact_thumbnail t_width, t_height, t_type, t_method, t_len
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 516, in _simple_insert self._simple_insert_txn, table, values,
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 408, in runInteraction *args, **kwargs
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 457, in runWithConnection inner_func, *args, **kwargs
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/threadpool.py", line 250, in inContext result = inContext.theWork()
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/threadpool.py", line 266, in <lambda> inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/enterprise/adbapi.py", line 306, in _runWithConnection compat.reraise(excValue, excTraceback)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/python/compat.py", line 464, in reraise raise exception.with_traceback(traceback)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/enterprise/adbapi.py", line 297, in _runWithConnection result = func(conn, *args, **kw)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 453, in inner_func return func(conn, *args, **kwargs)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 329, in _new_transaction r = func(txn, *args, **kwargs)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 536, in _simple_insert_txn txn.execute(sql, vals)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 119, in execute self._do_execute(self.txn.execute, sql, *args)
File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 149, in _do_execute sql, *args
psycopg2.IntegrityError: duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key"
DETAIL: Key (media_origin, media_id, thumbnail_width, thumbnail_height, thumbnail_type)=(t2bot.io, 193408b58f5e1eb72d9bea13f23914e6, 120, 120, image/png) already exists.
Activity
turt2live commentedon Mar 22, 2019
I'm suspecting this to be a server-side problem. Do you have any large stack traces in the server logs?
(Edit: in my haste, I thought this was riot-web, but the question still applies.)
vmario89 commentedon Mar 22, 2019
[edited to fix log formatting by @richvdh]
Hey. no big traces. I put synapse to DEBUG log state but nothing seriousi can see. But Dimension server puts in log:
https://dimension.fablabchemnitz.de//api/v1/dimension/media/thumbnail/t2bot.io/193408b58f5e1eb72d9bea13f23914e6?width=120&height=120&method=scale&animated=true
leads to
https://matrix.fablabchemnitz.de/_matrix/media/r0/thumbnail/t2bot.io/193408b58f5e1eb72d9bea13f23914e6?width=120&height=120&method=scale&animated=true
which is not available for example
some images are working partially, some completely not
so i am guessing this is more related to Dimension instead of Synapse
turt2live commentedon Mar 22, 2019
Dimension isn't handling the error gracefully, but the fact that synapse is returning M_NOT_FOUND for a thumbnail is the problem. There should be at least something in the synapse logs to highlight the request and what happened though.
L0ric0 commentedon Mar 22, 2019
I don't know if it is connected but I get this tracebacks since the last update, the config is mostly the same as vmario89s:
richvdh commentedon Mar 22, 2019
@turt2live where do you see
M_NOT_FOUND?@vmario89 please find the "Received request" line in your synapse logs for a URL which doesn't work and share the logs as per https://github.com/matrix-org/synapse/wiki#how-can-i-find-the-lines-corresponding-to-a-given-http-request-in-my-homeserver-log
vmario89 commentedon Mar 22, 2019
Hi @richvdh , the following i found in log. seems to be same behaviour like @L0ric0 has got.
richvdh commentedon Mar 22, 2019
thanks. can you share any other log lines for
GET-3590-.vmario89 commentedon Mar 22, 2019
hey. this comes before the error entry:
richvdh commentedon Mar 22, 2019
Great, thanks. This looks like a duplicate of #2182 so I will close this and add your logs to that issue.
turt2live commentedon Mar 22, 2019
Showed up when I clicked the links yesterday. Seems fixed now though