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

Share by mail breaks File Sharing #3457

Closed
FriedCircuits opened this issue Feb 12, 2017 · 6 comments
Closed

Share by mail breaks File Sharing #3457

FriedCircuits opened this issue Feb 12, 2017 · 6 comments

Comments

@FriedCircuits
Copy link

Steps to reproduce

  1. Enable share by mail
  2. Try and share a folder
  3. Name resolution does not show and therefore can't not share

Expected behaviour

When share by mail is disabled name lookup works and I am able to share a folder

Actual behaviour

No name resolution so unable to share even if type name correctly.

Server configuration

Operating system:
Ubuntu Server 16.04
Web server:
Apache
Database:
MySQ
PHP version:
7
Nextcloud version: (see Nextcloud admin page)
11.0.1
Updated from an older Nextcloud/ownCloud or fresh install:
Updated from fresh 11
Where did you install Nextcloud from:
Nextcloud VM/Repos

Are you using external storage, if yes which one: local/smb/sftp/...
local
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Chrome
Operating system:
OSX/Windows 10

Logs

Browser log

Browser log
This is what the browser response is when it requests a search using the API

{"ocs":{"meta":{"status":"failure","statuscode":998,"message":"Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:\n"},"data":[]}}
@nickvergessen
Copy link
Member

Something in your nextcloud.log file?
What are you searching for? A local user?

@FriedCircuits
Copy link
Author

FriedCircuits commented Feb 13, 2017

I dont get anything in the Nextcloud log or apache logs. I could check again. Only clue was in the browser console. I am using local users at the moment.

@somoza
Copy link

somoza commented Jun 15, 2017

Same here, Nextcloud 12 over Centos 7.

@c4539
Copy link

c4539 commented Aug 10, 2017

I have the same issue
My log is telling me the following:

{"reqId":"","level":3,"time":"2017-08-09T21:43:52+02:00","remoteAddr":"","user":"**","app":"no app in context",
"method":"GET","url":"/ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=user&perPage=200&itemType=folder",
"message":"Exception: {"Exception":"InvalidArgumentException","Message":"Invalid cloud id","Code":0,
"Trace":"#0 \/var\/www\/cloud.example.com\/apps\/files_sharing\/lib\/Controller\/ShareesAPIController.php(626):
OC\\Federation\\CloudIdManager->resolveCloudId('user@')
#1 \/var\/www\/cloud.example.com\/apps\/files_sharing\/lib\/Controller\/ShareesAPIController.php(553): OCA\\Files_Sharing\\Controller\\ShareesAPIController->getEmail('user')
#2 \/var\/www\/cloud.example.com\/apps\/files_sharing\/lib\/Controller\/ShareesAPIController.php(492): OCA\\Files_Sharing\\Controller\\ShareesAPIController->searchSharees('user', 'folder', Array, 1, 200, true)
#3 [internal function]: OCA\\Files_Sharing\\Controller\\ShareesAPIController->search('user', 'folder', 1, 200, NULL, true)
#4 \/var\/www\/cloud.example.com\/lib\/private\/AppFramework\/Http\/Dispatcher.php(160): call_user_func_array(Array, Array)
#5 \/var\/www\/cloud.example.com\/lib\/private\/AppFramework\/Http\/Dispatcher.php(90): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Files_Sharing\\Controller\\ShareesAPIController), 'search')
#6 \/var\/www\/cloud.example.com\/lib\/private\/AppFramework\/App.php(114): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Files_Sharing\\Controller\\ShareesAPIController), 'search')
#7 \/var\/www\/cloud.example.com\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main('OCA\\\\Files_Shari...', 'search', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)
#8 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)
#9 \/var\/www\/cloud.example.com\/lib\/private\/Route\/Router.php(299): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)
#10 \/var\/www\/cloud.example.com\/ocs\/v1.php(77): OC\\Route\\Router->match('\/ocsapp\/apps\/fi...')\n#11 {main}","File":"\/var\/www\/cloud.example.com\/lib\/private\/Federation\/CloudIdManager.php","Line":68}",
"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36","version":"12.0.1.5"}

Reason for this is that the system address book contains some contacts with CLOUD = username@ instead of username@cloud.example.com.
I think this has something to do with legacy data from an earlier OwnCloud installation.
What do you thing?

@MorrisJobke
Copy link
Member

Potential fix is in #6076

@c4539
Copy link

c4539 commented Aug 14, 2017

Much better than my quick fix. Thanks @nickvergessen !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants