Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGroupManager::isInGroup called with $userId=null #5499

Closed
ChristophWurst opened this issue Jan 19, 2024 · 11 comments
Closed

IGroupManager::isInGroup called with $userId=null #5499

ChristophWurst opened this issue Jan 19, 2024 · 11 comments
Labels

Comments

@ChristophWurst
Copy link
Member

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.

Describe the bug

TypeError: OC\Group\Manager::getUserIdGroupIds(): Argument #1 ($uid) must be of type string, null given, called in /var/www/nextcloud/lib/private/Group/Manager.php on line 374
#13 /var/www/nextcloud/lib/private/Group/Manager.php(391): OC\Group\Manager::getUserIdGroupIds
#12 /var/www/nextcloud/lib/private/Group/Manager.php(374): OC\Group\Manager::isInGroup
#11 /deck/lib/Service/PermissionService.php(234): OCA\Deck\Service\PermissionService::userCan
#10 /deck/lib/Service/PermissionService.php(115): OCA\Deck\Service\PermissionService::getPermissions
#9 /deck/lib/Service/PermissionService.php(160): OCA\Deck\Service\PermissionService::checkPermission
#8 /deck/lib/Activity/ActivityManager.php(571): OCA\Deck\Activity\ActivityManager::canSeeCardActivity
#7 /deck/lib/Activity/DeckProvider.php(131): OCA\Deck\Activity\DeckProvider::parse
#6 /activity/lib/MailQueueHandler.php(436): OCA\Activity\MailQueueHandler::parseEvent
#5 /activity/lib/MailQueueHandler.php(333): OCA\Activity\MailQueueHandler::sendEmailToUser
#4 /activity/lib/MailQueueHandler.php(130): OCA\Activity\MailQueueHandler::sendEmails
#3 /activity/lib/BackgroundJob/EmailNotification.php(60): OCA\Activity\BackgroundJob\EmailNotification::run
#2 /var/www/nextcloud/lib/private/BackgroundJob/Job.php(54): OC\BackgroundJob\Job::execute
#1 /var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php(60): OC\BackgroundJob\TimedJob::execute
#0 /var/www/nextcloud/cron.php(152): null

Found on private Sentry https://nextcloud-gmbh.sentry.io/issues/4893345585

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

No errs

Screenshots
If applicable, add screenshots to help explain your problem.

Client details:

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version 28.0.2.0
  • Device: [e.g. iPhone6, desktop]
Server details

Operating system:

Web server:

Database:

PHP version:

Nextcloud version: (see Nextcloud admin page)

Where did you install Nextcloud from:

Signing status:

Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

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

or

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Logs

Nextcloud log (data/nextcloud.log)

TypeError: OC\Group\Manager::getUserIdGroupIds(): Argument #1 ($uid) must be of type string, null given, called in /var/www/nextcloud/lib/private/Group/Manager.php on line 374
#13 /var/www/nextcloud/lib/private/Group/Manager.php(391): OC\Group\Manager::getUserIdGroupIds
#12 /var/www/nextcloud/lib/private/Group/Manager.php(374): OC\Group\Manager::isInGroup
#11 /deck/lib/Service/PermissionService.php(234): OCA\Deck\Service\PermissionService::userCan
#10 /deck/lib/Service/PermissionService.php(115): OCA\Deck\Service\PermissionService::getPermissions
#9 /deck/lib/Service/PermissionService.php(160): OCA\Deck\Service\PermissionService::checkPermission
#8 /deck/lib/Activity/ActivityManager.php(571): OCA\Deck\Activity\ActivityManager::canSeeCardActivity
#7 /deck/lib/Activity/DeckProvider.php(131): OCA\Deck\Activity\DeckProvider::parse
#6 /activity/lib/MailQueueHandler.php(436): OCA\Activity\MailQueueHandler::parseEvent
#5 /activity/lib/MailQueueHandler.php(333): OCA\Activity\MailQueueHandler::sendEmailToUser
#4 /activity/lib/MailQueueHandler.php(130): OCA\Activity\MailQueueHandler::sendEmails
#3 /activity/lib/BackgroundJob/EmailNotification.php(60): OCA\Activity\BackgroundJob\EmailNotification::run
#2 /var/www/nextcloud/lib/private/BackgroundJob/Job.php(54): OC\BackgroundJob\Job::execute
#1 /var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php(60): OC\BackgroundJob\TimedJob::execute
#0 /var/www/nextcloud/cron.php(152): null

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@ChristophWurst
Copy link
Member Author

Error is similar to #3002 but stack frames are different.

@scarshot

This comment was marked as spam.

@katerasrael
Copy link

katerasrael commented Feb 6, 2024

Same bug here - v28.0.2.5

@joshtrichards
Copy link
Member

joshtrichards commented Feb 10, 2024

@Pietro-Aretino
Copy link

Seems relevant to my issue with Deck breaking share links: #5535

Also same issue here: #5576

@kottonau
Copy link

kottonau commented Feb 13, 2024

Is anybody working on this? Or is there a workaround? Unfortunately, we can't restore a Backup with a NC 27 install, because we discovered this after Users did many changes. So restore is not an option either.

We are currently on 28.0.2.

@Pietro-Aretino
Copy link

Pietro-Aretino commented Feb 13, 2024

Is anybody working on this? Or is there a workaround? Unfortunately, we can't restore a Backup with a NC 27 install, because we discovered this after Users did many changes. So restore is not an option either.

We are currently on 28.0.2.

@kottonau Have you tried rolling-back the Deck app to 1.8.5? I don't know if it is compatible with NC v.28 but it could be worth a shot.

I have my users on Nextcloud 25, updating Deck app to most recent version breaks many things for my instance.

Here are the steps to rollback your Deck app:

If it can be of use to anyone, the only way I was able to fix my issue was downgrading to Deck 1.8.5.
Make a backup of your Nextcloud and make a backup of your DB before making any of these modifications.

  1. You can download older versions of Deck here: https://apps.nextcloud.com/apps/deck/releases?platform=25#25
  2. Login to your Nextcloud server as an admin and disable the Deck app.
  3. SSH into your Nextcloud server, go to your apps directory (/var/www/nextcloud/apps/)
  4. Move the folder "deck" somewhere else /home/ or /root/ or anywhere else, no need to delete, just in case something goes wrong, you can plop it right back.
  5. Download and extract the 1.8.5 version of deck from the aforementioned link
  6. Move the 1.8.5 deck folder to the same location /var/www/nextcloud/apps/
  7. Give the the same user rights and permissions "chown -r www-data:www-data deck/"
  8. Log back into your Nextcloud server and now Enable Deck, you should see your Nextcloud server telling you to update the Deck app.

I tested my link shares and the Deck app and both of them are now functioning correctly.

If you have a cron job to auto-update apps and what not, ensure to disable that.

@kottonau
Copy link

@Pietro-Aretino, thank you for the suggestion. I have a feeling we would break more things by downgrading. But I'll look into it.
In the meantime we will check the activities manually hehe

@juliusknorr
Copy link
Member

Should be fixed by #5533

@geamak
Copy link

geamak commented Feb 14, 2024

Deck version 1.12.2 fixed for me

@kottonau
Copy link

Thanks for fixing it, @juliushaertl !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants