nextcloud / nextcloud/sharepoint

Couldn't get access to sharepoint resource

Open
#47 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
33
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce
  1. Add sharepoint resource
  1. Try to open directory
  2. Nothing in directory and error.
Expected behaviour

Getting access to directory.

Actual behaviour

Error 'This directory is unavailable, please check the logs or contact the administrator'.

Server configuration

Operating system: Ubuntu 18.04 LTS

Web server: Nginx

Database: PostgreSQL 12.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.2.0) 9.2.0, 64-bit

PHP version: 7.3.16

Nextcloud version: 18.03

Updated from an older Nextcloud/ownCloud or fresh install: Fresh install

Where did you install Nextcloud from: https://github.com/bentolor/docker-nextcloud-collabora-postgresql-letsencrypt

Signing status:

No errors have been found.
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

Enabled: - accessibility: 1.4.0 - activity: 2.11.0 - apporder: 0.9.0 - audioplayer: 2.9.0 - calendar: 2.0.3 - cloud_federation_api: 1.1.0 - comments: 1.8.0 - contacts: 3.2.0 - dav: 1.14.0 - deck: 0.8.2 - extract: 1.2.3 - federatedfilesharing: 1.8.0 - federation: 1.8.0 - files: 1.13.1 - files_external: 1.9.0 - files_markdown: 2.2.0 - files_mindmap: 0.0.20 - files_pdfviewer: 1.7.0 - files_rightclick: 0.15.2 - files_sharing: 1.10.1 - files_trashbin: 1.8.0 - files_versions: 1.11.0 - files_videoplayer: 1.7.0 - firstrunwizard: 2.7.0 - logreader: 2.3.0 - lookup_server_connector: 1.6.0 - nextcloud_announcements: 1.7.0 - notifications: 2.6.0 - oauth2: 1.6.0 - password_policy: 1.8.0 - photos: 1.0.0 - privacy: 1.2.0 - provisioning_api: 1.8.0 - recommendations: 0.6.0 - registration: 0.4.7 - richdocuments: 3.5.3 - serverinfo: 1.8.0 - settings: 1.0.0 - sharebymail: 1.8.0 - sharepoint: 1.5.0 - support: 1.1.0 - survey_client: 1.6.0 - systemtags: 1.8.0 - text: 2.0.0 - theming: 1.9.0 - twofactor_backupcodes: 1.7.0 - updatenotification: 1.8.0 - viewer: 1.2.0 - workflowengine: 2.0.0 Disabled: - admin_audit - documentserver_community - encryption - forms - user_ldap
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

{ "system": { "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "****-nextcloud.ru" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "18.0.3.0", "overwrite.cli.url": "http:\/\/localhost", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "overwriteprotocol": "https", "maintenance": false, "loglevel": 2, "app_install_overwrite": [ "sharepoint" ] } }
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using external storage, if yes which one: local/Sharepoint

Are you using encryption: no

Are you using an external user-backend, if yes which one: Webdav/Sharepoint

Client configuration

Browser: Vivaldi 2.10.1745.21 (Stable channel) (64-bit)

Operating system: Windows 10

Logs
Web server error log
Web server error log
Insert your webserver log here
Nextcloud log (data/nextcloud.log)
Nextcloud log
[webdav] Fatal: Exception: Не удается найти ресурс для запроса ListItemAllFields. at <<closure>>

 0. /var/www/html/custom_apps/sharepoint/vendor/vgrem/php-spo/src/Runtime/ClientRequest.php line 138
    Office365\PHP\Client\Runtime\ClientRequest->validateResponse("{\"error\":{\"c ... }")
 1. /var/www/html/custom_apps/sharepoint/vendor/vgrem/php-spo/src/Runtime/ClientRuntimeContext.php line 129
    Office365\PHP\Client\Runtime\ClientRequest->executeQuery()
 2. /var/www/html/custom_apps/sharepoint/vendor/vgrem/php-spo/src/SharePoint/ClientContext.php line 83
    Office365\PHP\Client\Runtime\ClientRuntimeContext->executeQuery()
 3. /var/www/html/custom_apps/sharepoint/lib/Client.php line 454
    Office365\PHP\Client\SharePoint\ClientContext->executeQuery()
 4. /var/www/html/custom_apps/sharepoint/lib/Client.php line 400
    OCA\SharePoint\Client->loadAndExecute(Office365\PHP\Cl ... l}, ["Id"])
 5. /var/www/html/custom_apps/sharepoint/lib/Storage/Storage.php line 177
    OCA\SharePoint\Client->isHidden(Office365\PHP\Cl ... l})
 6. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 102
    OCA\SharePoint\Storage\Storage->opendir("")
 7. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 102
    OC\Files\Storage\Wrapper\Wrapper->opendir("")
 8. /var/www/html/lib/private/Files/Storage/Wrapper/Availability.php line 121
    OC\Files\Storage\Wrapper\Wrapper->opendir("")
 9. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 102
    OC\Files\Storage\Wrapper\Availability->opendir("")
10. /var/www/html/lib/private/Files/Cache/Scanner.php line 376
    OC\Files\Storage\Wrapper\Wrapper->opendir("")
11. /var/www/html/lib/private/Files/Cache/Scanner.php line 427
    OC\Files\Cache\Scanner->getNewChildren("")
12. /var/www/html/lib/private/Files/Cache/Scanner.php line 407
    OC\Files\Cache\Scanner->handleChildren("", false, 3, 9916, true, 0)
13. /var/www/html/lib/private/Files/Cache/Scanner.php line 339
    OC\Files\Cache\Scanner->scanChildren("", false, 3, 9916, true)
14. /var/www/html/lib/private/Files/View.php line 1340
    OC\Files\Cache\Scanner->scan("", false)
15. /var/www/html/lib/private/Files/View.php line 1384
    OC\Files\View->getCacheEntry(OCA\Files_Trashb ... l}, "", "//TM")
16. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 223
    OC\Files\View->getFileInfo("/aryadovoy/files/TM")
17. /var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php line 76
    OCA\DAV\Connector\Sabre\Directory->getChild("TM")
18. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 967
    Sabre\DAV\Tree->getNodeForPath("files/aryadovoy/TM")
19. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    Sabre\DAV\Server->getPropertiesIteratorForPath("files/aryadovoy/TM", ["{DAV:}getlastm ... "], 1)
20. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
21. <<closure>>
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
22. /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
23. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
24. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
25. /var/www/html/apps/dav/lib/Server.php line 319
    Sabre\DAV\Server->exec()
26. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
27. /var/www/html/remote.php line 165
    require_once("/var/www/html/a ... p")

PROPFIND /remote.php/dav/files/aryadovoy/TM
from 51.15.84.232 by aryadovoy at 2020-04-12T10:28:39+00:00
Browser log
Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SharePoint call chain in lib/Client.php around lines 400 and 454, then inspect lib/Storage/Storage.php around line 177 where opendir triggers the failure. Reproduce by opening the configured SharePoint directory and review the logged ListItemAllFields error; done means the directory opens and its contents are accessible without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.