Errors viewing and downloading pdf files

Hello,

I just installed Nextcloud 10 on a fresh install of Ubuntu 16.04 Server. After getting everything working, I found that I was unable to view or download the Nextcloud Manual or other pdf files that I uploaded. I was able to view and download the other demo files (photos and documents). I googled the issue and found topics that seemed to be somewhat related, but nothing I could identify as being an “aha!” solution.

When I click on a pdf, I get a red bar near the top of the Nextcloud page that states “Unexpected Server Response”. When I expand that, it shows:

PDF.js v1.1.469 (build: f06aa6a)
Message: Unexpected server response (500) while retrieving PDF “http://XXX.XXX.XXX.XXX/nextcloud/remote.php/webdav/Nextcloud%20Manual.pdf”.

I’m an amateur so please be patient if I ask a lot of questions.

Thanks for your help.

What happens if you try and download it instead. Click the three … and select download from the menu. Do you receive an error?

I am able to reproduce the issue by enabling encryption and then disabling the encryption application without decrypting my files. Have you done something similar?

I get an http 500 error:

The website cannot display the page

HTTP 500

Most likely causes:
•The website is under maintenance.
•The website has a programming error.

What you can try:

Refresh the page.

Go back to the previous page.

More information More information

I have not enabled encryption yet. I uploaded a couple of my own pdfs to see if perhaps it was that specific file, but I get the same errors

Hello,

Could you try doing a clean install without adding any extra applications. Then try accessing a PDF file and see if the error is still present.

I set up a virtual server and installed Nextcloud on a clean install of Ubuntu 16.04 server, specifically to avoid problems with other applications. It is LAMP on Ubuntu plus Nextcloud, nothing else.

But I’ll setup a new virtual server and try installing again and see what happens.

Do you have a link to some really good installation instructions? Just to make sure I don’t miss something?

Thanks!

Hi,

The Nextcloud documentation is at https://docs.nextcloud.com/server/10/admin_manual/installation/index.html

The documentation suggests Ubuntu Server 14.04, I am using 16.04 Server. Would it be safer to do the install on 14.04?

Honestly, I don’t think that is going to matter. I’m running FreeBSD my self, and it works great.

Nextcloud is a PHP application, so as long your PHP set up fits the compatibility requirements, you should be fine.

ok, thanks. I’ll follow those instructions and hopefully end up with a different result. Will advise shortly.

So I reinstalled Nextcloud using the instructions in the link, made sure as much as I could that all the php modules were enabled, and I can now preview and download pdfs(!). So success there, and thanks!
.