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

Opening/Downloading/Syncrhonizing PDF file with "€" does not work #25684

Closed
Entepotenz opened this issue Feb 16, 2021 · 6 comments
Closed

Opening/Downloading/Syncrhonizing PDF file with "€" does not work #25684

Entepotenz opened this issue Feb 16, 2021 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@Entepotenz
Copy link

According to the changelog https://nextcloud.com/changelog/#latest20 there were some efforts to fix the pdf file behavior.

Unfortunately this did not help.

Is this the first time you've seen this error?: Y

Steps to replicate it:

  1. I do not know :-( Uploading a PDF with character in the filename works flawless

Expected behaviour

  • Opening/Synchronizing/Downloading the file works

Actual behaviour

  • Firefox/Chrome:
    • Error message when trying to display the pdf in the browser:
      https://help.nextcloud.com/uploads/default/original/3X/e/b/ebc987b2c78e09e1e0c58246e0ab53d3474008fa.png
  • Android Client (Nextcloud 3.15.0):
    • When accessing the file by the Android Client nothing happens. Instead I get a notification that the server is in "maintenance mode" which is not true.
  • Windows client (Nextcloud 3.1.2) logs this:
     2021-02-16 17:14:23:551 [ info nextcloud.gui.activity ]:	Activity/Notification/Error successfully dismissed:  "Server replied \"503 Service Unavailable\" to \"GET https://XXX:8443/remote.php/dav/files/XXX/Documents/Vertraege/Versicherungen/XXX/XXX/XXX/SBU_XXX€_XXX.pdf\""
    

The pdf file contains a character and the upper folders contain some german umlauts (like ä,ü,ö)
At the end I added some additional screenshots which might provide some useful information.

Displaying the filename in bash by ls -lah: (strange the "€" is displayed as "?")
https://help.nextcloud.com/uploads/default/original/3X/0/3/03d882fdb7032f9e059f409af9b4a96e61a2dc45.png

Server configuration

Operating system: docker:stable

Web server: docker:stable

Database: sqlite

PHP version: docker:stable

Nextcloud version: 20.0.7

Updated from an older Nextcloud/ownCloud or fresh install: updated from owncloud some time ago

Where did you install Nextcloud from: docker:stable

The output of your Apache/nginx/system log in /var/log/____:
I do not have any apache/nginx/system logs

Signing status:

Signing status No errors have been found.

Nextcloud configuration:

Config report $CONFIG = array ( 'instanceid' => 'XXX', 'passwordsalt' => 'XXX', 'secret' => 'XXX', 'trusted_domains' => array ( 0 => 'localhost', 1 => 'XXX', ), 'datadirectory' => '/var/www/owncloud/data', 'dbtype' => 'sqlite3', 'version' => '20.0.7.1', 'logtimezone' => 'UTC', 'installed' => true, 'memcache.local' => '\\OC\\Memcache\\APCu', 'appstore.experimental.enabled' => true, 'maintenance' => false, 'theme' => '', 'loglevel' => 0, 'updatechecker' => false, 'enable_previews' => true, 'updater.release.channel' => 'stable', 'overwriteprotocol' => 'https', 'overwrite.cli.url' => 'https://XXX:8443', 'updater.secret' => 'XXX', );

Are you using external storage, if yes which one: none

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Firefox 85.0.2

Operating system: Windows 10

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log The output of your Nextcloud log in **Admin > Logging**: [PHP] Error: Error: fopen(/var/www/owncloud/data/XXX/files/Documents/Vertraege/Versicherungen/XXX/XXX/XXX/SBU_XXX€_XXX.pdf): failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#355 at <>
  1. <>
    OC\Log\ErrorHandler::onError(2, "fopen(/var/www/ ... y", "/var/www/html/l ... p", 355, {path: "files/Do ... "})
  2. /var/www/html/lib/private/Files/Storage/Local.php line 355
    fopen("/var/www/ownclo ... f", "r")
  3. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 300
    OC\Files\Storage\Local->fopen("files/Documents ... f", "r")
  4. /var/www/html/lib/private/Files/View.php line 1165
    OC\Files\Storage\Wrapper\Wrapper->fopen("files/Documents ... f", "r")
  5. /var/www/html/lib/private/Files/View.php line 1001
    OC\Files\View->basicOperation("fopen", "/Documents/Vert ... f", ["read"], "r")
  6. /var/www/html/apps/dav/lib/Connector/Sabre/File.php line 434
    OC\Files\View->fopen("Documents/Vertr ... f", "r")
  7. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 90
    OCA\DAV\Connector\Sabre\File->get()
  8. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpGet(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  9. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit("method:GET", [Sabre\HTTP\Requ ... }])
  10. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  11. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 319
    Sabre\DAV\Server->start()
  12. /var/www/html/apps/dav/lib/Server.php line 332
    Sabre\DAV\Server->exec()
  13. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  14. /var/www/html/remote.php line 167
    require_once("/var/www/html/a ... p")

GET /remote.php/dav/files/XXX/Documents/Vertraege/Versicherungen/XXX%C3%A4XXX_XXX/XXX/XXX/SBU_XXX%E2%82%AC_XXX.pdf
from 172.17.0.1 by XXX at 2021-02-15T20:57:11+00:00

Browser log

Browser log network analysis: Request: GET https://XXX:8443/remote.php/dav/files/XXX/Documents/Vertraege/Versicherungen/XXX%C3%A4XXX/XXX/XXX/SBU_XXX%E2%82%AC_XXX.pdf

Response header:
HTTP/2 503 Service Unavailable
server: nginx
date: Tue, 16 Feb 2021 16:28:11 GMT
content-type: text/html; charset=UTF-8
referrer-policy: no-referrer
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-robots-tag: none
x-xss-protection: 1; mode=block
x-powered-by: PHP/7.4.15
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-security-policy: default-src 'none';base-uri 'none';manifest-src 'self';script-src 'self';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self' data:;connect-src 'self';media-src 'self';frame-ancestors 'self';form-action 'self'
strict-transport-security: max-age=15768000; includeSubdomains; preload
X-Firefox-Spdy: h2

FYI: I created a forum post for this too: https://help.nextcloud.com/t/unable-to-open-synchronize-pdf-files-with-special-characters-changelog-298/108000

@Entepotenz Entepotenz added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 16, 2021
@j-ed
Copy link
Contributor

j-ed commented Feb 16, 2021

I did a quick test with Nextcloud 20.0.7 and created a pdf file which contains a Euro character in its name. Unfortunately I have to tell you that I wasn't able to replicate your problem. The file is correctly listed in the directory view and I'm able to open it using Firefox web browser. It is also possible to download the file on a Windows PC. Opening it using the Nextcloud Android app also works without any problem.

@Entepotenz
Copy link
Author

I can confirm that "€" is not the main problem here. As example "test€test.pdf" is working fine for me.

Using the ubuntu 20.04 to read the file name results in this:
'SBU_XXX'$'\032''_XXX_1_filled_signed.pdf'

Can you create a file with this name and try again? Maybe then you are able to reproduce the problem

@j-ed
Copy link
Contributor

j-ed commented Feb 19, 2021

Sorry, but although I can create a file named 'SBU_XXX'$'\032''_XXX_1_filled_signed.pdf' on the console, this cannot be seen or accessed using Nextcloud on my server. BTW, which application is creating such strange file names?

@JSoko
Copy link
Member

JSoko commented Feb 20, 2021

Should be adressed here, but the new release with the fix isn't released yet:

nextcloud/files_pdfviewer#321
nextcloud/files_pdfviewer#320
nextcloud/files_pdfviewer#319

So, the isue here should be closed.

@Entepotenz
Copy link
Author

Sorry, but although I can create a file named 'SBU_XXX'$'\032''_XXX_1_filled_signed.pdf' on the console, this cannot be seen or accessed using Nextcloud on my server. BTW, which application is creating such strange file names?

Windows nextcloud client -> uploading to debian with nextcloud docker -> moving all files to new server by sftp -> running nextcloud with docker on the new server -> trying to sync the files from new nextcloud server to windows nextcloud client

I guess something changed in the filename encodings on step "moving all files to new server by sftp".

@Entepotenz
Copy link
Author

Should be adressed here, but the new release with the fix isn't released yet:

nextcloud/files_pdfviewer#321
nextcloud/files_pdfviewer#320
nextcloud/files_pdfviewer#319

So, the isue here should be closed.

Is there a easy way to run those changes in my docker container?
Maybe I can check if the error is resolved by those changes?

@j-ed j-ed closed this as completed Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

3 participants