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

ValueError: Attempted to iterate a RoomID #9505

Closed
Ezanor opened this issue Feb 26, 2021 · 1 comment · Fixed by #9506
Closed

ValueError: Attempted to iterate a RoomID #9505

Ezanor opened this issue Feb 26, 2021 · 1 comment · Fixed by #9506
Assignees
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@Ezanor
Copy link

Ezanor commented Feb 26, 2021

Description

Hi,
I was using the join admin route, but it seems to not work anymore maybe since i've updated synapse. This issue happen only when i'm using alias but not an room_id
Here is the log :

2021-02-26 14:01:23,554 - synapse.http.server - 94 - ERROR - POST-320 - Failed handle request via 'JoinRoomAliasServlet': <XForwardedForRequest at 0x7feef12ec358 method='POST' uri='/_synapse/admin/v1/join/%23test%3Aexemple.test.com' clientproto='HTTP/1.1' site='8008'>
Traceback (most recent call last):
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/databases/main/event_federation.py", line 634, in get_latest_event_ids_in_room
    desc="get_latest_event_ids_in_room",
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 1453, in simple_select_onecol
    db_autocommit=True,
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 676, in runInteraction
    **kwargs,
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 752, in runWithConnection
    self._db_pool.runWithConnection(inner_func, *args, **kwargs)
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/python/threadpool.py", line 250, in inContext
    result = inContext.theWork()
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/enterprise/adbapi.py", line 306, in _runWithConnection
    compat.reraise(excValue, excTraceback)
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/python/compat.py", line 464, in reraise
    raise exception.with_traceback(traceback)
  File "/opt/synapse2/env/lib/python3.6/site-packages/twisted/enterprise/adbapi.py", line 297, in _runWithConnection
    result = func(conn, *args, **kw)
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 746, in inner_func
    return func(db_conn, *args, **kwargs)
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 540, in new_transaction
    r = func(cursor, *args, **kwargs)
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 1422, in simple_select_onecol_txn
    txn.execute(sql, list(keyvalues.values()))
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 295, in execute
    self._do_execute(self.txn.execute, sql, *args)
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/storage/database.py", line 321, in _do_execute
    return func(sql, *args)
  File "/opt/synapse2/env/lib/python3.6/site-packages/psycopg2/extensions.py", line 121, in getquoted
    pobjs = [adapt(o) for o in self._seq]
  File "/opt/synapse2/env/lib/python3.6/site-packages/synapse/types.py", line 220, in __iter__
    raise ValueError("Attempted to iterate a %s" % (type(self).__name__,))
ValueError: Attempted to iterate a RoomID

I tried to reinstall a new server with a new database, got the same issue.
I installed a new synapse server in 1.25.0, it was not working too

I just installed a new server in 1.23.0 and it works !

Version information

  • Version:
    Synapse 1.28.0

  • Install method:
    Installed via pip

@clokep
Copy link
Member

clokep commented Feb 26, 2021

This was broken in #8886 I think (in Synapse v1.25.0rc1).

@clokep clokep added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Feb 26, 2021
@clokep clokep self-assigned this Feb 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants