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

Reactivate user API causes internal server error #8359

@ElykDeer

Description

@ElykDeer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions