Skip to content

Background job arguments can't exceed 4000 characters (json encoded) - too many groups?Β #960

@v411e

Description

@v411e

How to use GitHub

  • Please use the πŸ‘ reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create a user that is member of many groups (~110)
  2. Try to login with that user on nextcloud.

Expected behaviour

User is able to login normally.

Actual behaviour

User is not able to login.

Image

Server configuration

Web server: Apache

Database: PostgreSQL 16.9

PHP version: 8.3.21

Nextcloud version: (see Nextcloud admin page)

List of activated apps
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
Server Log
"{"reqId":"undisclosed","level":3,"time":"2025-05-19T06:06:12+00:00","remoteAddr":"undisclosed","user":"--","app":"index","method":"POST","url":"/apps/user_saml/saml/acs",
"message":"Background job arguments can't exceed 4000 characters (json encoded)","userAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 18_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Mobile/15E148 Safari/604.1","version":"30.0.10.1","exception":
{"Exception":"InvalidArgumentException",
"Message":"Background job arguments can't exceed 4000 characters (json encoded)",
"Code":0,
"Trace":[
{"file":"/var/www/html/custom_apps/user_saml/lib/GroupManager.php","line":234,"function":"add","class":"OC\BackgroundJob\JobList","type":"->","args":["OCA\User_SAML\Jobs\MigrateGroups",{"gids":["undisclosed","undisclosed","undisclosed","undisclosed","undisclosed","And 105 more entries, set log level to debug to see all entries"]}]},
{"file":"/var/www/html/custom_apps/user_saml/lib/GroupManager.php","line":94,"function":"evaluateGroupMigrations","class":"OCA\User_SAML\GroupManager","type":"->","args":[["undisclosed","undisclosed","undisclosed","undisclosed","undisclosed","And 105 more entries, set log level to debug to see all entries"]]},
{"file":"/var/www/html/custom_apps/user_saml/lib/UserBackend.php","line":578,"function":"handleIncomingGroups","class":"OCA\User_SAML\GroupManager","type":"->","args":[{"class":"OC\User\User"},["undisclosed","undisclosed","undisclosed","undisclosed","undisclosed","And 105 more entries, set log level to debug to see all entries"]]},
{"file":"/var/www/html/custom_apps/user_saml/lib/Controller/SAMLController.php","line":94,"function":"updateAttributes","class":"OCA\User_SAML\UserBackend","type":"->","args":["*** sensitive parameters replaced ***"]},
{"file":"/var/www/html/custom_apps/user_saml/lib/Controller/SAMLController.php","line":345,"function":"autoprovisionIfPossible","class":"OCA\User_SAML\Controller\SAMLController","type":"->","args":[]},
{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"assertionConsumerService","class":"OCA\User_SAML\Controller\SAMLController","type":"->","args":[]},
{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\User_SAML\Controller\SAMLController"},"assertionConsumerService"]},
{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\User_SAML\Controller\SAMLController"},"assertionConsumerService"]},
{"file":"/var/www/html/lib/private/Route/Router.php","line":303,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\User_SAML\Controller\SAMLController","assertionConsumerService",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"user_saml.saml.assertionconsumerservice"}]},
{"file":"/var/www/html/lib/base.php","line":1010,"function":"match","class":"OC\Route\Router","type":"->","args":["/apps/user_saml/saml/acs"]},
{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/BackgroundJob/JobList.php","Line":43,"message":"Background job arguments can't exceed 4000 characters (json encoded)","exception":{},"CustomMessage":"Background job arguments can't exceed 4000 characters (json encoded)"}}"

Browser

Browser name: Safari

Browser version: 604.1

Operating system: iOS

Browser log
None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions