Internal Server Error when accessing personal settings, FederatedUser is not complete

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 34.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • UnRAID 7.3.1, Docker
  • Web server and version (e.g, Apache 2.4.25):
    • Apache2
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • NGINX v2.14.0
  • PHP version (e.g, 8.3):
    • 8.5.8
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • NC 33 update
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Docker
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

When trying to open ‘Personal Settings’, I get an “Internal Server Error”. Directly accessing personal settings subcategories (Security, Notifications, Sharing etc.) works EXCEPT FOR ‘Personal Info’.

Steps to replicate it (hint: details matter!):

  1. Click on the Avatar-menu (top right corner)

  2. Click ‘Personal Settings’

  3. OR click ‘Personal Info’ from another settings page.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

FederatedUserExceptionFederatedUser is not complete

    /var/www/html/apps/circles/lib/Service/FederatedUserService.phpLine 291

    OCA\Circles\Service\FederatedUserService->confirmFederatedUser(
      {
        "__class__": "OCA\\Circles\\Model\\FederatedUser"
      }
    )

    /var/www/html/apps/circles/lib/CirclesManager.phpLine 161

    OCA\Circles\Service\FederatedUserService->setCurrentUser(
      {
        "__class__": "OCA\\Circles\\Model\\FederatedUser"
      }
    )

    /var/www/html/lib/private/Teams/TeamManager.phpLine 184

    OCA\Circles\CirclesManager->startSession(
      {
        "__class__": "OCA\\Circles\\Model\\FederatedUser"
      }
    )

    /var/www/html/core/Controller/ContactsMenuController.phpLine 71

    OC\Teams\TeamManager->getTeamsForUser(
      "phil"
    )

    /var/www/html/lib/private/AppFramework/Http/Dispatcher.phpLine 165

    OC\Core\Controller\ContactsMenuController->getTeams()

    /var/www/html/lib/private/AppFramework/Http/Dispatcher.phpLine 78

    OC\AppFramework\Http\Dispatcher->executeController(
      {
        "__class__": "OC\\Core\\Controller\\ContactsMenuController"
      },
      "getTeams"
    )

    /var/www/html/lib/private/AppFramework/App.phpLine 137

    OC\AppFramework\Http\Dispatcher->dispatch(
      {
        "__class__": "OC\\Core\\Controller\\ContactsMenuController"
      },
      "getTeams"
    )

    /var/www/html/lib/private/Route/Router.phpLine 324

    OC\AppFramework\App::main(
      "OC\\Core\\Controller\\ContactsMenuController",
      "getTeams",
      {
        "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
      },
      {
        "_route": "core.contactsmenu.getteams"
      }
    )

    /var/www/html/lib/base.phpLine 1159

    OC\Route\Router->match(
      "/contactsmenu/teams"
    )

    /var/www/html/index.phpLine 25

    OC::handleRequest()

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

UnRAID syslog:

Jul  7 19:15:48 Storage nfsrahead[2226101]: skipping non-NFS device zfs-57
Jul  7 19:15:48 Storage kernel: docker0: port 8(veth567a76f) entered blocking state
Jul  7 19:15:48 Storage kernel: docker0: port 8(veth567a76f) entered disabled state
Jul  7 19:15:48 Storage kernel: veth567a76f: entered allmulticast mode
Jul  7 19:15:48 Storage kernel: veth567a76f: entered promiscuous mode
Jul  7 19:15:48 Storage kernel: eth0: renamed from vethbd8c385
Jul  7 19:15:48 Storage kernel: docker0: port 8(veth567a76f) entered blocking state
Jul  7 19:15:48 Storage kernel: docker0: port 8(veth567a76f) entered forwarding state
Jul  7 19:15:48 Storage kernel: docker0: port 8(veth567a76f) entered disabled state
Jul  7 19:15:48 Storage kernel: vethbd8c385: renamed from eth0
Jul  7 19:15:48 Storage kernel: docker0: port 8(veth567a76f) entered disabled state
Jul  7 19:15:48 Storage kernel: veth567a76f (unregistering): left allmulticast mode
Jul  7 19:15:48 Storage kernel: veth567a76f (unregistering): left promiscuous mode
Jul  7 19:15:48 Storage kernel: docker0: port 8(veth567a76f) entered disabled state

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.1.4:8666",
            "asymptotics.duckdns.org",
            "192.168.1.114"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "34.0.1.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_phone_region": "de",
        "maintenance_window_start": 100,
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "maintenance": false,
        "app_install_overwrite": [
            "memories",
            "integration_ews"
        ],
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\Movie",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\TIFF"
        ],
        "preview_max_x": 512,
        "preview_max_y": 512,
        "preview_ffmpeg_path": "\/var\/opt\/ffmpeg",
        "memories.vod.disable": false,
        "memories.video_default_quality": "-1",
        "memories.vod.ffmpeg": "\/var\/opt\/ffmpeg",
        "memories.vod.ffprobe": "\/var\/opt\/ffprobe",
        "memories.index.mode": "3",
        "memories.index.path": "\/pictures\/000_Fotos",
        "memories.viewer.high_res_cond_default": "always",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "opcache.memory_consumption": 256,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "dbindex": 0,
        "timeout": 1.5,
        "read_timeout": 1.5,
        "loglevel": 2,
        "log_rotate_size": 10485760
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - app_api: 34.0.0
  - appstore: 1.0.0
  - calendar: 6.5.0
  - circles: 34.0.0
  - cloud_federation_api: 1.18.0
  - comments: 1.24.0
  - contacts: 8.7.3
  - contactsinteraction: 1.15.0
  - cospend: 4.0.2
  - dav: 1.39.0
  - event_update_notification: 2.9.0
  - federatedfilesharing: 1.24.0
  - files: 2.6.0
  - files_automatedtagging: 5.0.0
  - files_external: 1.26.0
  - files_lock: 34.0.0
  - files_pdfviewer: 7.0.0-dev.0
  - files_retention: 5.0.0
  - files_sharing: 1.26.0
  - files_trashbin: 1.24.0
  - files_versions: 1.27.0
  - logreader: 7.0.0
  - lookup_server_connector: 1.22.0
  - memories: 8.1.0
  - music: 3.1.0
  - notifications: 7.0.0-dev.1
  - notify_push: 1.3.3
  - oauth2: 1.22.0
  - polls: 9.1.4
  - privacy: 6.0.0-dev.1
  - profile: 1.3.0
  - provisioning_api: 1.24.0
  - related_resources: 5.0.0-dev.0
  - serverinfo: 6.0.0
  - settings: 1.17.0
  - spreed: 24.0.1
  - support: 6.0.0
  - text: 8.0.0
  - theming: 2.9.0
  - twofactor_backupcodes: 1.23.0
  - twofactor_totp: 16.0.0
  - updatenotification: 1.24.0
  - viewer: 7.0.0-dev.0
  - webhook_listeners: 1.6.0
  - workflowengine: 2.16.0
Disabled:
  - activity: 7.0.0 (installed 2.21.1)
  - admin_audit: 1.24.0
  - bruteforcesettings: 7.0.0 (installed 3.0.0)
  - dashboard: 7.14.0 (installed 7.14.0)
  - encryption: 2.22.0
  - federation: 1.24.0 (installed 1.20.0)
  - files_downloadlimit: 5.2.0-dev.0 (installed 3.0.0)
  - files_reminders: 1.7.0 (installed 1.3.0)
  - firstrunwizard: 7.0.0-dev.0 (installed 2.18.0)
  - nextcloud_announcements: 6.0.0 (installed 2.0.0)
  - office: 1.0.0 (installed 1.0.0)
  - password_policy: 6.0.0-dev.0 (installed 1.19.0)
  - photos: 7.0.0 (installed 3.0.2)
  - previewgenerator: 5.14.0 (installed 5.14.0)
  - recommendations: 7.0.0 (installed 4.0.0)
  - sharebymail: 1.24.0 (installed 1.19.0)
  - survey_client: 6.0.0-dev.0 (installed 1.17.0)
  - suspicious_login: 12.0.0-dev.0
  - systemtags: 1.24.0 (installed 1.19.0)
  - twofactor_nextcloud_notification: 8.0.0
  - user_ldap: 1.25.0
  - user_status: 1.14.0 (installed 1.11.0)
  - weather_status: 1.14.0 (installed 1.9.0)
  - workflow_script: 5.0.0 (installed 5.0.0)

Not sure offhand, but this Issue may have some clues:

