server icon indicating copy to clipboard operation
server copied to clipboard

we dont can see any ldap users or groups in share

Open mellow2012 opened this issue 2 years ago • 10 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] I agree to follow Nextcloud's Code of Conduct.

What went wrong, what did you observe?

we have an empty list when we want to share with users or groups from the ldap-backend

with the occ command it works, but not in the ui

What did you expect, how polls should behave instead?

let us see users and groups from ldap backend

What steps does it need to replay this bug?

Installation method

Installed/updated from the appstore (Apps section of your site)

Installation type

Updated from a minor version within same major version (i.e. 4.0.0 to 4.1.1)

Affected polls version

5.0.4

Which browser did you use, when experiencing the bug?

  • [ ] Firefox
  • [X] Chrome
  • [ ] Chromium/Chromium based (i.e. Edge)
  • [ ] Safari
  • [ ] Other/Don't know

Other browser

No response

Which System did you use, when experiencing the bug?

  • [X] Windows
  • [ ] Linux
  • [ ] MacOs
  • [ ] iOS
  • [ ] Android
  • [ ] Other/Don't know

Other OS

No response

Add your browser log here

No response

Additional client environment information

No response

NC version

Nextcloud 25 (Nextcloud Hub 3)

Other Nextcloud version

No response

PHP engine version

PHP 8.1

Other PHP version

No response

Database engine

MariaDB

Database Engine version or other Database

No response

Which user-backends are you using?

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

Add your nextcloud server log here

[PHP] Fehler: Error: Undefined array key "CLOUD" at /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php#191 at <<closure>>

 0. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php line 191
    OC\Log\ErrorHandler::onError()
 1. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/Search.php line 72
    OC\Collaboration\Collaborators\MailPlugin->search()
 2. /var/www/vhosts/example.cloud/httpdocs/nextcloud/apps/polls/lib/Service/UserService.php line 160
    OC\Collaboration\Collaborators\Search->search()
 3. /var/www/vhosts/example.cloud/httpdocs/nextcloud/apps/polls/lib/Service/SystemService.php line 122
    OCA\Polls\Service\UserService->search()
 4. /var/www/vhosts/example.cloud/httpdocs/nextcloud/apps/polls/lib/Controller/SystemController.php line 48
    OCA\Polls\Service\SystemService->getSiteUsersAndGroups()
 5. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
    OCA\Polls\Controller\SystemController->userSearch()
 6. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController()
 7. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
 8. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
 9. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/base.php line 1048
    OC\Route\Router->match()
10. /var/www/vhosts/example.cloud/httpdocs/nextcloud/index.php line 36
    OC::handleRequest()

GET /apps/polls/search/users/example
from ###.###.###.### by Administrator at 2023-04-24T14:33:40+00:00



[PHP] Fehler: Error: Trying to access array offset on value of type null at /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php#191 at <<closure>>

 0. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php line 191
    OC\Log\ErrorHandler::onError()
 1. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/Search.php line 72
    OC\Collaboration\Collaborators\MailPlugin->search()
 2. /var/www/vhosts/example.cloud/httpdocs/nextcloud/apps/polls/lib/Service/UserService.php line 160
    OC\Collaboration\Collaborators\Search->search()
 3. /var/www/vhosts/example.cloud/httpdocs/nextcloud/apps/polls/lib/Service/SystemService.php line 122
    OCA\Polls\Service\UserService->search()
 4. /var/www/vhosts/example.cloud/httpdocs/nextcloud/apps/polls/lib/Controller/SystemController.php line 48
    OCA\Polls\Service\SystemService->getSiteUsersAndGroups()
 5. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
    OCA\Polls\Controller\SystemController->userSearch()
 6. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController()
 7. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
 8. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
 9. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/base.php line 1048
    OC\Route\Router->match()
10. /var/www/vhosts/example.cloud/httpdocs/nextcloud/index.php line 36
    OC::handleRequest()

GET /apps/polls/search/users/example
from ###.###.###.### by Administrator at 2023-04-24T14:33:40+00:00



[index] Fehler: Exception: OC\Federation\CloudIdManager::resolveCloudId(): Argument nextcloud/polls#1 ($cloudId) must be of type string, null given, called in /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php on line 191 in file '/var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Federation/CloudIdManager.php' line 101 at <<closure>>

0. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch()
1. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main()
2. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/base.php line 1048
   OC\Route\Router->match()
3. /var/www/vhosts/example.cloud/httpdocs/nextcloud/index.php line 36
   OC::handleRequest()

GET /apps/polls/search/users/example
from ###.###.###.### by Administrator at 2023-04-24T14:33:40+00:00

Additional environment informations

No response

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Additional Information

No response

mellow2012 avatar Apr 25 '23 20:04 mellow2012

This is not a polls error. Moving to the server repo.

dartcafe avatar Apr 25 '23 22:04 dartcafe

thank you for moving it but this problem we just have in polls not in files or somewere else

can i help with more feedback? what did you need?

mellow2012 avatar Apr 26 '23 05:04 mellow2012

ok when i search in the polls share field not with the first letter of a name and start with any other one then i can found users

mellow2012 avatar May 25 '23 20:05 mellow2012

The problem for me is: We can only rely on the results delivered from the search method. Why I moved it is, the error seems to be thrown by a method from the server, not after recieving the result in Polls.

Maybe there is a nother strategy used by the files app or other apps, which I don't know. At least it feels like there is a problem with LDAP again.

dartcafe avatar Jun 21 '23 21:06 dartcafe

So we updated now to 27.1.0 and the problem is still there. Has anyone an idea what the problem is?

I has still the same errors and they pops up in log on every letter i inserted. The error ends when the first name and the first letter of the last name is entered.

mellow2012 avatar Sep 21 '23 10:09 mellow2012

now i updated to 27.1.1 and have this error on every share funktion (in files and in polls)

`[PHP] Fehler: Undefined array key "CLOUD" at /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php#191

GET /ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&itemType=folder&search=a&lookup=false&perPage=25&shareType[]=0&shareType[]=1&shareType[]=6&shareType[]=9&shareType[]=7&shareType[]=10&shareType[]=8&shareType[]=12&shareType[]=undefined&shareType[]=4 from xxx.xxx.xxx.xxx by User at 2023-09-21T12:32:45+00:00

[PHP] Fehler: Trying to access array offset on value of type null at /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php#191

GET /ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&itemType=folder&search=a&lookup=false&perPage=25&shareType[]=0&shareType[]=1&shareType[]=6&shareType[]=9&shareType[]=7&shareType[]=10&shareType[]=8&shareType[]=12&shareType[]=undefined&shareType[]=4 from xxx.xxx.xxx.xxx by User at 2023-09-21T12:32:45+00:00

[no app in context] Fehler: Exception: OC\Federation\CloudIdManager::resolveCloudId(): Argument #1 ($cloudId) must be of type string, null given, called in /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php on line 191 in file '/var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Federation/CloudIdManager.php' line 101 at <>

  1. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch()
  2. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Route/Router.php line 315 OC\AppFramework\App::main()
  3. /var/www/vhosts/example.cloud/httpdocs/nextcloud/ocs/v1.php line 64 OC\Route\Router->match()
  4. /var/www/vhosts/example.cloud/httpdocs/nextcloud/ocs/v2.php line 23 require_once("/var/www/vhosts ... p")

Caused by:

TypeError: OC\Federation\CloudIdManager::resolveCloudId(): Argument #1 ($cloudId) must be of type string, null given, called in /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php on line 191 at <>

  1. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php line 191 OC\Federation\CloudIdManager->resolveCloudId()
  2. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Collaboration/Collaborators/Search.php line 72 OC\Collaboration\Collaborators\MailPlugin->search()
  3. /var/www/vhosts/example.cloud/httpdocs/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php line 227 OC\Collaboration\Collaborators\Search->search()
  4. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230 OCA\Files_Sharing\Controller\ShareesAPIController->search()
  5. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137 OC\AppFramework\Http\Dispatcher->executeController()
  6. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch()
  7. /var/www/vhosts/example.cloud/httpdocs/nextcloud/lib/private/Route/Router.php line 315 OC\AppFramework\App::main()
  8. /var/www/vhosts/example.cloud/httpdocs/nextcloud/ocs/v1.php line 64 OC\Route\Router->match()
  9. /var/www/vhosts/example.cloud/httpdocs/nextcloud/ocs/v2.php line 23 require_once("/var/www/vhosts ... p")

GET /ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&itemType=folder&search=a&lookup=false&perPage=25&shareType[]=0&shareType[]=1&shareType[]=6&shareType[]=9&shareType[]=7&shareType[]=10&shareType[]=8&shareType[]=12&shareType[]=undefined&shareType[]=4 from xxx.xxx.xxx.xxx by User at 2023-09-21T12:32:45+00:00`

mellow2012 avatar Sep 21 '23 13:09 mellow2012

Have you found a workaround ? I discover the problem today on our instance. Searching ldap sharee beginning with "br" displays some contacts, but adding "a" throws this error. Same with "cl" (works) and "cla" (hangs). Others search terms seems to work.

Error is : Undefined array key \"CLOUD\" at /var/www/nextcloud/lib/private/Collaboration/Collaborators/MailPlugin.php#191

Mer0me avatar May 03 '24 14:05 Mer0me

"Share by mail" is the faulty app. Disabling it is a workaround.

Mer0me avatar May 03 '24 14:05 Mer0me