TypeError OC\Group\Manager::getUserIdGroupIds()

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 28.0.2
Operating system and version (eg, Ubuntu 20.04): debian 12 / Docker
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.57 (Debian)
PHP version (eg, 7.4): 8.2.15

The issue you are facing:

The Issue combines with running the cronjob every 5 minutes
So every 5min i get a log entry with always the same output → see Logging:

Is this the first time you’ve seen this error? (Y/N): Y since last Update to current Version

Steps to replicate it:

  1. comes with periodically cron job (every 5min)

The output of your Nextcloud log in Admin > Logging:

TypeError OC\Group\Manager::getUserIdGroupIds(): Argument #1 ($uid) must be of type string, null given, 
called in /var/www/html/lib/private/Group/Manager.php on line 374
Error while running background job (class: OCA\Activity\BackgroundJob\EmailNotification, arguments: )

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => 'redis',
    'password' => '',
    'port' => 6379,
  ),
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => '--',
  'passwordsalt' => '--',
  'secret' => '--',
  'trusted_domains' => 
  array (
    0 => '--',
    1 => '--',
    2 => 'localhost',
    3 => '127.0.0.1',
    4 => '192.168.0.1',
  ),
  'datadirectory' => '/var/www/html/data',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 2,
  'logdateformat' => 'F d, Y H:i:s',
  'log_rotate_size' => '104857600',
  'dbtype' => 'mysql',
  'version' => '28.0.2.5',
  'overwrite.cli.url' => '--',
  'overwriteprotocol' => 'https',
  'trusted_proxies' => 
  array (
    0 => 'npm-app',
    1 => '--',
    2 => '--',
    3 => 'localhost',
    4 => '127.0.0.1',
    5 => '192.168.0.1',
  ),
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '--',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'admin',
  'mail_domain' => '--',
  'mail_smtphost' => '--',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '--',
  'mail_smtppassword' => '--',
  'app_install_overwrite' => 
  array (
    0 => 'drawio',
  ),
  'default_phone_region' => '--',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\JPEG',
    1 => 'OC\\Preview\\GIF',
    2 => 'OC\\Preview\\HEIC',
    3 => 'OC\\Preview\\PNG',
    4 => 'OC\\Preview\\MKV',
    5 => 'OC\\Preview\\MP4',
    6 => 'OC\\Preview\\AVI',
    7 => 'OC\\Preview\\Image',
    8 => 'OC\\Preview\\Movie',
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'maintenance_window_start' => 1,
  'defaultapp' => '',
);

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

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Can you provide the full stack trace? It’s likely the same underlying cause as this, but I want to see if it’s being triggered in the same way or a slightly different way.

The easiest way to do provide the trace is to use the 3 dot menu to the right of the log entry and select either “Copy raw” or “Copy formatted”.

Hi, thanks for your fast response!

here the raw entry (i only anonymized the email):

{"reqId":"aQR3AgiwHscQ7YBR4mBo","level":3,"time":"2024-02-08T14:00:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job (class: OCA\\Activity\\BackgroundJob\\EmailNotification, arguments: )","userAgent":"--","version":"28.0.2.5","exception":{"Exception":"TypeError","Message":"OC\\Group\\Manager::getUserIdGroupIds(): Argument #1 ($uid) must be of type string, null given, called in /var/www/html/lib/private/Group/Manager.php on line 374","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Group/Manager.php","line":374,"function":"getUserIdGroupIds","class":"OC\\Group\\Manager","type":"->","args":[null]},{"file":"/var/www/html/custom_apps/deck/lib/Service/PermissionService.php","line":234,"function":"isInGroup","class":"OC\\Group\\Manager","type":"->","args":[null,"Vorstand"]},{"file":"/var/www/html/custom_apps/deck/lib/Service/PermissionService.php","line":115,"function":"userCan","class":"OCA\\Deck\\Service\\PermissionService","type":"->","args":[[["OCA\\Deck\\Db\\Acl",1]],0,null]},{"file":"/var/www/html/custom_apps/deck/lib/Service/PermissionService.php","line":160,"function":"getPermissions","class":"OCA\\Deck\\Service\\PermissionService","type":"->","args":[6,null]},{"file":"/var/www/html/custom_apps/deck/lib/Activity/ActivityManager.php","line":571,"function":"checkPermission","class":"OCA\\Deck\\Service\\PermissionService","type":"->","args":[["OCA\\Deck\\Db\\CardMapper"],31,0]},{"file":"/var/www/html/custom_apps/deck/lib/Activity/DeckProvider.php","line":131,"function":"canSeeCardActivity","class":"OCA\\Deck\\Activity\\ActivityManager","type":"->","args":[31]},{"file":"/var/www/html/apps/activity/lib/MailQueueHandler.php","line":436,"function":"parse","class":"OCA\\Deck\\Activity\\DeckProvider","type":"->","args":["de",["OC\\Activity\\Event"]]},{"file":"/var/www/html/apps/activity/lib/MailQueueHandler.php","line":333,"function":"parseEvent","class":"OCA\\Activity\\MailQueueHandler","type":"->","args":["de",["OC\\Activity\\Event"]]},{"file":"/var/www/html/apps/activity/lib/MailQueueHandler.php","line":130,"function":"sendEmailToUser","class":"OCA\\Activity\\MailQueueHandler","type":"->","args":["abc","abc@abc.abc","de","Europe/Vienna",1707400801]},{"file":"/var/www/html/apps/activity/lib/BackgroundJob/EmailNotification.php","line":60,"function":"sendEmails","class":"OCA\\Activity\\MailQueueHandler","type":"->","args":[500,1707400801]},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":54,"function":"run","class":"OCA\\Activity\\BackgroundJob\\EmailNotification","type":"->","args":[null]},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":60,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[["OC\\BackgroundJob\\JobList"],["OC\\Log"]]},{"file":"/var/www/html/cron.php","line":152,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"],["OC\\Log"]]}],"File":"/var/www/html/lib/private/Group/Manager.php","Line":391,"message":"Error while running background job (class: OCA\\Activity\\BackgroundJob\\EmailNotification, arguments: )","CustomMessage":"Error while running background job (class: OCA\\Activity\\BackgroundJob\\EmailNotification, arguments: )"},"id":"65c4df6952a66"}

thanks, Tom

I can tell you that this is an issue with the Deck app, not necessarily Nextcloud itself. But I am not sure.
I have experienced this same error on file shares. All external links break when Deck is active.
However as soon as I disable the Deck app, this error goes away and my external links function correctly.

1 Like

For me it is OK now, Deck version 1.12.2

1 Like

Yes, also works for me now with this Deck version!

Thanks All!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.