Actually, this brought me one step closer to the solution: FederatedUser is not complete · Issue #869 · nextcloud/circles · GitHub

So when I disable circles with occ app:disable circles the internal server error vanishes.

However, I don’t even know if I need circles for some other features to work correctly. Circles does not appear in the GUI’s app list. If I just re-enable it, the internal server error pops up again.

Maybe I have to cleanly install circles again but I don’t know how to do that outside the GUI.

occ config:list circles is not useful to me:

"apps": {
    "circles": {
        "enabled": "yes",
        "installed_version": "34.0.0",
        "loopback_tmp_scheme": "https",
        "maintenance_run": "0",
        "maintenance_update": "{\"3\":1726527314,\"2\":1726527314,\"1\":1726527314}",
        "migration_22": "1",
        "migration_run": "0",
        "types": "filesystem,dav"

After upgrading to Nextcloud v34.0.1.2 (running in a Docker setup with MariaDB and Redis), accessing the Personal Settings (/settings/user/personal-info) results in a persistent HTTP 500 Internal Server Error. The instance was previously migrated/upgraded across several major versions and from bare metal into a compose setup using traefik. I don’t know if the error was present immediately after migration, the rest of the instance works without issue.

Log Exception:

{
  "app": "index",
  "method": "GET",
  "url": "/index.php/settings/user/personal-info",
  "message": "FederatedUser is not complete",
  "version": "34.0.1.2",
  "exception": {
    "Exception": "OCA\\Circles\\Exceptions\\FederatedUserException",
    "Message": "FederatedUser is not complete",
    "Code": 500,
    "Trace": [
      {
        "file": "/var/www/html/apps/circles/lib/Service/FederatedUserService.php",
        "line": 291,
        "function": "confirmFederatedUser",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->"
      },
      {
        "file": "/var/www/html/apps/circles/lib/CirclesManager.php",
        "line": 161,
        "function": "setCurrentUser",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/Teams/TeamManager.php",
        "line": 184,
        "function": "startSession",
        "class": "OCA\\Circles\\CirclesManager",
        "type": "->"
      }
    ],
    "File": "/var/www/html/apps/circles/lib/Service/FederatedUserService.php",
    "Line": 1124
  }
}

Seems like the core TeamManager triggers the Circles app to initialize a session for the local user via startSession. Inside FederatedUserService.php -> confirmFederatedUser(), the validation fails because the generated FederatedUser model for the local account is deemed incomplete by the code.

What I have already tried:

  1. App Config Reset: Checked and restricted circles app-config (type_federated to 0, refresh_rate to 0).
  2. Database Cleanup: Checked oc_circles_member and dropped old database leftovers/orphaned rows from a previous domain/old federation layout.
  3. Maintenance Repair: Executed php occ maintenance:repair and php occ dav:sync-system-addressbook.
  4. Cache Clears: Flushed the Redis cache (redis-cli FLUSHALL) completely.
  5. Workaround: Disabling the circles app via occ app:disable circles immediately restores access to the settings page, confirming that the Circles integration is the bottleneck.

Loopback Behavior

External connectivity from inside the container works flawlessly:

# docker exec -it nextcloud-app curl -I [https://nextcloud.example.com](https://nextcloud.example.com)
HTTP/2 302
server: Apache/2.4.68 (Debian)
location: [https://nextcloud.example.com/index.php/login](https://nextcloud.example.com/index.php/login)

However, running the interactive circles:check command reveals that the Circles app fails to verify its own internal endpoints:

# docker exec --user www-data -it nextcloud-app php occ circles:check
### Checking loopback address.
. The loopback setting is mandatory and can be checked locally.
. The address you need to define here must be a reachable url of your Nextcloud from the hosting server itself.
. By default, the App will use the entry 'overwrite.cli.url' from 'config/config.php'.

* testing current address: https://
- You do not have a valid loopback address setup right now.

Please write down a new loopback address to test: http://nextcloud-app
* testing address: http://nextcloud-app
- GET request on http://nextcloud-app/csrftoken: 404

Using the container name (http://nextcloud-app) results in an HTTP 404 on the /csrftoken endpoint. Testing via https://mytraefikdomain also throws a 404.

I guess its possible that the FederatedUser is not complete exception stems directly from Circles being unable to perform this mandatory self-test or token verification on its own API routes but I am at this point clueless as to how I could fix that.