nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
317 stars 260 forks source link

Error when adding a new user with group membership (PHP Fatal error: Nesting level too deep - recursive dependency?) #229

Closed qchn closed 1 year ago

qchn commented 2 years ago

Hello, I experience the following bug with a fresh NextCloud deployment on k8s using helm-chart.

Infos about my test environment:

Kubernetes setup: vanilla k8s with containerd runtime (3 master, 3 worker nodes) Kubernetes version: v1.23.5

Bug can be triggered with at least the following NextCloud: 23.03, 23.02 & 22.3.2

Steps to reproduce:

  1. Login to Nextcloud instance with privileged account
  2. Navigate to /settings/users
  3. Create Groups, e.g. "Test1", "Test2"
  4. Click on "New User"
  5. Fill in the users information including e-mail, password, group (this is important to trigger the bug) and display name
  6. Click "Add new user"
  7. Error appears on the upper right corner: "An error occured during the request. Unable to proceed."
  8. Refresh webpage
  9. 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

Note: Creating new users without adding them to a group works flawlessly!

Log from pod when bug is triggered:

[Wed Apr 13 16:25:11.519191 2022] [php:error] [pid 5453] [client REDACTED_FOR_PRIVACY:0] PHP Fatal error: Nesting level too deep - recursive dependency? in /var/www/html/lib/private/Log/ExceptionSerializer.php on line 212

Any hints on how to fix this?

Regards qchn

waja commented 2 years ago

Hi there,

we've exactly the same issue, but using https://github.com/hoellen/docker-nextcloud/pkgs/container/nextcloud (behind a Traefik). The issue was identified in cases, where the system hosting the nextcloud stack is running in DMZ and traffic is directed with DNAT from external to it. We've two setups, where we spotted this. We are also running several other instances with the same stack on other places without DNAT and it's flawlessly working there. As we do NOT use this helm chat and even other docker images, I would guess it's some kinda general issue?

waja commented 2 years ago

Okay ... forget about DNAT. It's working on some Nodes and on some not.

waja commented 2 years ago

Okay ... I looked a bit deeper into it. On the setups, where it's broken, it works with nextcloud 21 and below. With nextcloud 22 and higher its broken. There was some UI (and maybe also other code) changes to the interface of creating users. So it is most probably, that there got something broken with those changes.

ja573 commented 2 years ago

Have just encountered this issue on a fresh instance of 24.0.4-apache running on ECS

waja commented 2 years ago

@ja573 have a look into https://github.com/nextcloud/server/issues/32432#issuecomment-1222143890! I would guess the circles app is activated in your setup. Try to disable it!

IronZack95 commented 1 year ago

@ja573 have a look into nextcloud/server#32432 (comment)! I would guess the circles app is activated in your setup. Try to disable it!

Thank you, it worked for me. I had the same issue.

qchn commented 1 year ago

@ja573 have a look into nextcloud/server#32432 (comment)! I would guess the circles app is activated in your setup. Try to disable it!

Thank you so much for the hint, @waja! Indeed, disabling the circles app did help in my case.