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

Existing files in google drive with special characters cannot be downloaded when mounted as external storage. #23692

Closed
SergioBertolinSG opened this issue Mar 31, 2016 · 12 comments

Comments

@SergioBertolinSG
Copy link
Contributor

Steps to reproduce:

  1. Upload files to google drive which has special characters and spaces in the name.
  2. Mount google drive (authorizing it and so on).
  3. Try to download one of the files with special characters.

Expected behaviour:

Files can be downloaded.

Actual behaviour

<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\ServiceUnavailable</s:exception>
<s:message>Could not open file</s:message>
</d:error>

Server configuration

Operating system:
Ubuntu 14.04

Web server:
Apache

Database:
MySQL

PHP version:
5.5.9

ownCloud version: (see ownCloud admin page)
{"installed":true,"maintenance":false,"version":"9.0.1.1","versionstring":"9.0.1 RC1","edition":"Enterprise"}

Updated from an older ownCloud or fresh install:
Fresh

The content of config/config.php:


Are you using external storage, if yes which one: local/smb/sftp/...
No.

Are you using encryption:
No.

Logs

{"reqId":"CoEQR4l6Da1dja5v7lPK","remoteAddr":"hidden_ip","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Could not open file\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/opt\\\/owncloud\\\/remote.php(138): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#7 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/file.php\",\"Line\":306,\"User\":\"admin\"}","level":4,"time":"2016-03-31T07:55:56+00:00","method":"GET","url":"\/remote.php\/webdav\/GoogleDrive\/Guia%20Viva%20Espa%C3%B1a%20en%20moto%20(2).pdf","user":"admin"}

Client configuration

browser
Chrome

@PVince81
Copy link
Contributor

@atroxix looks strangely like what we discussed in owncloud/client#4573

@PVince81
Copy link
Contributor

Ah no, wrong. The linked ticket is about something else.

@PVince81
Copy link
Contributor

@SergioBertolinSG mind posting the file name you used ? Because we have unit tests (that needs to be run locally with own account) that already confirm that special chars work.

@PVince81
Copy link
Contributor

@SergioBertolinSG also, was it uploaded with a Mac (NFD encoding) ?

@SergioBertolinSG
Copy link
Contributor Author

@PVince81 all files with special characters fail. For example "Primeros pasos con Dropbox español.pdf".

@SergioBertolinSG
Copy link
Contributor Author

Files were uploaded to google drive using their web ui.

@PVince81
Copy link
Contributor

From a Mac ? 😉
Were the files created/named on Mac ?

@SergioBertolinSG
Copy link
Contributor Author

Yes.

@PVince81
Copy link
Contributor

I copy-pasted the file name to my console and it shows weirdly. convmv tells me that it's a NFD-encoded file name:

% cp Primeros\ pasos\ con\ Dropbox\ espan<0303>ol.pdf enctest 

% convmv -r -f utf8 -t utf8 --nfc -r enctest

Starting a dry run without changes...
mv "enctest/Primeros pasos con Dropbox español.pdf"     "enctest/Primeros pasos con Dropbox español.pdf"
No changes to your files done. Would have converted 1 files in 0 seconds.
Use --notest to finally rename the files.

So this is a duplicate of #21365

@SergioBertolinSG can you try creating a new file locally on Linux/Windows and manually type in the "n" + accent character ? Upload that directly to GDrive, then test again.
This would guarantee that it uses the NFC UTF-8 encoding instead of Mac's fancy exotic NFD one.

@SergioBertolinSG
Copy link
Contributor Author

@PVince81 Yes, uploading from windows works fine.

BTW, the upload detection problem was also related with this kind of files.

@PVince81
Copy link
Contributor

Thanks, closing as duplicate of #21365

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants