Return value of OCA\Circles\Model\Member::getInvitedBy() must be an instance of OCA\Circles\Model\FederatedUser, null returned in /var/www/nextcloud/apps/circles/lib/Model/Member.php:351
Open
Nobody has claimed this yet.
1. to develop
bug
- Dominant language
- JavaScript
- Stars
- 177
- Forks
- 68
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 60
Description
EventWrapper doesn't initialize the member's invitedBy property, leading to typing issue.
TypeError: Return value of OCA\Circles\Model\member::getInvitedBy() must be an instance of OCA\Circles\Model\FederatedUser, null returned in /var/www/nextcloud/apps/circles/lib/Model/member.php:351
Stack trace:
#0 /var/www/nextcloud/apps/spreed/lib/Listener/CircleMembershipListener.php(160): OCA\Circles\Model\Member->getInvitedBy()
#1 /var/www/nextcloud/apps/spreed/lib/Listener/CircleMembershipListener.php(67): OCA\Talk\Listener\CircleMembershipListener->removeFormerMemberFromRooms()
#2 /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(87): OCA\Talk\Listener\CircleMembershipListener->handle()
#3 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(251): OC\EventDispatcher\ServiceEventListener->__invoke()
#4 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
#5 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(88): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
#6 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(100): OC\EventDispatcher\EventDispatcher->dispatch()
#7 /var/www/nextcloud/apps/circles/lib/Service/EventService.php(284): OC\EventDispatcher\EventDispatcher->dispatchTyped()
#8 /var/www/nextcloud/apps/circles/lib/FederatedItems/MemberRemove.php(119): OCA\Circles\Service\EventService->memberRemoving()
#9 /var/www/nextcloud/apps/circles/lib/Service/EventWrapperService.php(137): OCA\Circles\FederatedItems\MemberRemove->manage()
#10 /var/www/nextcloud/apps/circles/lib/Service/EventWrapperService.php(109): OCA\Circles\Service\EventWrapperService->manageWrapper()
#11 /var/www/nextcloud/apps/circles/lib/Service/EventWrapperService.php(166): OCA\Circles\Service\EventWrapperService->confirmStatus()
#12 /var/www/nextcloud/apps/circles/lib/Service/MaintenanceService.php(241): OCA\Circles\Service\EventWrapperService->retry()
#13 /var/www/nextcloud/apps/circles/lib/Service/MaintenanceService.php(187): OCA\Circles\Service\MaintenanceService->runMaintenance2()
#14 /var/www/nextcloud/apps/circles/lib/Service/MaintenanceService.php(461): OCA\Circles\Service\MaintenanceService->runMaintenance()
#15 /var/www/nextcloud/apps/circles/lib/Cron/Maintenance.php(61): OCA\Circles\Service\MaintenanceService->runMaintenances()
#16 /var/www/nextcloud/lib/public/BackgroundJob/Job.php(78): OCA\Circles\Cron\Maintenance->run()
#17 /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php(103): OCP\BackgroundJob\Job->start()
#18 /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php(93): OCP\BackgroundJob\TimedJob->start()
#19 /var/www/nextcloud/cron.php(152): OCP\BackgroundJob\TimedJob->execute()
#20 {main}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/circles/lib/Service/EventWrapperService.php, especially manageWrapper(), and inspect how the member reaches apps/circles/lib/Model/Member.php and getInvitedBy(). Reproduce or trace the maintenance flow shown in the stack trace; done means EventWrapper initializes invitedBy so the TypeError no longer occurs during member removal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100