Problem to share Folder or Files with Domain Users when Auto-Completition is enabled since 12.0.2

Since Version 12.0.2 (maybe sinće 12.0.1) i’m unable to share files or folders in my cloud with other LDAP Users.

Only Federated Cloud ID or Email -> Link is working!



My Server Konfig is:
Nextcloud version (eg, 10.0.2): 12.0.0. -> 12.0.1 -> 12.0.2
Operating system and version (eg, Ubuntu 16.04): ubuntu-server 17.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.13.4
PHP version (eg, 5.6): 7.1.8
Is this the first time you’ve seen this error?: yes

Can you reliably replicate it? (If so, please outline steps): yes (try to share files or directories in NC with LDAP Users)

The issue you are facing:
Error no app in context InvalidArgumentException: Invalid cloud id




The output of your Nextcloud log in Admin > Logging:

Error no app in context InvalidArgumentException: Invalid cloud id

/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php - line 626: OC\Federation\CloudIdManager->resolveCloudId(‘ldap_username@’)

/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php - line 553: OCA\Files_Sharing\Controller\ShareesAPIController->getEmail(‘ch’)

/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php - line 492: OCA\Files_Sharing\Controller\ShareesAPIController->searchSharees(‘ch’, ‘file’, Array, 1, 200, true)

[internal function] OCA\Files_Sharing\Controller\ShareesAPIController->search(‘ch’, ‘file’, 1, 200, NULL, true)

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_Sharing\Controller\ShareesAPIController), ‘search’)

/var/www/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_Sharing\Controller\ShareesAPIController), ‘search’)

/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main(‘OCA\Files_Shari…’, ‘search’, Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)

/var/www/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)

/var/www/nextcloud/ocs/v1.php - line 77: OC\Route\Router->match(’/ocsapp/apps/fi…’)
{main}




The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'HIDDEN',
'passwordsalt' => 'HIDDEN',
'secret' => 'HIDDEN',
'trusted_domains' =>
array (
0 => 'MY.DOMAIN',
1 => 'MY.LOCAL.SERVER-IP',
),
'datadirectory' => '/media/cloud/data',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => '/',
'dbtype' => 'mysql',
'version' => '12.0.1.5',
'dbname' => 'HIDDEN',
'dbhost' => '127.0.0.1',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'HIDDEN',
'dbpassword' => 'HIDDEN',
'mysql.utf8mb4' => true,
'htaccess.RewriteBase' => '/',
'logtimezone' => 'Europe/Berlin',
'logfile' => '/media/cloud/data/nextcloud.log',
'log_rotate_size' => 10485760,
'cron_log' => true,
'installed' => true,
'filesystem_check_changes' => 1,
'quota_include_external_storage' => false,
'knowledgebaseenabled' => false,
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => 'true',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
),
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_from_address' => 'HIDDEN',
'mail_domain' => 'MY.DOMAIN',
'mail_smtphost' => 'HIDDEN',
'mail_smtpport' => '465',
'maintenance' => false,
'integrity.check.disabled' => false,
'updater.release.channel' => 'stable',
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\PNG',
1 => 'OC\\Preview\\JPEG',
2 => 'OC\\Preview\\GIF',
3 => 'OC\\Preview\\BMP',
4 => 'OC\\Preview\\XBitmap',
5 => 'OC\\Preview\\MarkDown',
6 => 'OC\\Preview\\MP3',
7 => 'OC\\Preview\\TXT',
8 => 'OC\\Preview\\Movie',
),
'loglevel' => 2,
);





The output of your Apache/nginx/system log in /var/log/____:
LDAP config

±------------------------------±---------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| Configuration | s01 |

±------------------------------±---------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| hasMemberOfFilterSupport | 1 |

| hasPagedResultSupport | |

| homeFolderNamingRule | attr:samaccountname |

| lastJpegPhotoLookup | 0 |

| ldapAgentName | MY.LDAP.ADMIN.EMAILADRESS |

| ldapAgentPassword | *** |

| ldapAttributesForGroupSearch | |

| ldapAttributesForUserSearch | |

| ldapBackupHost | |

| ldapBackupPort | |

| ldapBase | dc=MY,dc=DOMAIN |

| ldapBaseGroups | dc=MY,dc=DOMAIN |

| ldapBaseUsers | dc=MY,dc=DOMAIN |

| ldapCacheTTL | 600 |

| ldapConfigurationActive | 1 |

| ldapDefaultPPolicyDN | |

| ldapDynamicGroupMemberURL | |

| ldapEmailAttribute | mail |

| ldapExperiencedAdmin | 0 |

| ldapExpertUUIDGroupAttr | cn |

| ldapExpertUUIDUserAttr | cn |

| ldapExpertUsernameAttr | cn |

| ldapGidNumber | gidNumber |

| ldapGroupDisplayName | cn |

| ldapGroupFilter | (&(|(objectclass=group))(|(cn=Domänen-Benutzer))) |

| ldapGroupFilterGroups | Domänen-Benutzer |

| ldapGroupFilterMode | 0 |

| ldapGroupFilterObjectclass | group |

| ldapGroupMemberAssocAttr | member |

| ldapHost | DC.MY.DOMAIN |

| ldapIgnoreNamingRules | |

| ldapLoginFilter | (&(&(|(objectclass=user))(|(|(memberof=CN=CLOUDGROUP,CN=Users,DC=MY,DC=DOMAIN)(primaryGroupID=3106))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid)))) |

| ldapLoginFilterAttributes | |

| ldapLoginFilterEmail | 1 |

| ldapLoginFilterMode | 0 |

| ldapLoginFilterUsername | 1 |

| ldapNestedGroups | 0 |

| ldapOverrideMainServer | |

| ldapPagingSize | 500 |

| ldapPort | 389 |

| ldapQuotaAttribute | |

| ldapQuotaDefault | |

| ldapTLS | 0 |

| ldapUserDisplayName | displayname |

| ldapUserDisplayName2 | |

| ldapUserFilter | (&(|(objectclass=user))(|(|(memberof=CN=CLOUDGROUP,CN=Users,DC=MY,DC=DOMAIN)(primaryGroupID=3106)))) |

| ldapUserFilterGroups | CLOUDGROUP |

| ldapUserFilterMode | 0 |

| ldapUserFilterObjectclass | user |

| ldapUuidGroupAttribute | auto |

| ldapUuidUserAttribute | auto |

| turnOffCertCheck | 0 |

| turnOnPasswordChange | 1 |

| useMemberOfToDetectMembership | 1 |

±------------------------------±---------------------------------------------------------------------------------------------------------------------------------------------------------------------+

I have testet that sharing with users in a lokal database is still working.

The Auto-Completition in Search Filed (Username search) is working when typing the first letters of the username while trying to share a folder.

This Auto-Completition function is not working, when using an ldap username.
Instead i get the errors in nc_log like above

“Error no app in context InvalidArgumentException: Invalid cloud id”

And allthough i can’t share files / folders with LDAP Users - every LDAP User can easy login with his/her credentials (LDAP Username, LDAP Password)?

Users are shown in Admin area like before Update to 12.0.x

Update 20.08.

When Auto-Completition is turned off and when using the full ldap-username sharing is working …so could be something wrong with the Auto-Filler in NC 12.0.x?

1 Like

I have the exact same issue.

Any news on this issue ?

Regards,
Vitor

Hey Vitor,

is it related to this Bug?

Yes,
I have the exact same error in log.

Any progress for you ?

Regards,
Vitor

No news at the moment. I think we have to wait for the devs.

Cheers,
Guido

Hi everybody,

Developers, please help us !!!

LDAP integration is really critical for us.

Thank you all in advance :slight_smile:

Hey Vitor,

on a cloned machine I deleted the LDAP user mappings and everything works. But I guess it is not a good idea to do this in a production environment as stated in the description of this function.

Cheers,
Guido

Error seems to be gone with Upgrade 12.0.2 -> 12.0.3

:slight_smile:

Can anybody approve …

Hello,

Yes. Error is gone after upgrade from 12.0.2 to 12.0.3.

:grin: