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

TypeError with Cospend #74

Closed
arifer612 opened this issue Aug 7, 2021 · 2 comments
Closed

TypeError with Cospend #74

arifer612 opened this issue Aug 7, 2021 · 2 comments

Comments

@arifer612
Copy link

Hi there, I have a similar issue to this issue from a different app. I enabled the Cospend app and had no projects added. Not long after, I checked my logs and saw that there was a TypeError telling me that getProjectNames() returned a null (go to the bottom for an extended description of the error). I added a project titled House renovation but the error still popped up 15 minutes after the last one. Restarting the Nextcloud docker did nothing either.

I know that I should add a try-catch in .../www/nextcloud/apps/cospend/lib/Service/ProjectService.php from the error debug but I'm not familiar with php so I would appreciate it if somebody could help draft something up for me to use.

The debug of the error as seen in the logs:

TypeError: Argument 1 passed to OCA\Cospend\Service\ProjectService::getProjectNames() must be of the type string, null given, called in /config/www/nextcloud/apps/cospend/lib/Activity/CospendProvider.php on line 84

/config/www/nextcloud/apps/cospend/lib/Activity/CospendProvider.php - line 84:

OCA\Cospend\Service\ProjectService->getProjectNames()

<<closure>>

OCA\Cospend\Activity\CospendProvider->__construct()

/config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 106:

ReflectionClass->newInstanceArgs()

/config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 114:

OC\AppFramework\Utility\SimpleContainer->buildClass()

/config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 131:

OC\AppFramework\Utility\SimpleContainer->resolve()

/config/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 460:

OC\AppFramework\Utility\SimpleContainer->query()

/config/www/nextcloud/lib/private/ServerContainer.php - line 145:

OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()

/config/www/nextcloud/lib/private/Activity/Manager.php - line 245:

OC\ServerContainer->query()

/config/www/nextcloud/apps/activity/lib/MailQueueHandler.php - line 451:

OC\Activity\Manager->getProviders()

/config/www/nextcloud/apps/activity/lib/MailQueueHandler.php - line 358:

OCA\Activity\MailQueueHandler->parseEvent()

/config/www/nextcloud/apps/activity/lib/MailQueueHandler.php - line 163:

OCA\Activity\MailQueueHandler->sendEmailToUser()

/config/www/nextcloud/apps/activity/lib/BackgroundJob/EmailNotification.php - line 65:

OCA\Activity\MailQueueHandler->sendEmails()

/config/www/nextcloud/lib/private/BackgroundJob/Job.php - line 51:

OCA\Activity\BackgroundJob\EmailNotification->run()

/config/www/nextcloud/lib/private/BackgroundJob/TimedJob.php - line 58:

OC\BackgroundJob\Job->execute()

/config/www/nextcloud/cron.php - line 127:

OC\BackgroundJob\TimedJob->execute()
julien-nc pushed a commit that referenced this issue Aug 7, 2021
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc
Copy link
Owner

Thanks for the bug report. It's now fixed. Could you try the latest nightly build (v1.3.13-1-nightly) and check if the error is gone? You can download it manually from the appstore or you can also simply get it with an occ command:

occ app:update --allow-unstable cospend

When you want to get back to normal releases, just disable and remove the app from app settings and reinstall it. You won't loose any data.

@arifer612
Copy link
Author

Thank you very much for the fix ❤️, the error no longer shows up!

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

No branches or pull requests

2 participants