PDF Viewer not working after upgrade to 21.0.1

After upgrade to 21.0.1 the PDF Viewer App does not seem to work.
Just keeps spinning for a small 400K file too, does not display.
Tried disabling and enabling the PDF Viewer without much luck

Do any new settings need to be done for this version ?

Regards
Shyamal

Same here … just new to nextcloud … already questioning my choice :slight_smile:

more infos about everything involved here… mentioning nc 21.0.1 isn’t enough, apparently.

and if you feel that’s a bug pls report it on pfdviewer bugtracker (after having doublechecked if it’s not already filed)

Hi @JimmyKater,

I have signed up in the Github too as suggested by you. Not sure what information is required, am more than happy to provide any logs or debug inofrmation.

Do you want to me to remove the app from the apps folder and clone from git and compile it with latest PDF.js ?

thanks
Shyamal

I downloaded the latest files_pdfviewer and viewer and compiled after which I got version error for viewer on login page and could not proceed

Yes. The pdfviewer app is bound to server releases.

usually we’d like to get as much information here as we can…
like versions of all softwares, php, apache2/nginx, databasesoftware (e.g.)
everything about your environment, selfthosted, rootserver, shared? etc
underlaying OSses
directly installed, vm, docker, snappy, ncp? etc.

and of course logfiles with errormessages if there are any.

all of these informations will occur with GH as well… so it’s not in vain, collecting all of these… (try app issue template, it’ll help you collecting all neccessary stuff, though it doesn’t seem to work on nc21+, yet)

1 Like

Please find system details below

|| ***************************** ++++++++++++++++++++ **************** ||

Nextcloud server Details

AWS EC2 Ubuntu AMI
Kernel - 5.4.0-1041-aws #43-Ubuntu SMP

Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

Nextcloud - 21.0.1.1

PHP
PHP 7.4.3 (fpm-fcgi) (built: Oct 6 2020 15:47:56)
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

APACHE
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2020-08-12T19:46:17
Using SSL in Apache
SSLUseStapling On
SSLStaplingCache “shmcb:/var/run/apache2/stapling_cache(128000)”
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 -TLSv1.2
SSLCipherSuite HIGH:!aNULL:!MD5
SSLHonorCipherOrder off
SSLSessionTickets off
Protocols h2 http/1.1

Header always set Strict-Transport-Security “max-age=31536000; includeSubDomains; preload”
Header always set Permissions-Policy: “geolocation=(self ), microphone=()”
Header always set X-Frame-Options “SAMEORIGIN”
Header always set X-Xss-Protection “1; mode=block”
Header always set X-Content-Type-Options “nosniff”

Using mod_security in Apache for WAF

|| ***************************** ++++++++++++++++++++ **************** ||

Separate Server for DB ( Using TLS to connect to DB )

AWS EC2 Ubuntu AMI
Kernel - 5.4.0-1041-aws #43-Ubuntu SMP

Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

MariaDB
10.5.9-MariaDB-1:10.5.9+maria~focal-log

Any update that can help me to get the PDF Viewer working ?

Can you please be MORE PRECISE, describe you environment, the used software versions, post any error log from the nextcloud.log, browser log, etc.?
You can use the issuetemplate app for this.

Hi,

All the software versions including OS and the VM are provided in the thread above. Do let me know if you need any further inputs. There is not error reported in the logs, when we click on the PDF document the file downloads and PDF viewer does not open at all.

Do you suggest I use the “IssueTemplate” App as it shows “Enable Untested App”. since we are in Production, will this impact any other apps or functionality ?

Thanks

Sry but there are still a lot of information missing. Please post your config.php file, installed Nextcloud apps and the nextcloud log.

Config.php, cannot attach files other than images in this forum

