nextcloud / files_pdfviewer

:book: A PDF viewer for Nextcloud
GNU Affero General Public License v3.0
84 stars 43 forks source link

Parameters don't work #139

Closed maprambo closed 2 years ago

maprambo commented 5 years ago

Steps to reproduce

Click the bookmark icon for a link to anchor the current view and paste it in a new window

Expected behaviour

The pdf file should load and the view should be fixed

Actual behaviour

The files app opens (or the login view for publicly shared links)

Server configuration detail

Operating system: Linux 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64

Webserver: Caddy/v1.0.0 (fpm-fcgi)

Database: mysql 10.1.40

PHP version:

7.2.19-0ubuntu0.18.04.1 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, mcrypt, mysqlnd, PDO, xml, apcu, apc, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imagick, intl, json, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, smbclient, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 16.0.1 - 16.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install: Updated from the second-latest stable

Where did you install Nextcloud from: nextcloud.com zip / updater

Signing status Array ( )
List of activated apps ``` Enabled: - accessibility: 1.2.0 - activity: 2.9.1 - calendar: 1.7.0 - cloud_federation_api: 0.2.0 - dav: 1.9.2 - deck: 0.6.2 - federatedfilesharing: 1.6.0 - federation: 1.6.0 - files: 1.11.0 - files_automatedtagging: 1.6.0 - files_external: 1.7.0 - files_linkeditor: 1.0.10 - files_markdown: 2.0.6 - files_pdfviewer: 1.5.0 - files_retention: 1.5.1 - files_rightclick: 0.13.0 - files_sharing: 1.8.0 - files_texteditor: 2.8.0 - files_trashbin: 1.6.0 - files_versions: 1.9.0 - files_videoplayer: 1.5.0 - firstrunwizard: 2.5.0 - gallery: 18.3.0 - impersonate: 1.3.0 - issuetemplate: 0.5.0 - logreader: 2.1.0 - lookup_server_connector: 1.4.0 - nextcloud_announcements: 1.5.0 - notifications: 2.4.1 - oauth2: 1.4.2 - onlyoffice: 2.1.10 - password_policy: 1.6.0 - polls: 0.10.2 - previewgenerator: 2.1.0 - privacy: 1.0.0 - provisioning_api: 1.6.0 - ransomware_protection: 1.4.0 - recommendations: 0.4.0 - serverinfo: 1.6.0 - sharebymail: 1.6.0 - social: 0.2.3 - spreed: 6.0.2 - support: 1.0.0 - survey_client: 1.4.0 - suspicious_login: 1.0.0 - tasks: 0.10.1 - theming: 1.7.0 - theming_customcss: 1.3.0 - twofactor_backupcodes: 1.5.0 - twofactor_nextcloud_notification: 1.1.1 - twofactor_totp: 2.1.2 - updatenotification: 1.6.0 - viewer: 1.0.0 - workflowengine: 1.6.0 Disabled: - admin_audit - apporder - comments - encryption - files_readmemd - systemtags - user_ldap ```
Configuration (config/config.php) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.######.net" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/cloud.######.net", "dbtype": "mysql", "version": "16.0.1.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "mail_smtpmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "loglevel": 0, "appstore.experimental.enabled": true, "theme": "", "maintenance": false, "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "log_rotate_size": 104857600, "auth.bruteforce.protection.enabled": true, "mysql.utf8mb4": true, "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtpsecure": "tls", "simpleSignUpLink.shown": false, "updater.release.channel": "stable", "twofactor_enforced": "true", "twofactor_enforced_groups": [ "admin" ], "twofactor_enforced_excluded_groups": [], "default_locale": "de_DE", "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\PDF", "OC\\Preview\\Movie", "OC\\Preview\\MSOffice2003", "OC\\Preview\\MSOffice2007", "OC\\Preview\\MSOfficeDoc", "OC\\Preview\\OpenDocument", "OC\\Preview\\SVG" ], "share_folder": "\/Freigegeben" } ```

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

Are you using encryption:

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15

Operating system: macOS Mojave 10.14.5 (18F132)

Logs

Web server error log ``` Jun 17 18:50:58 vm103-webserver caddy[15036]: 10.0.254.6 - - [17/Jun/2019:18:50:58 +0200] "GET /apps/files_pdfviewer/?file=%2Fs%2FXgGQJzEdrZZPPFr%2Fdownload HTTP/2.0" 200 4104 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15" Jun 17 18:50:58 vm103-webserver caddy[15036]: 10.0.254.6 - - [17/Jun/2019:18:50:58 +0200] "GET /apps/files_markdown/build/styles.css?v=637e04f2-33 HTTP/2.0" 404 332 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15" Jun 17 18:50:58 vm103-webserver caddy[15036]: 10.0.254.6 - - [17/Jun/2019:18:50:58 +0200] "GET /apps/files_pdfviewer/vendor/pdfjs/web/locale/locale.properties?v=1.5.0 HTTP/2.0" 302 23 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15" Jun 17 18:50:58 vm103-webserver caddy[15036]: 10.0.254.6 - - [17/Jun/2019:18:50:58 +0200] "GET / HTTP/2.0" 302 23 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15" Jun 17 18:50:58 vm103-webserver caddy[15036]: 10.0.254.6 - - [17/Jun/2019:18:50:58 +0200] "GET /apps/files/ HTTP/2.0" 200 7040 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15" ```
Nextcloud log ``` {"reqId":"xgiaH9Nh8w8unNy4DAxV","level":3,"time":"2019-06-17T16:50:34+00:00","remoteAddr":"10.0.254.6","user":"--","app":"jsresourceloader","method":"GET","url":"/s/X######r","message":"Could not find resource core/vendor/marked/marked.min.js to load","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15","version":"16.0.1.1","id":"5d07c4db98a07"} ```
Browser log Even with "don't clear logs" enabled, there's nothing there isn't when Nextcloud is accessed "normally"
skjnldsv commented 3 years ago

Should redirect to files and the fileID :) https://github.com/nextcloud/files_pdfviewer/blob/7b2198f24b873f1fd7869c0e87add794fd5e4ebe/src/workersrc.js#L14

szaimen commented 2 years ago

This works on NC22.2.0 in my testing