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

Safari PDF preview not loading #674

Open
FesTGig opened this issue Oct 29, 2022 · 1 comment
Open

Safari PDF preview not loading #674

FesTGig opened this issue Oct 29, 2022 · 1 comment

Comments

@FesTGig
Copy link

FesTGig commented Oct 29, 2022

Steps to reproduce

  1. open pdf in Safari

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead
The PDF preview is not working in Safari. On Firefox and Chrome its working perfectly.

Server configuration

Operating system:
Debian 11
Web server:
nginx 1.18
Database:
MariaDB
PHP version:
8.1
Nextcloud version: (see Nextcloud admin page)
24.0.6
Where did you install Nextcloud from:

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Client configuration

Browser:
Safari 14.1.2
Operating system:
MacOS 10.14.6

Logs

Nextcloud log (data/owncloud.log)

Insert your Nextcloud log here

Browser log

[Error] Unrecognized Content-Security-Policy directive 'worker-src'.
[Error] SyntaxError: Unexpected private name #ensureObj. Cannot parse class method with private name.
	(anonymous function) (pdf.js:3170)
[Error] SyntaxError: Unexpected private name #onMouseDown. Cannot parse class method with private name.
	(anonymous function) (viewer.js:4062)
[Error] ReferenceError: Can't find variable: PDFViewerApplicationOptions
	(anonymous function) (files_pdfviewer-workersrc.js:2:110080)
@kkofler
Copy link

kkofler commented Nov 22, 2022

As I wrote in #684, the issue appears to be that the Nextcloud PDF viewer is using the default build of PDF.js instead of the legacy build, but only the latter supports the browsers Nextcloud itself supports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants