server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: No provider found for id account exception

Open melroy89 opened this issue 1 year ago • 15 comments

⚠️ This issue respects the following points: ⚠️

Bug description

I get a lot of errors in my error log when using Nextcloud 30. It seems to be related to the Contacts app.

Steps to reproduce

  1. Install NC30 & Contacts app (v6.1.0)
  2. Go to the Contacts page: /apps/contacts/All%20contacts/
  3. See my installed apps below and use the apps
  4. See logging

image

Expected behavior

No errors in error log.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 28 to 29)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "secret.domain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.0.14",
        "overwrite.cli.url": "https:\/\/secret.domain.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance_window_start": 1,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5
        },
        "default_language": "nl",
        "default_locale": "nl_NL",
        "default_phone_region": "NL",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "loglevel": 3,
        "app_install_overwrite": [
            "tasks",
            "files_antivirus",
            "forms"
        ],
        "mail_sendmailmode": "smtp",
        "skeletondirectory": "",
        "defaultapp": "files",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [
            "admin"
        ],
        "simpleSignUpLink.shown": false
    }
}

List of activated Apps

Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.0
  - circles: 30.0.0-dev
  - cloud_federation_api: 1.13.0
  - contacts: 6.1.0
  - contactsinteraction: 1.11.0
  - dav: 1.31.1
  - federatedfilesharing: 1.20.0
  - files: 2.2.0
  - files_antivirus: 5.5.7
  - files_downloadlimit: 3.0.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - forms: 4.2.4
  - guests: 4.0.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - systemtags: 1.20.0
  - tables: 0.8.0
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - twofactor_totp: 12.0.0-dev
  - updatenotification: 1.20.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - collectives: 2.14.3 (installed 2.14.3)
  - comments: 1.20.1 (installed 1.19.0)
  - dashboard: 7.10.0 (installed 7.8.0)
  - encryption: 2.18.0
  - federation: 1.20.0 (installed 1.19.0)
  - files_external: 1.22.0
  - firstrunwizard: 3.0.0 (installed 2.18.0)
  - nextcloud_announcements: 2.0.0 (installed 1.18.0)
  - photos: 3.0.2 (installed 2.4.0)
  - support: 2.0.0 (installed 1.11.0)
  - survey_client: 2.0.0 (installed 1.17.0)
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - user_ldap: 1.21.0
  - weather_status: 1.10.0 (installed 1.8.0)

Nextcloud Signing status

No integrity issues via CLI (above URL doesn't exist anymore in NC30)

Nextcloud Logs

{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listTeams","class":"OC\\Core\\Controller\\TeamsApiController","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/secret.domain.com/html/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/secret.domain.com/html/ocs/v2.php","line":7,"args":["/var/www/secret.domain.com/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php","Line":65,"message":"No provider found for id account","exception":{},"CustomMessage":"No provider found for id account"}}
{"reqId":"dWARy0jMvH4odrvz7CPS","level":3,"time":"2024-09-15T16:42:13+00:00","remoteAddr":"192.168.1.194","user":"dennis","app":"no app in context","method":"GET","url":"/ocs/v2.php/teams/resources/account/sabre-vobject-72a77443-0528-4520-8871-2f3c9e6075ef","message":"No provider found for id account","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"No provider found for id account","Code":0,"Trace":[{"file":"/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php","line":91,"function":"getProvider","class":"OC\\Teams\\TeamManager","type":"->"},{"file":"/var/www/secret.domain.com/html/core/Controller/TeamsApiController.php","line":68,"function":"getTeamsForResource","class":"OC\\Teams\\TeamManager","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listTeams","class":"OC\\Core\\Controller\\TeamsApiController","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/secret.domain.com/html/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/secret.domain.com/html/ocs/v2.php","line":7,"args":["/var/www/secret.domain.com/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php","Line":65,"message":"No provider found for id account","exception":{},"CustomMessage":"No provider found for id account"}}
{"reqId":"i1qlO7QapasJsVvVQ6l6","level":3,"time":"2024-09-15T16:42:13+00:00","remoteAddr":"192.168.1.194","user":"dennis","app":"no app in context","method":"GET","url":"/ocs/v2.php/teams/resources/account/sabre-vobject-72a77443-0528-4520-8871-2f3c9e6075ef","message":"No provider found for id account","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"No provider found for id account","Code":0,"Trace":[{"file":"/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php","line":91,"function":"getProvider","class":"OC\\Teams\\TeamManager","type":"->"},{"file":"/var/www/secret.domain.com/html/core/Controller/TeamsApiController.php","line":68,"function":"getTeamsForResource","class":"OC\\Teams\\TeamManager","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listTeams","class":"OC\\Core\\Controller\\TeamsApiController","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/secret.domain.com/html/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/secret.domain.com/html/ocs/v2.php","line":7,"args":["/var/www/secret.domain.com/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php","Line":65,"message":"No provider found for id account","exception":{},"CustomMessage":"No provider found for id account"}}
{"reqId":"uzgzlzhV7yGwsITgnYSB","level":3,"time":"2024-09-15T16:42:13+00:00","remoteAddr":"192.168.1.194","user":"dennis","app":"no app in context","method":"GET","url":"/ocs/v2.php/teams/resources/account/sabre-vobject-72a77443-0528-4520-8871-2f3c9e6075ef","message":"No provider found for id account","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"No provider found for id account","Code":0,"Trace":[{"file":"/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php","line":91,"function":"getProvider","class":"OC\\Teams\\TeamManager","type":"->"},{"file":"/var/www/secret.domain.com/html/core/Controller/TeamsApiController.php","line":68,"function":"getTeamsForResource","class":"OC\\Teams\\TeamManager","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listTeams","class":"OC\\Core\\Controller\\TeamsApiController","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/secret.domain.com/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/secret.domain.com/html/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/secret.domain.com/html/ocs/v2.php","line":7,"args":["/var/www/secret.domain.com/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php","Line":65,"message":"No provider found for id account","exception":{},"CustomMessage":"No provider found for id account"}}

Additional info

{
  "reqId": "uzgzlzhV7yGwsITgnYSB",
  "level": 3,
  "time": "2024-09-15T16:42:13+00:00",
  "remoteAddr": "192.168.1.194",
  "user": "dennis",
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/teams/resources/account/sabre-vobject-72a77443-0528-4520-8871-2f3c9e6075ef",
  "message": "No provider found for id account",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0",
  "version": "30.0.0.14",
  "exception": {
    "Exception": "RuntimeException",
    "Message": "No provider found for id account",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php",
        "line": 91,
        "function": "getProvider",
        "class": "OC\\Teams\\TeamManager",
        "type": "->"
      },
      {
        "file": "/var/www/secret.domain.com/html/core/Controller/TeamsApiController.php",
        "line": 68,
        "function": "getTeamsForResource",
        "class": "OC\\Teams\\TeamManager",
        "type": "->"
      },
      {
        "file": "/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 208,
        "function": "listTeams",
        "class": "OC\\Core\\Controller\\TeamsApiController",
        "type": "->"
      },
      {
        "file": "/var/www/secret.domain.com/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/secret.domain.com/html/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/secret.domain.com/html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/secret.domain.com/html/ocs/v1.php",
        "line": 43,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/secret.domain.com/html/ocs/v2.php",
        "line": 7,
        "args": [
          "/var/www/secret.domain.com/html/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/secret.domain.com/html/lib/private/Teams/TeamManager.php",
    "Line": 65,
    "message": "No provider found for id account",
    "exception": [],
    "CustomMessage": "No provider found for id account"
  },
  "id": "66e71c69d9923"
}

melroy89 avatar Sep 15 '24 17:09 melroy89

same here after update from 29.0.7 to 30.0

W11T avatar Sep 19 '24 19:09 W11T

Anyhow it seems to throw this error message: https://github.com/nextcloud/server/blob/8a8bbd4f9fc8b68f4cc73d50599b0f087612f0b9/lib/private/Teams/TeamManager.php#L65

HELP!

melroy89 avatar Sep 19 '24 20:09 melroy89

Same here after update from 29.0.7 to 30.0.0.

adhoc-post avatar Sep 22 '24 07:09 adhoc-post

Same problem after the Update to 30.0.0.

DW4y avatar Sep 23 '24 04:09 DW4y

Wild guess but: Shouldn't this be a if-else block?

public function getProvider(string $providerId): ITeamResourceProvider {
	$providers = $this->getProviders();
	if (isset($providers[$providerId])) {
		return $providers[$providerId];
	}

	throw new \RuntimeException('No provider found for id ' . $providerId);
}

Source: TeamManager.php Lines 59-66

gelbphoenix avatar Sep 27 '24 19:09 gelbphoenix

Shouldn't this be a if-else block?

That doesn't matter.. The if has a return statement, so in case the if condition is true it will return the provider by ID ($providers[$providerId]). And since it's a return it will stop executing further. So in that case the RuntimeException is never executed..

melroy89 avatar Sep 27 '24 20:09 melroy89

Update: I found how and where to trigger the problem.. So the issue can be triggered via Contact app of Nextcloud. Still unsure if it's a core issue of the server or an issue in the Contact app..

Eg. go to all your contacts overview in the Contact app: https://<domain.com>/apps/contacts/All%20contacts/ (if set in English language).

Contact app will do teams lookup toward the OCS v2 API in Nextcloud. This is what I see in the network tab of the developer tool.

  • HTTP Request: https://<domain>/ocs/v2.php/teams/resources/account/<contact-name> (<contact-name> is a real contact in my contact list)
  • This is the Teams API: https://github.com/nextcloud/server/blob/master/core/Controller/TeamsApiController.php#L65
  • The API path is clear, right? /resources/{providerId}/{resourceId}
  • So in this real world example it will be: /resources/account/<contact-name>
  • Meaning the above account is not a valid provider identifier..
  • I dunno what the provider ID should have been.. Maybe just contacts? I dunno.. I only know account is the wrong ID here.. Is account referring to the Address book?

Update on update: yes creating a new contact seems to use the Address book called "Contacts".. Pretty sure here is the issue.. Somebody?

At the bottom of the page -> Clicking on "Contacts settings" -> Address books -> It does show the address books called "Accounts". So not sure what is the problem..

melroy89 avatar Sep 27 '24 20:09 melroy89

I suspect the Contacts app for now, so I created the issue here: https://github.com/nextcloud/contacts/issues/4165 (although.. it can still be a server issue in NC30, I need to know back from the devs.. At this point I'm just guessing)

melroy89 avatar Sep 27 '24 20:09 melroy89

At the bottom of the page -> Clicking on "Contacts settings" -> Address books -> It does show the address books called "Accounts". So not sure what is the problem..

The "account" provider could seem like the system address book. (Also despite having the said address book deactivated via a OCC command.)

gelbphoenix avatar Sep 27 '24 20:09 gelbphoenix

OK.. So I dived even deeper now. And I checked the oc_addressbooks table in my MariaDB DB of NC:

image

I believe account should be renamed to system?? Or the DB record is wrong.. Either way, there is a bug.

melroy89 avatar Sep 27 '24 21:09 melroy89

I just really hope the upcoming NC30.1 bugfix release will take care of these weird errors.

melroy89 avatar Oct 02 '24 10:10 melroy89

Hi,

I've updated this morning from 29.0.8 to 30.0.1 and since then I found a lot of "No provider found for id account exception" in the log.

{"reqId":"95rETfO4wDzHy6P0v9tr","level":3,"time":"2024-10-19T07:46:52+00:00","remoteAddr":"10.0.2.100","user":"smf","app":"no app in context","method":"GET","url":"/ocs/v2.php/teams/resources/account/sabre-vobject-7eadb6ab-1441-4996-870a-d086124a8f38","message":"No provider found for id account","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"30.0.1.2","exception":{"Exception":"RuntimeException","Message":"No provider found for id account","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Teams/TeamManager.php","line":91,"function":"getProvider","class":"OC\\Teams\\TeamManager","type":"->","args":["account"]},{"file":"/var/www/html/core/Controller/TeamsApiController.php","line":68,"function":"getTeamsForResource","class":"OC\\Teams\\TeamManager","type":"->","args":["account","sabre-vobject-7eadb6ab-1441-4996-870a-d086124a8f38","smf"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listTeams","class":"OC\\Core\\Controller\\TeamsApiController","type":"->","args":["account","sabre-vobject-7eadb6ab-1441-4996-870a-d086124a8f38"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OC\\Core\\Controller\\TeamsApiController"],"listTeams"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OC\\Core\\Controller\\TeamsApiController"],"listTeams"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\TeamsApiController","listTeams",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["account","sabre-vobject-7eadb6ab-1441-4996-870a-d086124a8f38","ocs.core.teamsapi.listteams"]]},{"file":"/var/www/html/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/teams/resources/account/sabre-vobject-7eadb6ab-1441-4996-870a-d086124a8f38"]},{"file":"/var/www/html/ocs/v2.php","line":7,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Teams/TeamManager.php","Line":65,"message":"No provider found for id account","exception":{},"CustomMessage":"No provider found for id account"}}

This error message occurs always multiple times when I switch to the contacts app.

Since the update I realized a contact group 'Zuletzt kontaktiert' (Recently used), never realized before. This contact group contains some contacts I haven't created! As far as I can see they come from a calendar appointment, I've recieved for a webinar a couple of days before. There are 11 contacts. And I got 11 error messages, almost every time when I'm working within the contacts. Deleting the calendar entry doesn't help.

BR SMF

System at 127.0.0.1: NC 30.0.1 Docker image Alpine php-fpm adapted to my needs, containerized but not the AIO solution, Host Almalinux 9.4, Podman 4.9, Postgres 16.4, Redis 7.0.15, NGinx 1.27.2

mf-in-mun avatar Oct 19 '24 08:10 mf-in-mun

Same Problem with 30.0.1 here.

klauweg avatar Oct 19 '24 12:10 klauweg

Yeah they didn't fix it.

melroy89 avatar Oct 19 '24 13:10 melroy89

if you don't use the features of the " Teams" app you can disable it and the errors will go away. maybe this report should be moved to the teams app developers?

tony5 avatar Oct 19 '24 13:10 tony5

Hi

Can confirm this bug, hit's me too with NC 30.0.1. Disabling the Teams app made the errors stop.

phxyz12 avatar Oct 26 '24 06:10 phxyz12

I'm using the "Collectives" App. Teams (Circles) is a prerequisite for that, so I can't disable it. Did anybody dig deeper into that? Can the teams app be fixed?

KernSani avatar Oct 28 '24 22:10 KernSani

I'm using the "Collectives" App. Teams (Circles) is a prerequisite for that, so I can't disable it. Did anybody dig deeper into that? Can the teams app be fixed?

Would need a Bug report in the Nextcloud Teams/Circles repository.

gelbphoenix avatar Oct 29 '24 11:10 gelbphoenix

Wild guess but: Shouldn't this be a if-else block?

public function getProvider(string $providerId): ITeamResourceProvider { $providers = $this->getProviders(); if (isset($providers[$providerId])) { return $providers[$providerId]; }

throw new \RuntimeException('No provider found for id ' . $providerId); }

Source: TeamManager.php Lines 59-66

Yes, and return null and in the call function getTeamsForResource , the provider should already be checked for null and an empty array should be returned just like at the beginning of the function

	public function getTeamsForResource(string $providerId, string $resourceId, string $userId): array {
		if (!$this->hasTeamSupport()) {
			return [];
		}

		$provider = $this->getProvider($providerId);
/**
 here `please` check if($provider === null){return [];}
 */

		return array_values(array_filter(array_map(function ($teamId) use ($userId) {
			$team = $this->getTeam($teamId, $userId);
			if ($team === null) {
				return null;
			}

			return new Team(
				$teamId,
				$team->getDisplayName(),
				$this->urlGenerator->linkToRouteAbsolute('contacts.contacts.directcircle', ['singleId' => $teamId]),
			);
		}, $provider->getTeamsForResource($resourceId))));
	}

Source: TeamManager.php Lines 91-1003

funoftracer avatar Oct 30 '24 07:10 funoftracer

Would need a Bug report in the Nextcloud Teams/Circles repository. Looks like it's already reported: https://github.com/nextcloud/circles/issues/1713

KernSani avatar Oct 30 '24 20:10 KernSani

Fresh install of nextcloud:

  • Ubuntu 24.04
  • nextcloud 30.0.1

Syncing contacts with DAVx5 app on Android. Sync is giving me HTTP 400 error client-side, Serverside I get RuntimeException No provider found for id account

deathbybandaid avatar Oct 30 '24 20:10 deathbybandaid

Still not solved in v30.0.2

melroy89 avatar Nov 07 '24 22:11 melroy89

Same here on 30.0.2 Distributor ID: Ubuntu 22.04.4 LTS PHP 8.3.13

Schmidtjanroman avatar Nov 09 '24 09:11 Schmidtjanroman

Same here on 30.0.2 I really don't understand how this bug still enters stable releases, it leaves a bad taste regarding Q&A.

Gekko23 avatar Nov 14 '24 12:11 Gekko23

Same here on 30.0.2 I really don't understand how this bug still enters stable releases, it leaves a bad taste regarding Q&A.

That is because this is mostly a bug in the Nextcloud Circles app and not in the server. The bug is also already reported in the regarding Repository as nextcloud/circles#1713

gelbphoenix avatar Nov 14 '24 13:11 gelbphoenix

That is because this is mostly a bug in the Nextcloud Circles app and not in the server.

If that is true, maybe Nextcloud could improve error logging...? For example provide the plugin and/or app name in the log output? Or something...

That will allow us to open tickets at the correct project and not at Nextcloud server.

melroy89 avatar Nov 14 '24 23:11 melroy89

same here.. 30.0.2 (just reporting to create noise on this bug so that it gets fixed thanks all!)

rzumbado avatar Nov 15 '24 15:11 rzumbado

Same here on 30.0.2 I really don't understand how this bug still enters stable releases, it leaves a bad taste regarding Q&A.

That is because this is mostly a bug in the Nextcloud Circles app and not in the server. The bug is also already reported in the regarding Repository as nextcloud/circles#1713

Nextcloud server produces an error, this error is in the error logs with no indication where it's originated. It is a bold statement that every user needs to know what sub project produces errors when no indication is given in the error logs. I guess it's best to either improve error log outputs or get into errors when they massively occur. Because this STILL is a heavy issue regarding Q&A, when errors that occur massively will be answered with not-responsible blame games.

Gekko23 avatar Nov 18 '24 08:11 Gekko23

Same on 30.0.3

nbaak avatar Dec 08 '24 18:12 nbaak

Same here with 30.0.4

Cees2439867 avatar Dec 14 '24 07:12 Cees2439867