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

Federated cloud sharing of files does not work for certain accounts with Cospend enabled #77

Closed
PatrickJosh opened this issue Aug 19, 2021 · 6 comments
Labels
bug Something isn't working testing

Comments

@PatrickJosh
Copy link

PatrickJosh commented Aug 19, 2021

Hello,
I encountered a strange issue with my main account on my Nextcloud. With Cospend enabled, I cannot share files to from other Nextclouds to my account using federated cloud sharing anymore. However, if I share the files with a newly created account, it works without problems.

I get the following error report in my Nextcloud log:

Formatted log
[index] Error: Argument 1 passed to OCA\Cospend\Service\ProjectService::getProjectNames() must be of the type string, null given, called in /mnt/usb/nextcloud/nextcloud/apps/cospend/lib/Activity/CospendProvider.php on line 84

POST /ocm/shares
from [hidden IP address] at 2021-08-19T12:00:35+00:00

Complete trace:

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

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/App.php - line 156:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /mnt/usb/nextcloud/nextcloud/lib/private/Route/Router.php - line 301:

    OC\AppFramework\App::main()

    /mnt/usb/nextcloud/nextcloud/lib/base.php - line 1000:

    OC\Route\Router->match()

    /mnt/usb/nextcloud/nextcloud/index.php - line 36:

    OC::handleRequest()

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

    /mnt/usb/nextcloud/nextcloud/apps/cospend/lib/Activity/CospendProvider.php - line 84:

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

    <<closure>>

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

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 106:

    ReflectionClass->newInstanceArgs()

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 114:

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

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 131:

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

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 460:

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

    /mnt/usb/nextcloud/nextcloud/lib/private/ServerContainer.php - line 145:

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

    /mnt/usb/nextcloud/nextcloud/lib/private/Activity/Manager.php - line 245:

    OC\ServerContainer->query()

    /mnt/usb/nextcloud/nextcloud/apps/activity/lib/NotificationGenerator.php - line 82:

    OC\Activity\Manager->getProviders()

    /mnt/usb/nextcloud/nextcloud/apps/activity/lib/NotificationGenerator.php - line 111:

    OCA\Activity\NotificationGenerator->populateEvent()

    /mnt/usb/nextcloud/nextcloud/lib/private/Notification/Manager.php - line 333:

    OCA\Activity\NotificationGenerator->prepare()

    /mnt/usb/nextcloud/nextcloud/apps/notifications/lib/Push.php - line 192:

    OC\Notification\Manager->prepare()

    /mnt/usb/nextcloud/nextcloud/apps/notifications/lib/App.php - line 58:

    OCA\Notifications\Push->pushToDevice()

    /mnt/usb/nextcloud/nextcloud/lib/private/Notification/Manager.php - line 294:

    OCA\Notifications\App->notify()

    /mnt/usb/nextcloud/nextcloud/apps/activity/lib/NotificationGenerator.php - line 53:

    OC\Notification\Manager->notify()

    /mnt/usb/nextcloud/nextcloud/apps/activity/lib/Consumer.php - line 72:

    OCA\Activity\NotificationGenerator->sendNotificationForEvent()

    /mnt/usb/nextcloud/nextcloud/lib/private/Activity/Manager.php - line 157:

    OCA\Activity\Consumer->receive()

    /mnt/usb/nextcloud/nextcloud/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php - line 268:

    OC\Activity\Manager->publish()

    /mnt/usb/nextcloud/nextcloud/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php - line 190:

    OCA\FederatedFileSharing\OCM\CloudFederationProviderFiles->shareReceived()

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:

    OCA\CloudFederationAPI\Controller\RequestHandlerController->addShare()

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:

    OC\AppFramework\Http\Dispatcher->executeController()

    /mnt/usb/nextcloud/nextcloud/lib/private/AppFramework/App.php - line 156:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /mnt/usb/nextcloud/nextcloud/lib/private/Route/Router.php - line 301:

    OC\AppFramework\App::main()

    /mnt/usb/nextcloud/nextcloud/lib/base.php - line 1000:

    OC\Route\Router->match()

    /mnt/usb/nextcloud/nextcloud/index.php - line 36:

    OC::handleRequest()

I'm using Nextcloud 22.1.0 with Cospend 1.3.12 on Ubuntu 20.04 LTS with all packages up to date, so I'm using php 7.4.3 and MariaDB 15.1.

If you need any additional information, please let me know.

@julien-nc julien-nc added bug Something isn't working testing labels Aug 19, 2021
@julien-nc
Copy link
Owner

Thanks for the bug report.

This is already fixed and will be included in next release which is coming soon.
Strange side effect though. Sorry for the inconvenience.

If your instance is not a critical production one or if you can deploy a test one, you can try latest nightly build which includes the fix.

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.

@julien-nc
Copy link
Owner

Oh and the related issue is #74.

@PatrickJosh
Copy link
Author

PatrickJosh commented Aug 19, 2021 via email

@PatrickJosh
Copy link
Author

I've tried it with the version from the unstable channel, and now it works again. Thank you very much! 😄

@julien-nc
Copy link
Owner

Thanks for your very quick feedback! One more issue down!

If you've got a few minutes to spare, now that you have the latest nightly installed, could you play around with the new custom payment mode management and check it's not crashing here and there?
The 2 biggest news in next release are:

  • payment modes can be customized (like categories) but old ones stay as hardcoded ones (to keep compatibility with old MoneyBuster)
  • categories and payment modes can be quickly added directly from bill edition form by choosing the "add XXX" suggestion when typing

Cheers

@PatrickJosh
Copy link
Author

PatrickJosh commented Aug 23, 2021

Hey, I'm so sorry, somehow I didn't get a notification about your comment. Sure, I'll test it today or tomorrow!
Edit: I just looked into my mail account and there is the notification mail, it seems that I just overlooked it. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing
Projects
None yet
Development

No branches or pull requests

2 participants