<?php $CONFIG = array ( 'instanceid' => 'oci7lprt5i5v', 'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxx', 'secret' => 'xxxxxxxxxxxxxxxxxxxxxxx', 'trusted_domains' => array ( 0 => 'dms2.XXXX.in', ), 'datadirectory' => '/data/nextcloud/data', 'dbtype' => 'mysql', 'version' => '21.0.1.1', 'overwrite.cli.url' => 'https://dm2s.XXX.in', 'dbname' => 'nextcloud', 'dbhost' => '10.0.0.1:3306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud', 'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxxx', 'dbdriveroptions' => array ( 'PDO::MYSQL_ATTR_SSL_KEY' => '/data/certs/XX1.key', 'PDO::MYSQL_ATTR_SSL_CERT' => '/data/certs/XX1.crt', 'PDO::MYSQL_ATTR_SSL_CA' => '/data/certs/YY1.crt', ), 'installed' => true, 'defaultapp' => 'files', 'default_phone_region' => '.in', 'loglevel' => 2, 'logdateformat' => 'F d, Y H:i:s', 'log.condition' => array ( 'apps' => array ( 0 => 'admin_audit', ), ), 'memcache.local' => '\\OC\\Memcache\\APCu', 'enable_previews' => false, 'trashbin_retention_obligation' => 'auto, 15', 'session_lifetime' => 86400, 'skeletondirectory' => '', 'updater.release.channel' => 'stable', 'logtimezone' => 'Asia/Kolkata', 'twofactor_enforced' => 'true', 'twofactor_enforced_groups' => array ( 0 => 'Risk', 1 => 'Legal', 2 => 'Sales', ), 'twofactor_enforced_excluded_groups' => array ( 0 => 'admin', ), 'maintenance' => false, 'theme' => '', );

occ app:list
Enabled:

  • admin_audit: 1.11.0
  • cloud_federation_api: 1.4.0
  • comments: 1.11.0
  • dashboard: 7.1.0
  • dav: 1.17.1
  • federatedfilesharing: 1.11.0
  • files: 1.16.0
  • files_antivirus: 3.2.0
  • files_pdfviewer: 2.1.0
  • files_rightclick: 1.0.0
  • files_sharing: 1.13.1
  • files_trashbin: 1.11.0
  • logreader: 2.6.0
  • lookup_server_connector: 1.9.0
  • notifications: 2.9.0
  • oauth2: 1.9.0
  • password_policy: 1.11.0
  • privacy: 1.5.0
  • provisioning_api: 1.11.0
  • serverinfo: 1.11.0
  • settings: 1.3.0
  • systemtags: 1.11.0
  • theming: 1.12.0
  • twofactor_backupcodes: 1.10.0
  • twofactor_totp: 6.0.0
  • updatenotification: 1.11.0
  • user_status: 1.1.1
  • viewer: 1.5.0
  • workflowengine: 2.3.0
    Disabled:
  • accessibility
  • activity
  • contactsinteraction
  • encryption
  • federation
  • files_external
  • files_versions
  • files_videoplayer
  • firstrunwizard
  • nextcloud_announcements
  • photos
  • recommendations
  • sharebymail
  • support
  • survey_client
  • text
  • user_ldap
  • weather_status

The log file is quite large, how does one attach the zip ?

Hi ,
Is there any update or way to troubleshoot to get you more information over and above the data provided.?

Is there any plan to fix this in later version ?

Hi, just for information as you’re the first result of this problem on Google; solution is here:

Copied the files_pdfviewer-main.js and followed instructions.

My original problem is not with files with spaces in name.
PDF Viewer does not display the file itself just spins.

All data regarding configuration has been provided in thread.
No errors in the nextcloud.log

I have nearly the same problem like sthatte:

PDF Viewer does not display the file itself after it was loaded.

I am on ver. 21.0.3.


I have another cloud running ver. 21.0.2 - there is no problem with viewing PDFs.

In the cloud ver. 21.0.3 I can view PDFs after sharing the internal link and open it in a different window :flushed:

What can I do, to solve this problem ?

Thanks in advance for any help