server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: PHP Fatal error: Nesting level too deep - recursive dependency?

Open waja opened this issue 2 years ago • 66 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

When creating a user which is part of any group, there is an error thrown in the UI: "An error occurred during the request. Unable to proceed.". nextcloud.log has PHP Fatal error: Nesting level too deep - recursive dependency? in /var/www/html/lib/private/Log/ExceptionSerializer.php on line 212. Creating a user without being part of a group works as expected.

If you try this again, this fails cause the user is already present. Reloading the page you see the user and it's part of the group, but any other user information is missing.

See this on a new instance of latest 22.x, 23.x and 24.0. With 21.x and below we do not face this issue.

Steps to reproduce

  1. Login to Nextcloud instance with privileged account
  2. Navigate to /settings/users
  3. Click on "New User"
  4. Fill in the users information including e-mail, password, group (this is important to trigger the bug) and display name
  5. Click "Add new user"
  6. Error appears on the upper right corner: "An error occurred during the request. Unable to proceed."
  7. Refresh webpage
  8. After that, the user is present in the users list and the admin account can edit the user's information as expected and the welcome e-mail will be sent

Expected behavior

Created user with details when user is part of a group when creating.

Installation method

Other

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Nginx

Database engine version

MariaDB

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

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

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

Configuration report

{
    "system": {
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "apps_paths": [
            {
                "path": "\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/nextcloud\/apps2",
                "url": "\/apps2",
                "writable": true
            }
        ],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.test.org"
        ],
        "dbtype": "mysql",
        "version": "24.0.0.12",
        "overwrite.cli.url": "http:\/\/nextcloud.test.org",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "redis": {
            "port": 6379,
            "host": "***REMOVED SENSITIVE VALUE***"
        },
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "overwriteprotocol": "https",
        "default_phone_region": "DE",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "loglevel": 2,
        "maintenance": false
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - bruteforcesettings: 2.4.0
  - circles: 24.0.0
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
T  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - firstrunwizard: 2.12.0
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"VhqXg7aIKAOoQCHZZLyW","level":3,"time":"2022-05-16T11:52:16+00:00","remoteAddr":"172.19.0.2","user":"admin","app":"PHP","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Nesting level too deep - recursive dependency? at /nextcloud/lib/private/Log/ExceptionSerializer.php#212","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36","version":"24.0.0.12","id":"62823b928edc0"}

Additional info

This seems also be an issue with the official helm chart. The suggested dirty fix in https://github.com/pulsejet/nextcloud-oidc-login/issues/133#issuecomment-1102459032 seems also work for us.

It might also be related to https://github.com/nextcloud/server/issues/23429#issuecomment-708901668

waja avatar May 16 '22 12:05 waja

This is potentially fixed with 891c10d09da @waja could you try to patch your server with this patch and confirm?

CarlSchwan avatar Jun 21 '22 12:06 CarlSchwan

Could it be, that this is already part of 24.0.2?

waja avatar Jun 21 '22 14:06 waja

Looks like the version from 24.0.2 differs in the following way:

--- ExceptionSerializer.php.24.0.2	2022-06-20 17:01:33.000000000 +0200
+++ ExceptionSerializer.php	2022-06-21 17:06:01.668852037 +0200
@@ -42,8 +42,6 @@
 use OCP\HintException;
 
 class ExceptionSerializer {
-	public const SENSITIVE_VALUE_PLACEHOLDER = '*** sensitive parameters replaced ***';
-
 	public const methodsWithSensitiveParameters = [
 		// Session/User
 		'completeLogin',
@@ -182,7 +180,7 @@
 		if (isset($traceLine['args'])) {
 			$sensitiveValues = array_merge($sensitiveValues, $traceLine['args']);
 		}
-		$traceLine['args'] = [self::SENSITIVE_VALUE_PLACEHOLDER];
+		$traceLine['args'] = ['*** sensitive parameters replaced ***'];
 		return $traceLine;
 	}
 
@@ -213,7 +211,7 @@
 		$workArgs = [];
 		foreach ($args as $arg) {
 			if (in_array($arg, $values, true)) {
-				$arg = self::SENSITIVE_VALUE_PLACEHOLDER;
+				$arg = '*** sensitive parameter replaced ***';
 			} elseif (is_array($arg)) {
 				$arg = $this->removeValuesFromArgs($arg, $values);
 			}

waja avatar Jun 21 '22 15:06 waja

This issue seems still present when creating a user present in a group and with mail and display name:

{"reqId":"spSXyDTGLqAu7cnpKZk6","level":3,"time":"2022-06-21T15:21:06+00:00","remoteAddr":"172.19.0.2","user":"admin","app":"PHP","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Nesting level too deep - recursive dependency? at /nextcloud/lib/private/Log/ExceptionSerializer.php#213","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.2.1"}

waja avatar Jun 21 '22 15:06 waja

As additional information, it was working in 22.2.5, not anymore in 22.2.7 and above. If not possible to revert to code from previous version, is there any upgrade path that would solve that issue?

dsec-be avatar Jun 29 '22 09:06 dsec-be

This is potentially fixed with 891c10d @waja could you try to patch your server with this patch and confirm?

I just tried this patch on our installation, but unfortunately this did not fix the issue. Still got the "Nesting level too deep" fatal error when creating a new user with group membership, just on line 213 instead of 212 now.

elkangaroo avatar Jun 30 '22 13:06 elkangaroo

With 2k issues in the pipe, what's the chance to get this one addressed soon? I can understand that it's not the highest priority as it's not blocking or security related. But it's seriously impacting the use of the whole system. Is there really people creating users without any group? Also users set as admin for a group doesn't have the choice, new users that they create, always come with that group assigned.

dsec-be avatar Jul 15 '22 10:07 dsec-be

My attempt at fixing this: https://github.com/nextcloud/server/pull/33501

You can download it as patch from https://patch-diff.githubusercontent.com/raw/nextcloud/server/pull/33501.patch. Patching instructions can be found here: https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html. Let me know if this improves anything.

ChristophWurst avatar Aug 10 '22 13:08 ChristophWurst

After migrating from 23 to 24.0.3 I encountered a similar error while logging in (same error with local NC IDs and LDAP IDs) but with another line number:

Aug 10 06:57:55 lxcloudp01 Nextcloud[18323]: {"reqId":"S3Q0cyy8kiY2fwkMF2CM","level":3,"time":"2022-08-10T06:57:55+02:00","remoteAddr":"10.100.41.137","user":"-ser-","app":"PHP","method":"POST","url":"/index.php/login","message":"Nesting level too deep - recursive dependency? at /srv/www/htdocs/owncloud/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0","version":"24.0.3.2","data":{"app":"PHP"}}[Wed Aug 10 06:53:02.096193 2022] [php7:error] [pid 18300] [client 10.100.41.137:65027] PHP Fatal error: Nesting level too deep - recursive dependency? in /srv/www/htdocs/owncloud/lib/private/Log/ExceptionSerializer.php on line 215

I think this is the same error, isn't it? Would try to migrate to a stable version where it is fixed.

And one question: The program affected is ExceptionSerializer. I don't understand it's job, so I wonder if this Nesting level too deep the only error or does it occur while catching another error of another module?

Volker-K avatar Aug 11 '22 11:08 Volker-K

My attempt at fixing this: #33501

You can download it as patch from https://patch-diff.githubusercontent.com/raw/nextcloud/server/pull/33501.patch. Patching instructions can be found here: https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html. Let me know if this improves anything.

Hi I tried to patch but looks like the code already changed a lot in ExceptionSerializer.php (we're still running on 22.2.7, and I was waiting for a fix before my next update).

patch -p 1 < /home/test/nextcloud/33501.patch patching file lib/private/Log/ExceptionSerializer.php Hunk #1 FAILED at 40. Hunk #2 FAILED at 210. 2 out of 2 hunks FAILED -- saving rejects to file lib/private/Log/ExceptionSerializer.php.rej

Could you confirm that changes would be compatible with our installed version if:

  • add Hunk1 to the use

  • replace whole content of function removeValuesFromArgs($args, $values) with only the + of Hunk2 ` private function removeValuesFromArgs($args, $values) { return array_map(function($arg) use ($values) { // Sensitive? try { if (in_array($arg, $values, true)) { return self::SENSITIVE_VALUE_PLACEHOLDER; } } catch (Throwable $e) { // In very rare cases PHP can't run in_array on the args because // of a recursive structure. In that case we fall back to // assuming the argument could be sensitive return self::SENSITIVE_VALUE_PLACEHOLDER; }

      	// Array?
      	if (is_array($arg)) {
      		return $this->removeValuesFromArgs($arg, $values);
      	}
    
      	return $arg;
      }, $args);
    

    } `

Thanks !

dsec-be avatar Aug 11 '22 12:08 dsec-be

Steps to reproduce

1. Login to Nextcloud instance with privileged account

2. Navigate to /settings/users

3. Click on "New User"

4. Fill in the users information including e-mail, password, group (this is important to trigger the bug) and display name

5. Click "Add new user"

6. Error appears on the upper right corner: "An error occurred during the request. Unable to proceed."

7. Refresh webpage

I'm unable to reproduce with latest master branch.

ChristophWurst avatar Aug 22 '22 09:08 ChristophWurst

I can reproduce with the Docker image. I'll see if that is debuggable.

ChristophWurst avatar Aug 22 '22 09:08 ChristophWurst

  1. \OCA\Provisioning_API\Controller\UsersController::addUser runs until $this->groupManager->get($group)->addUser($newUser);.
  2. \OC\Group\Group::addUser runs until $this->emitter->emit('\OC\Group', 'postAddUser', [$this, $user]);
  3. From there it gets messy as there are many hooks and listeners for the event.
  4. \OCA\Circles\Listeners\GroupMemberAdded::handle runs until $this->syncService->groupMemberAdded($group->getGID(), $user->getUID());
  5. \OCA\Circles\Service\SyncService::groupMemberAdded runs until $this->federatedEventService->newEvent($event);
  6. \OCA\Circles\Service\FederatedEventService::newEvent runs until $this->initBroadcast($event);. At this point I see a diff between Nextcloud 24 and the master branch: https://github.com/nextcloud/circles/pull/1112
  7. Looks like we go into https://github.com/nextcloud/circles/blob/c40fa11f21a7198f42e8bc7f48de73a795904342/lib/Service/FederatedEventService.php#L445 before the php process errors out hard. If I comment out the $wrapper argument logging works. 7.1) It's possibly caused by Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist. logged with the $wrapper object. My setups doesn't have Contacts enabled.

I did find out that disabling the app circles eliminates the bug. Could someone try and see if that helps your instance as well?

ChristophWurst avatar Aug 22 '22 10:08 ChristophWurst

Could someone try and see if that helps your instance as well?

Jepp ... disabling circles eliminates the PHP Fatal error: Nesting level too deep - recursive dependency? problem on our instances.

waja avatar Aug 22 '22 10:08 waja

@ArtificialOwl could you have a look at https://github.com/nextcloud/server/issues/32432#issuecomment-1222143890? Maybe we can break the recursive structure. Otherwise I suggest dropping the $wrapper object from being logged.

ChristophWurst avatar Aug 22 '22 11:08 ChristophWurst

Excellent !! Thank you for the debugging 👍 Disabling "Circles" app indeed solves the issue here as well.

dsec-be avatar Sep 09 '22 08:09 dsec-be

I hit this with the Docker image as well when upgrading to Nextcloud 25.0.0. occ app:disable circles fixed it as well for me.

thgoebel avatar Oct 20 '22 17:10 thgoebel

I hit this with the Docker image as well when upgrading to Nextcloud 25.0.0. occ app:disable circles fixed it as well for me.

Same behavior here when upgraded to 25 from docker img ver 24.

dreary-ennui avatar Oct 20 '22 21:10 dreary-ennui

this was supposed to be fixed, do you have more logs available ?

ArtificialOwl avatar Oct 20 '22 21:10 ArtificialOwl

Sure thing. Here's from my Nextcloud.log, you can see the update process finish and then just 22 seconds later a client checks in and gets the issue:

{"reqId":"M5DMmmt53bmHVotmnrSt","level":1,"time":"2022-10-20T10:27:12+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Add token cleanup job","userAgent":"--","version":"24.0.6.1","data":{"app":"updater"}}

{"reqId":"M5DMmmt53bmHVotmnrSt","level":1,"time":"2022-10-20T10:27:12+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Clean up abandoned apps","userAgent":"--","version":"24.0.6.1","data":{"app":"updater"}}

{"reqId":"M5DMmmt53bmHVotmnrSt","level":1,"time":"2022-10-20T10:27:12+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"24.0.6.1","data":{"app":"updater"}}

{"reqId":"M5DMmmt53bmHVotmnrSt","level":1,"time":"2022-10-20T10:27:15+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"24.0.6.1","data":{"app":"updater"}}

{"reqId":"M5DMmmt53bmHVotmnrSt","level":1,"time":"2022-10-20T10:27:15+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"25.0.0.18","data":{"app":"updater"}}

{"reqId":"M5DMmmt53bmHVotmnrSt","level":1,"time":"2022-10-20T10:27:15+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"25.0.0.18","data":{"app":"updater"}}

{"reqId":"M5DMmmt53bmHVotmnrSt","level":1,"time":"2022-10-20T10:27:15+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"25.0.0.18","data":{"app":"updater"}}

{"reqId":"U0VNPCruyE5MkNqPYtGG","level":3,"time":"2022-10-20T10:27:37+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"ZXF1H1AVri1VN4Aldgm6","level":3,"time":"2022-10-20T10:27:37+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"JK36xRDfqZYCUDRbnfNr","level":3,"time":"2022-10-20T10:29:41+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"XqfoG2Pu0YwvJivHiSyr","level":3,"time":"2022-10-20T10:32:47+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"4BsP1LSGPpLtRM3GyI34","level":3,"time":"2022-10-20T10:36:55+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"QIH8aM8OkRAdtKUVXTiH","level":3,"time":"2022-10-20T10:42:06+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"tebE6JDGHQ0PaGLE8LCL","level":3,"time":"2022-10-20T10:48:17+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"CcjDTTHfdsZrRugBZBHV","level":3,"time":"2022-10-20T10:55:31+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"Whf4lELHVcSxXxTXX5T0","level":3,"time":"2022-10-20T11:03:47+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

{"reqId":"AClBtqYrpXjcD2jHsApi","level":3,"time":"2022-10-20T11:13:06+00:00","remoteAddr":"myIPAddr","user":"myUser","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/myUser/","message":"Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":{"app":"PHP"}}

Same time frame, this time from NGINX's perspective:

myIpAddr - myUser [20/Oct/2022:06:27:37 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

myIpAddr - myUser [20/Oct/2022:06:27:37 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

myIpAddr - myUser [20/Oct/2022:06:29:41 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

myIpAddr - myUser [20/Oct/2022:06:32:47 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

myIpAddr - myUser [20/Oct/2022:06:36:55 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

myIpAddr - myUser [20/Oct/2022:06:42:06 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

myIpAddr - myUser [20/Oct/2022:06:48:17 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

myIpAddr - myUser [20/Oct/2022:06:55:31 -0400] "PROPFIND /remote.php/dav/files/myUser/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

My currently installed version of Circles is 25.0.0. From what I can tell, these issues occurred during every PROPFIND request after the upgrade process from my Mac and iOS clients until I disabled the Circles app. That was a few hours ago when I found this thread; no errors since. This user is a member of two groups.

dreary-ennui avatar Oct 20 '22 21:10 dreary-ennui

Do you still have error if running (first):

  • ./occ config:app:set circles route_to_circle --value ''

then try to enable the Circles app again ?

  • ./occ app:enable circles

ArtificialOwl avatar Oct 20 '22 22:10 ArtificialOwl

@ArtificialOwl could you have a look at #32432 (comment)? Maybe we can break the recursive structure. Otherwise I suggest dropping the $wrapper object from being logged.

I think this will be the next step. Also check for other place that are loggin an object on exception

ArtificialOwl avatar Oct 20 '22 22:10 ArtificialOwl

Do you still have error if running (first):

  • ./occ config:app:set circles route_to_circle --value ''

then try to enable the Circles app again ?

  • ./occ app:enable circles

Nope! After setting route_to_circle to '' and then re-enabling Circles I am unable to recreate the issue and the clients can check in successfully.

dreary-ennui avatar Oct 20 '22 22:10 dreary-ennui

My team and I are also experiencing this issue with NC 25.0.0, running php occ app:disable circles fixes it.

Verequies avatar Oct 21 '22 00:10 Verequies

Same issue as @Verequies -- same solution seems to work. (Thanks!)

GreenTentacle avatar Oct 21 '22 20:10 GreenTentacle

Do you still have error if running (first):

  • ./occ config:app:set circles route_to_circle --value ''

then try to enable the Circles app again ?

  • ./occ app:enable circles

I ran into this when upgrading to 25 from 24 (Docker image). Setting the route_to_circle and then re-enabling this does NOT fix the problem. Logging in results in a 500 error (via web interface) and the PROPFIND 500 error on the NextCloud Windows instance. Disabling circles and leaving it disabled is the only thing that worked.

To reiterate, circles needs to be disabled, not just the route_to_circle set and then circle re-enabled.

michaelkrieger avatar Oct 26 '22 14:10 michaelkrieger

Same happened to me when upgrading from 24.0.1.1 to 25.0 just now. using docker / postgres

I was unable to login to my admin account ( just a blank white screen after clicking login )

here is the access log with the error:

[Sun Oct 30 14:35:30.324279 2022] [php:error] [pid 35] [client 192.168.1.14:42380] PHP Fatal error:  Nesting level too deep - recursive dependency? in /var/www/html/lib/private/Log/ExceptionSerializer.php on line 215

Disabling the circle app allowed me to login

docker exec --user www-data nextcloud php occ app:disable circles

And i no longer see the above error in the logs. one other thing i noticed is anything that prompts for a password inside the nextcloud instance for example upgrading an app or setting background jobs to CRON from Ajax the confirm button is greyed out.

r-tierney avatar Oct 30 '22 15:10 r-tierney

Same happened to me when upgrading from 24.0.1.1 to 25.0 just now. using docker / postgres I was unable to login to my admin account ( just a blank white screen after clicking login )

Same here migrating from 23 to 24.0.3 as I wrote on Aug, 11.

[Sun Oct 30 14:35:30.324279 2022] [php:error] [pid 35] [client 192.168.1.14:42380] PHP Fatal error: Nesting level too deep - recursive dependency? in /var/www/html/lib/private/Log/ExceptionSerializer.php on line 215

Same message, same linenumber.

docker exec --user www-data nextcloud php occ app:disable circles

We need Circles in our installation. Seems there's a problem within Circles, did you manage to fix it? Otherwise we won't be able to migrate to any version above 24.0.1

Tried to reproduce it with a opy o the DB on a QS system, didn't work. It also didn't happen in our testing instance.

Volker-K avatar Oct 31 '22 07:10 Volker-K

This happened to me today with a docker pull & upgrade to 25.0.0.18. Disabling circles also fixed the issue, thanks for posting a fix!

tebruno99 avatar Oct 31 '22 17:10 tebruno99

Was also impacted by this after an upgrade to 25. The circles disable resolved it for me as well, thanks! 🙏🏻

jmhbnz avatar Nov 02 '22 06:11 jmhbnz