Skip to content

[Bug]: Error on accounts page, when manager of accounts has been deleted #59265

@SimJoSt

Description

@SimJoSt

⚠️ This issue respects the following points: ⚠️

Bug description

When opening the accounts page (/settings/users) or specifically the "Disabled accounts" view (/settings/users/disabled), the following error message is shown:

An error occurred during the request. Unable to proceed.

Image

In the network tab of the browser developer tools, the following GET request /ocs/v2.php/cloud/users/example-manager has this response:

{
    "ocs": {
        "meta": {
            "status": "failure",
            "statuscode": 404,
            "message": "User does not exist"
        },
        "data": []
    }
}

The "example-manager" account really does not exist on our Nextcloud instance.
However, it is still referenced as the manager on another account. For this reason the accounts page frontend still tries to load it (/ocs/v2.php/cloud/users/details?offset=0&limit=25&search=):

{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 200,
            "message": "OK"
        },
        "data": {
            "users": {
                "example-user": {
                    "enabled": true,
                    "storageLocation": "\/var\/www\/html\/data\/example-user",
                    "id": "example-user",
                    "firstLoginTimestamp": 0,
                    "lastLoginTimestamp": 1706374106,
                    "lastLogin": 1706374106000,
                    "backend": "Database",
                    "subadmin": [],
                    "quota": {
                        "free": 524288000,
                        "used": 0,
                        "total": 524288000,
                        "relative": 0,
                        "quota": 524288000
                    },
                    "manager": "example-manager",
                    "email": "example-user",
                    "additional_mail": [],
                    "displayname": "example-user",
                    "display-name": "example-user",
                    "phone": "",
                    "address": "",
                    "website": "",
                    "twitter": "",
                    "bluesky": "",
                    "fediverse": "",
                    "organisation": "",
                    "role": "",
                    "headline": "",
                    "biography": "",
                    "profile_enabled": "1",
                    "pronouns": "",
                    "groups": [
                        "example-group"
                    ],
                    "language": "en",
                    "locale": "",
                    "timezone": "Europe\/Berlin",
                    "notify_email": null,
                    "backendCapabilities": {
                        "setDisplayName": true,
                        "setPassword": true
                    }
                },
            }
        }
    }
}

Steps to reproduce

  1. Assign a manger to an account
  2. Delete the manger account
  3. Open the accounts page

Expected behavior

No error message is shown.
Either by gracefully handling this or by removing the manager from the account on the backend.

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap32-feedbackbug

    Type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions