Share functionality broke with upgrade to NC 12.0.1, persistent in NC 12.0.2
Steps to reproduce
- Upgrade from NC 12.0.0 to 12.0.1
- Try sharing something
Expected behaviour
Sharing keeps working
Actual behaviour
Previously shared resources still show as "shared" in the files app, until I click on the file's share tab, at which point the "shared" label disappears. Searching for users or groups to share with doesn't work. Clicking the "share link" checkbox results in an infinite "loading circle".
Server configuration
Operating system: Arch linux
Web server: Apache 2.4.27-1
Database: MariaDB 10.1.26-1
PHP version: 7.1.8 (FPM)
Nextcloud version: (see Nextcloud admin page) 12.0.2
Updated from an older Nextcloud/ownCloud or fresh install: yes
Where did you install Nextcloud from: tarball
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- activity: 2.5.2
- apporder: 0.4.0
- audioplayer: 2.0.2
- bruteforcesettings: 1.0.2
- calendar: 1.5.3
- comments: 1.2.0
- contacts: 1.5.3
- dav: 1.3.0
- federatedfilesharing: 1.2.0
- federation: 1.2.0
- files: 1.7.2
- files_markdown: 1.0.1
- files_pdfviewer: 1.1.1
- files_reader: 1.0.4
- files_sharing: 1.4.0
- files_texteditor: 2.4.1
- files_trashbin: 1.2.0
- files_versions: 1.5.0
- files_videoplayer: 1.1.0
- firstrunwizard: 2.1
- gallery: 17.0.0
- gpxedit: 0.0.7
- keeweb: 0.4.0
- logreader: 2.0.0
- lookup_server_connector: 1.0.0
- mail: 0.6.4
- news: 11.0.5
- nextcloud_announcements: 1.1
- notifications: 2.0.0
- oauth2: 1.0.5
- password_policy: 1.2.2
- previewgenerator: 1.0.6
- provisioning_api: 1.2.0
- quota_warning: 1.0.1
- richdocuments: 1.12.34
- serverinfo: 1.2.0
- sharebymail: 1.2.0
- spreed: 2.0.1
- survey_client: 1.0.0
- systemtags: 1.2.0
- tasks: 0.9.5
- theming: 1.3.0
- twofactor_backupcodes: 1.1.1
- twofactor_totp: 1.3.1
- twofactor_u2f: 1.3.2
- updatenotification: 1.2.0
- workflowengine: 1.2.0
Disabled:
- admin_audit
- direct_menu
- encryption
- files_external
- user_external
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "<redacted>",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"<redacted>",
"<redacted>"
],
"datadirectory": "\/srv\/nextcloud",
"overwrite.cli.url": "<redacted>",
"dbtype": "mysql",
"version": "12.0.2.0",
"dbname": "<redacted>",
"dbhost": "<redacted>",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "UTC",
"installed": true,
"mail_smtpmode": "smtp",
"mail_from_address": "nextcloud",
"mail_domain": "<redacted>",
"mail_smtphost": "localhost",
"mail_smtpport": "25",
"maintenance": false,
"theme": "",
"loglevel": 0,
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.local": "\\OC\\Memcache\\APCu",
"redis": {
"host": "localhost",
"port": 6379
},
"mysql.utf8mb4": true,
"updater.secret": "***REMOVED SENSITIVE VALUE***"
}
}
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Firefox, Chrome, Chromium
Operating system: Arch Linux, Windows 7
Logs
Web server error log
No error log entries are created
Web server access log
<redacted> - - [18/Aug/2017:16:59:51 +0200] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2Fmedia%2Fother&shared_with_me=true HTTP/2.0" 200 242
<redacted> - - [18/Aug/2017:16:59:51 +0200] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2Fmedia%2Fother&reshares=true HTTP/2.0" 200 242
<redacted> - - [18/Aug/2017:16:59:51 +0200] "PROPFIND /remote.php/dav/systemtags-relations/files/23968 HTTP/2.0" 207 554
<redacted> - - [18/Aug/2017:16:59:53 +0200] "POST /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json HTTP/2.0" 200 242
<redacted> - - [18/Aug/2017:16:59:53 +0200] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2Fmedia%2Fother&reshares=true HTTP/2.0" 200 242
Nextcloud log (data/nextcloud.log)
Nextcloud log
No log entries are created when recreating issue
Browser log
Browser log
No other information than what can be seen in the apache access log excerpt above
I can confirm most points. My setup is similar except using nginx instead of apache. In 12.0.1 sharing worked for me, but the update to 12.0.2 broke it. However sharing using a link is (at east in my setup) not affected. Previously created shares still work, but no new ones (user / group shares) can be created.
Sharing Files or Folders with Cloud Users isn't working for me too since 12.0.2 In my case i'm using LDAP User Accounts and thought the problem refers to a broken LDAP Config.
I added a new user in lokal DB and with this Account Shares were possible as usual.
A little bit strange seems the search for Cloud IDs -> Auto Completition didn't deliver any names during search for LDAP Names. When I disable this function in the Admin Section: https://help.nextcloud.com/t/problem-to-share-folder-or-files-with-domain-users-when-auto-completition-is-enabled-since-12-0-2/19827/2?u=chrissi55
I can search for LDAP Users when writing full Cloud Username in the Searchfield.
Disabling the Auto-Completition function in Admin Section will cause an empty Contacts List e.g. Search for Contacts with Icon for Video / Mail -> to start new videochat with somebody
So for the moment i re-enable the Auto-Completition function
And same here, existing shares (with LDAP Accounts) are working fine so far.
My setup is very similar to @MG2R and I am not able to add an email address to share to. The autocomplete used to say (remote) and (email). After upgrading to 12.0.2, only the (remote) option appears. If you enter a fully qualified email address, you get the following error message:
Update: I'm going to leave the below here for posterity in case this helps anyone, but in my case it turns out this problem was due to messed up UTF8 encoding of database entries from my old owncloud install. Once the encodings were fixed (with the help of Daniel at Tech & Me), these issues went away.
I have this issue as well. I just migrated from owncloud to Nextcloud 12.0.2. Everything seems to be working except sharing with a named user. Sharing by link seems to work fine.
My config is similar to the OP, I installed from the recent Nextcloud image from Tech and Me. One difference is that I do have external storage configured to both a local share and Dropbox.
When I attempt to share in the client, I get the following:

When I attempt to share via the web interface, it does nothing. I.e. I just get the spinning wheel for autocompletion, and it never autocompletes. If I type in a known name and hit enter, it does nothing.
One other potentially related oddity: when I try to bring up "contacts" I get an error:

I am not using LDAP like one of the posters above, just local auth.
@nextcloud/sharing
I have the same problem after a test migration from Owncloud to Nextcloud. It is a show stopper at the moment. Is there any kind of known hotfix so that we can roll out the migration?
This is the error log I get (LDAP is enabled):
InvalidArgumentException: Invalid cloud id
/var/www/html/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php - line 626:
OC\Federation\CloudIdManager->resolveCloudId('Binford@')
/var/www/html/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php - line 553:
OCA\Files_Sharing\Controller\ShareesAPIController->getEmail('Binford')
/var/www/html/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php - line 492: OCA\Files_Sharing\Controller\ShareesAPIController->searchSharees('Binford', 'folder', Array, 1, 200, true)
[internal function] OCA\Files_Sharing\Controller\ShareesAPIController->search('Binford', 'folder', 1, 200, NULL, true)
/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)
/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_Sharing\Controller\ShareesAPIController), 'search')
/var/www/html/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_Sharing\Controller\ShareesAPIController), 'search')
/var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('ShareesAPIContr...', 'search', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
/var/www/html/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
/var/www/html/nextcloud/ocs/v1.php - line 77: OC\Route\Router->match('/ocsapp/apps/fi...')
{main}
Hello,
I have exactly the same issue, and same error in log file as @Binford3000 . Can someone put some light on this issue.
Thanks a lot, Vitor
any idea @schiessle?
In the sharee endpoint... mmm seems we should just catch it and ignore then... @nickvergessen
jup, sounds good. catch and continue
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. Is it possible that an invalid username can cause this problem?
Shouldn't. Also, the original issue report goes without LDAP.
same problem..cant share with users :( public links work fine i made a fresh nextcloud install (apache2.4, mysql 80, php71) and brought my data that was previously on owncloud. not sure i would call this a migration. no LDAP.
We haven't heard back on this issue and also can't reproduce it. Let's close it for now and check again if this happens again on an instance.