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

Files with special characters in their filename cannot be downloaded #3197

Closed
rednil opened this issue Oct 28, 2018 · 10 comments
Closed

Files with special characters in their filename cannot be downloaded #3197

rednil opened this issue Oct 28, 2018 · 10 comments
Labels
approved bug feature: transfers [WIP] Any uploading / downloading matters that aren't auto upload or sync specific hotspot: device storage Storage (on-device) related. Permissions, paths, inconsistencies, etc.

Comments

@rednil
Copy link

rednil commented Oct 28, 2018

Actual behaviour

Trying to download many of my files (presumably those containing some special char, e.g. ":") results in an error.

Expected behaviour

All files with valid filenames on the server should be downloadable. If the app cannot deal with some chars, they should be encoded.

Steps to reproduce

  1. in web UI, rename "welcome.txt" to "welcome:1.txt"
  2. in android app, search "welcome:1.txt", select "download"
  3. see error

Environment data

Android version:
6.0
Device model:
LG4
Stock or customized system:
Stock
Nextcloud app version:
3.3.0
Nextcloud server version:
14.0.3

@nextcloud-android-bot
Copy link
Collaborator

GitMate.io thinks possibly related issues are #1579 (Can't download files), #684 (Files containing "?" in their filename are not downloaded by the client), #685 (Directories containing ":" in their filename are not downloaded (synced) by the client), #764 (Android can not download any file), and #347 (Unable to download files).

@tobiasKaminsky
Copy link
Member

Is your storage configured to use internal or external/sdcard storage?
As far as I know there is / was on older devices fat used on sdcard, which does not allow these characters.

@rednil
Copy link
Author

rednil commented Oct 29, 2018

Tried it on two devices, both configured to use external storage (not sure which filesystem type and how to find that out). Also found #685, so it might well be a duplicate of that. It would still be nice to have a workaround, as (for example) the subsonic app works perfectly well with identical settings on both devices (saves files to ext storage for offline playback).

@stale

This comment was marked as outdated.

@stale stale bot added the stale label May 9, 2019
@stale stale bot closed this as completed May 24, 2019
@tsmacdonald
Copy link

tsmacdonald commented Sep 7, 2022

I have the same issue syncing a folder containing the following files (one filename per line, single quotes not part of the file name):

'Disc 1 - 01 - "La Sonata del Diavolo" in G minor, B. g5: [Largo].ogg'
'Disc 1 - 02 - "La Sonata del Diavolo" in G minor, B. g5: Allegro.ogg'
'Disc 1 - 03 - "La Sonata del Diavolo" in G minor, B. g5: Andante - Allegro - Adagio.ogg'
'Disc 1 - 04 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Theme and Variation 1.ogg'
'Disc 1 - 05 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variations 2 & 4.ogg'
'Disc 1 - 06 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variations 9, 15, & 12.ogg'
'Disc 1 - 07 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variations 10 & 20.ogg'
'Disc 1 - 08 - From "L'\''arte del arco" (Fourteen variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variation 29.ogg'
'Disc 1 - 09 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variation 30.ogg'
'Disc 1 - 10 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variation 33.ogg'
'Disc 1 - 11 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variation 34.ogg'
'Disc 1 - 12 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variation 23.ogg'
'Disc 1 - 13 - From "L'\''arte del arco" (Fourteen Variations on the Gavotte from op. 5 no. 10 by Corelli), B. F11: Variation 38.ogg'
'Disc 1 - 14 - Sonata in A minor, B. a3: Cantabile.ogg'
'Disc 1 - 15 - Sonata in A minor, B. a3: Allegro.ogg'
'Disc 1 - 16 - Sonata in A minor, B. a3: [Andante].ogg'
'Disc 1 - 17 - Sonata in A minor, B. a3: Giga.ogg'
'Disc 1 - 18 - Sonata in A minor, B. a3: Aria (with variations).ogg'
'Disc 1 - 19 - Sonata in A minor, B. a3: Variation I.ogg'
'Disc 1 - 20 - Sonata in A minor, B. a3: Variation II.ogg'
'Disc 1 - 21 - Sonata in A minor, B. a3: Variation III.ogg'
'Disc 1 - 22 - Sonata in A minor, B. a3: Variation IV.ogg'
'Disc 1 - 23 - Sonata in A minor, B. a3: Variation V.ogg'
'Disc 1 - 24 - "Pastorale" for violin in scordature, B. A16: Grave.ogg'
'Disc 1 - 25 - "Pastorale" for violin in scordature, B. A16: Allegro.ogg'
'Disc 1 - 26 - "Pastorale" for violin in scordature, B. A16: Largo - Presto - Andante.ogg'

("same issue" = "when I try to sync the folder on my Android phone, I get 26 notifications about Download failed: Could not download $FILENAME.ogg)

I renamed the files to 01.ogg, 02.ogg, etc. and the folder synced successfully.

This is on server version 24.0.3 (managed by Hetzner) and Android app version 3.21.0 (installed via F-Droid).

@AlvaroBrey AlvaroBrey removed the stale label Sep 8, 2022
@AlvaroBrey AlvaroBrey reopened this Sep 8, 2022
@TLATER
Copy link

TLATER commented Oct 23, 2022

Seeing this too, I think the issue is new since upgrading to nextcloud 24, but I also switched from the docker container to my distro's package, so I can't say for sure. It appears to be on the app side, the server logs show a clear OK:

87.249.133.114 - tlater [23/Oct/2022:23:47:24 +0100] "GET /remote.php/dav/files/tlater//stuff/2022-10-23T15%3A51%3A58.png HTTP/1.1" 200 2539659 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.21.2"

Is there anything I can do on the app side to see debug logs, or any kind of clearer reason than "download failed"?

@AlvaroBrey
Copy link
Member

AlvaroBrey commented Nov 23, 2022

Confirmed. Here's a trace:

2022-11-23 14:59:44.540 20101-20183 DownloadFi...eOperation com.nextcloud.client                 E  Download of /Talk/welcome:1.md to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/test@192.168.1.x/Talk/welcome:1.md: Unrecovered transport exception
                                                                                                    java.io.IOException: Operation not permitted
                                                                                                    	at java.io.UnixFileSystem.createFileExclusively0(Native Method)
                                                                                                    	at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)
                                                                                                    	at java.io.File.createNewFile(File.java:1006)
                                                                                                    	at com.owncloud.android.lib.resources.files.DownloadFileRemoteOperation.downloadFile(DownloadFileRemoteOperation.java:113)
                                                                                                    	at com.owncloud.android.lib.resources.files.DownloadFileRemoteOperation.run(DownloadFileRemoteOperation.java:88)
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:205)
                                                                                                    	at com.owncloud.android.operations.DownloadFileOperation.run(DownloadFileOperation.java:180)
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:205)
                                                                                                    	at com.owncloud.android.files.services.FileDownloader.downloadFile(FileDownloader.java:474)
                                                                                                    	at com.owncloud.android.files.services.FileDownloader.access$400(FileDownloader.java:88)
                                                                                                    	at com.owncloud.android.files.services.FileDownloader$ServiceHandler.handleMessage(FileDownloader.java:424)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                    	at android.os.Looper.loop(Looper.java:288)
                                                                                                    	at android.os.HandlerThread.run(HandlerThread.java:67)

As expected this is a limitation of the underlying filesystem, more research needed

@AlvaroBrey
Copy link
Member

AlvaroBrey commented Nov 23, 2022

Related: #685 #2711

@joshtrichards
Copy link
Member

While not encoding, the error message handling was improved in #11384

@joshtrichards joshtrichards added hotspot: device storage Storage (on-device) related. Permissions, paths, inconsistencies, etc. feature: transfers [WIP] Any uploading / downloading matters that aren't auto upload or sync specific labels Oct 15, 2023
@joshtrichards
Copy link
Member

Duplicate of #8523
Fixed by #11384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved bug feature: transfers [WIP] Any uploading / downloading matters that aren't auto upload or sync specific hotspot: device storage Storage (on-device) related. Permissions, paths, inconsistencies, etc.
Projects
None yet
Development

No branches or pull requests

7 participants