nextcloud / nextcloud/deck

Sharees not loaded / Disable sharing if `files_sharing` app is disabled

Open
#2,014 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: sharing good first issue
Dominant language
JavaScript
Stars
1.4k
Forks
354
Avg merge
1d 10h
Merged PRs (30d)
43

Description

Describe the bug
The "share board with a user.." input field does not find users or groups to share with.

The request to the /sharees endpoint does not respond with available sharees but fails with the error below. Other apps in the instance (e.g. calendar, tasks) work as expected - i noted though, that their requests to the sharees endpoint fail with the same error, but they also request /remote.php/dav which seems to get the sharee results as well, while the decks app does not do this.
I'm unsure if this is a bug or i am missing something here. Thanks a lot for your time!!

To Reproduce
Steps to reproduce the behavior:

  1. Create new board
  2. Open board details
  3. Type in the "share with a user..." input field

Expected behavior
Users and groups available for sharing should be displayed in a list.

Actual behavior
List is empty.

Client details:

  • OS: Linux
  • Browser Firefox
  • Version 77
  • Device: Desktop
Server details

Operating system: Ubuntu

Web server: nginx

Database: Postgres

PHP version: 7.4.6

Nextcloud version: 19.0.0

Where did you install Nextcloud from: Docker image

Signing status:

No errors have been found.

List of activated apps:

Enabled:
  - bruteforcesettings: 1.6.0
  - calendar: 2.0.3
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - contacts: 3.3.0
  - contactsinteraction: 1.0.0
  - dav: 1.15.0
  - deck: 1.0.2
  - external: 3.6.0
  - federatedfilesharing: 1.9.0
  - files: 1.14.0
  - files_pdfviewer: 1.8.0
  - files_rightclick: 0.16.0
  - files_trashbin: 1.9.0
  - files_videoplayer: 1.8.0
  - groupfolders: 6.0.6
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - notes: 3.5.0
  - oauth2: 1.7.0
  - password_policy: 1.9.1
  - passwords: 2020.6.0
  - polls: 1.4.3
  - provisioning_api: 1.9.0
  - serverinfo: 1.9.0
  - settings: 1.1.0
  - systemtags: 1.9.0
  - tasks: 0.13.1
  - theming: 1.10.0
  - theming_customcss: 1.6.0
  - twofactor_backupcodes: 1.8.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - accessibility
  - activity
  - admin_audit
  - encryption
  - federation
  - files_external
  - files_sharing
  - files_versions
  - firstrunwizard
  - nextcloud_announcements
  - notifications
  - photos
  - privacy
  - rainloop
  - recommendations
  - sharebymail
  - support
  - survey_client
  - text
  - updatenotification
  - user_ldap

Nextcloud configuration:

{
    "system": {
        "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
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "***REMOVED SENSITIVE VALUE***",
            "2": "***REMOVED SENSITIVE VALUE***e"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "19.0.0.12",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "overwriteprotocoll": "https",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "maintenance": false,
        "loglevel": 2
    }
}
Logs
Console Log
`TypeError: t.exact is undefined` in main.js:189
Network Log
Request URL:https://***REMOVED***/ocs/v1.php/apps/files_sharing/api/v1/sharees?search=&format=json&perPage=20&itemType=0%2C1%2C7
Request Method:GET
Remote Address: ***REMOVED***
Status Code:
200
Version:HTTP/2
Referrer Policy:no-referrer

RESPONSE:

ocs | Object { meta: {…}, data: [] }
-- | --
meta | Object { status: "failure", statuscode: 998, message: "Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.\n" }
status | "failure"
statuscode | 998
message | "Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.\n"
data | []

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 by tracing the sharees request to /ocs/v1.php/apps/files_sharing/api/v1/sharees and the TypeError reported at main.js:189. Check how the Deck sharing UI handles a disabled files_sharing app and the returned OCS failure; done means users and groups appear when sharing is available, or sharing is disabled cleanly when the app is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, frontend
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.