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

Reactivate user API causes internal server error #8359

Closed
ElykDeer opened this issue Sep 20, 2020 · 0 comments · Fixed by #8362
Closed

Reactivate user API causes internal server error #8359

ElykDeer opened this issue Sep 20, 2020 · 0 comments · Fixed by #8362
Labels
z-regression (Deprecated Label)

Comments

@ElykDeer
Copy link

Description

Trying to reactivate a user with the new admin API causes an internal server error

Steps to reproduce

This: curl 'https://<server_address>/_synapse/admin/v2/users/<user_name> -X 'PUT' -H 'authorization: Bearer <token>' --data-binary '{"deactivated":false}'
Returns this (good):

{
    "errcode": "M_UNKNOWN",
    "error": "Must provide a password to re-activate an account."
}

Giving it a password: curl 'https://<server_address>/_synapse/admin/v2/users/<user_name> -X 'PUT' -H 'authorization: Bearer <token>' --data-binary '{"deactivated":false,"password":"<password>"}'
Returns this (bad):

{
    "errcode": "M_UNKNOWN",
    "error": "Internal server error"
}

Log is really long, last couple lines are:

  File "/usr/local/lib/python3.7/site-packages/twisted/enterprise/adbapi.py", line 306, in _runWithConnection
    compat.reraise(excValue, excTraceback)
  File "/usr/local/lib/python3.7/site-packages/twisted/python/compat.py", line 464, in reraise
    raise exception.with_traceback(traceback)
  File "/usr/local/lib/python3.7/site-packages/twisted/enterprise/adbapi.py", line 297, in _runWithConnection
    result = func(conn, *args, **kw)
  File "/usr/local/lib/python3.7/site-packages/synapse/storage/database.py", line 572, in inner_func
    return func(conn, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/synapse/storage/database.py", line 416, in new_transaction
    r = func(cursor, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/synapse/storage/databases/main/user_erasure_store.py", line 107, in f
    self.simple_delete_one_txn(
AttributeError: 'DataStore' object has no attribute 'simple_delete_one_txn'

Version information

dklimpel added a commit to dklimpel/synapse_archive that referenced this issue Sep 20, 2020
Fixes: matrix-org#8359
Trying to reactivate a user with the admin API (`PUT
/_synapse/admin/v2/users/<user_name>`) causes an internal server error

Seems to be a regression in matrix-org#8033
@clokep clokep added the z-regression (Deprecated Label) label Sep 21, 2020
anoadragon453 pushed a commit that referenced this issue Sep 22, 2020
Fixes: #8359 

Trying to reactivate a user with the admin API (`PUT /_synapse/admin/v2/users/<user_name>`) causes an internal server error.

Seems to be a regression in #8033.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-regression (Deprecated Label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants