Skip to content

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

Closed

Description

@SergioBertolinSG

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

Activity

  1. added this to the milestone on Mar 31, 2016
  2. PVince81 commented on Mar 31, 2016

    @PVince81
    Contributor

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

  3. PVince81 commented on Mar 31, 2016

    @PVince81
    Contributor

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

  4. PVince81 commented on Mar 31, 2016

    @PVince81
    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.

  5. PVince81 commented on Mar 31, 2016

    @PVince81
    Contributor

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

  6. SergioBertolinSG commented on Mar 31, 2016

    @SergioBertolinSG
    ContributorAuthor

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

  7. SergioBertolinSG commented on Mar 31, 2016

    @SergioBertolinSG
    ContributorAuthor

    Files were uploaded to google drive using their web ui.

  8. PVince81 commented on Mar 31, 2016

    @PVince81
    Contributor

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

  9. SergioBertolinSG commented on Mar 31, 2016

    @SergioBertolinSG
    ContributorAuthor

    Yes.

  10. PVince81 commented on Mar 31, 2016

    @PVince81
    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.

  11. SergioBertolinSG commented on Mar 31, 2016

    @SergioBertolinSG
    ContributorAuthor

    @PVince81 Yes, uploading from windows works fine.

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

  12. PVince81 commented on Mar 31, 2016

    @PVince81
    Contributor

    Thanks, closing as duplicate of #21365

  13. lock commented on Aug 5, 2019

    @lock

    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.

  14. locked as resolved and limited conversation to collaborators on Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions