end_to_end_encryption icon indicating copy to clipboard operation
end_to_end_encryption copied to clipboard

Cannot create folder in other encrypted folder

Open jvhoffbauer opened this issue 4 years ago • 4 comments

#190 # How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.

Steps to reproduce

Not deterministically reproducible.

  1. Create encrypted folder A, create another folder B inside
  2. Using android client: Upload many files to folder /A/B
  3. Break internet connection during upload
  4. Using android client: Create folder C in A/

Expected behaviour

Folder C should be created

Actual behaviour

Folder C not created and error on Android client: "Die Operation kann nicht abgeschlossen werden. Server nicht erreichbar" / my translation: "Operation cannot finish. Server not reachable"

Server configuration

Operating system: OS: Ubuntu 20.04.1 LTS

Using docker-compose according to https://blog.ssdnodes.com/blog/installing-nextcloud-docker/ Web server, PHP version: from nextcloud:latest Database: from mariadb:latest Nextcloud version: 20.0.2

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

Where did you install Nextcloud from: Docker image

Signing status:

Signing status No errors have been found.

List of activated apps:

App list

Enabled:

  • accessibility: 1.6.0
  • activity: 2.13.3
  • bruteforcesettings: 2.0.1
  • calendar: 2.1.2
  • cloud_federation_api: 1.3.0
  • comments: 1.10.0
  • contacts: 3.4.2
  • contactsinteraction: 1.1.0
  • dashboard: 7.0.0
  • dav: 1.16.1
  • end_to_end_encryption: 1.6.2
  • federatedfilesharing: 1.10.1
  • federation: 1.10.1
  • files: 1.15.0
  • files_pdfviewer: 2.0.1
  • files_rightclick: 0.17.0
  • files_sharing: 1.12.0
  • files_trashbin: 1.10.1
  • files_versions: 1.13.0
  • files_videoplayer: 1.9.0
  • firstrunwizard: 2.9.0
  • logreader: 2.5.0
  • lookup_server_connector: 1.8.0
  • mail: 1.7.0
  • nextcloud_announcements: 1.9.0
  • notifications: 2.8.0
  • oauth2: 1.8.0
  • password_policy: 1.10.1
  • photos: 1.2.0
  • privacy: 1.4.0
  • provisioning_api: 1.10.0
  • recommendations: 0.8.0
  • richdocuments: 3.7.10
  • serverinfo: 1.10.0
  • settings: 1.2.0
  • sharebymail: 1.10.0
  • spreed: 10.0.3
  • support: 1.3.0
  • survey_client: 1.8.0
  • systemtags: 1.10.0
  • text: 3.1.0
  • theming: 1.11.0
  • twofactor_backupcodes: 1.9.0
  • updatenotification: 1.10.0
  • user_status: 1.0.1
  • viewer: 1.4.0
  • weather_status: 1.0.0
  • workflowengine: 2.2.0 Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_ldap

Nextcloud configuration:

Config report
{
    "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
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.example.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.2.2",
        "overwrite.cli.url": "http:\/\/nextcloud.example.com
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "overwriteprotocol": "https"
    }
}

Are you using encryption: end-to-end only

Logs

Please tell me more exactly, which logs you need.

Nextcloud log (data/nextcloud.log)

Nextcloud log

Excerpt:

nextcloud-proxy | nginx.1    | * - jvh [27/Nov/2020:11:23:41 +0100] "GET /ocs/v2.php/apps/end_to_end_encryption/api/v1/meta-data/1309?format=json HTTP/1.1" 200 2575 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.0"
nextcloud-app  | * - jvh [27/Nov/2020:11:23:41 +0100] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2FVault%2F8e3a931fb80e4ed4bf3dbf40b8cd145a%2F&reshares=true&subfiles=true HTTP/1.1" 200 883 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.0"
nextcloud-proxy | nginx.1    | * - jvh [27/Nov/2020:11:23:41 +0100] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2FVault%2F8e3a931fb80e4ed4bf3dbf40b8cd145a%2F&reshares=true&subfiles=true HTTP/1.1" 200 138 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.0"
nextcloud-app  | * - jvh [27/Nov/2020:11:23:46 +0100] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1" 304 251 "-" "Mozilla/5.0 (Macintosh) mirall/3.0.3git (build 3799) (Nextcloud)"
nextcloud-proxy | nginx.1    | * - jvh [27/Nov/2020:11:23:46 +0100] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh) mirall/3.0.3git (build 3799) (Nextcloud)"
nextcloud-app  | * - jvh [27/Nov/2020:11:23:46 +0100] "PROPFIND /remote.php/dav/files/jvh/ HTTP/1.1" 207 1006 "-" "Mozilla/5.0 (Macintosh) mirall/3.0.3git (build 3799) (Nextcloud)"
nextcloud-proxy | nginx.1    | * - jvh [27/Nov/2020:11:23:46 +0100] "PROPFIND /remote.php/dav/files/jvh/ HTTP/1.1" 207 248 "-" "Mozilla/5.0 (Macintosh) mirall/3.0.3git (build 3799) (Nextcloud)"
nextcloud-app  | * - jvh [27/Nov/2020:11:23:47 +0100] "POST /ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/1309?format=json HTTP/1.1" 403 825 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.0"
nextcloud-proxy | nginx.1    | * - jvh [27/Nov/2020:11:23:47 +0100] "POST /ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/1309?format=json HTTP/1.1" 403 96 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.0"

Also notably: I cannot upload files to this folder. It says unknown error in upload dialog.

P.S. Thanks for working on this awesome feature

jvhoffbauer avatar Nov 27 '20 10:11 jvhoffbauer

Would assume, that this is somewhat related to #197

jvhoffbauer avatar Nov 27 '20 10:11 jvhoffbauer

  • Break internet connection during upload

You first have to finish your existing upload, then folder gets unlocked, then you can create folder C.

tobiasKaminsky avatar Nov 27 '20 10:11 tobiasKaminsky

So I was trying to finish it and it always reported Unknown error for any file in the upload queue. In case you require any other information, e.g. db tables, please tell me.

jvhoffbauer avatar Nov 27 '20 11:11 jvhoffbauer

So I just reproduced the error.

  1. Setup plain nextcloud instance in docker, as described here: https://github.com/nextcloud/docker#base-version---apache
  2. Connect to localhost:8080 via browser, init nextcloud. Install end-to-end encryption app.
  3. Connect via desktop client (MacOs 3.0.3) and enable encryption. Create encrypted folders A/B/
  4. Connect via android client (3.14.0) and open encrypted folder A/B/. Enter mnemonic.
  5. Upload some files via desktop client to A/B/. Also create a folder in A/B/. Works fine
  6. With android client: a) Upload multiple files via android client to A/B/. b) Break internet connection while an upload is running. c) Reconnect with internet. d) Resume upload

Expected behavior: Resumes interrupted upload and continues to upload remaining files. Also, can still create folders in A/B/.

Actual behavior: Remaining uploads always stop with Unknown Error. Cannot create folder in A/B/. Gives "Operation cannot finish. Server not reachable" (or in German: Operation kann nicht abgeschlossen werden. Server nicht erreichbar)

I would assume, that the file system is in some invalid state after the interrupted upload.

jvhoffbauer avatar Nov 27 '20 20:11 jvhoffbauer

This sounds like an Android client matter. Likely due to locking and e2e-token management or something like that. I also suspect it's been fixed long ago (the e2e code has been extensively modified in the Android client since this report came in). I'm going to close this out, but feel free to open an issue in the Android repository if you still experience it (it would be helpful to see the Android debug logs if so - see instructions in that repo for getting those logs and/or reproduce on a parallel Dev edition of the client installed from F-Droid or similar so you can get the logs in Settings->Logs).

joshtrichards avatar Dec 26 '23 15:12 joshtrichards