Unable to preview attachments
Asked by Callen Steffensen:

Hi,

We are unable to preview documents on our Confluence Server. The server is version 6.4.3 and is currently using the H2 embedded database on Ubuntu 14.04. We have not applied any upgrades to this server, it has always used version 6.4.3.

When we attempt to preview a document, clicking it doesn't do anything and there is nothing logged in the catalina.out file when attempting to open the documents.

We are able to right click and save documents locally and open them using applications on our computers, it is just the in browser preview that is not working.

Any help would be greatly appreciated! Thanks!


Answers:
author: John Lill
body: We had this same symptom on our dev server running confluence (6.1.2).

We found that somehow the Confluence Files modules had become disabled. Re-enabling them fixed the problem.

Confluence administration -\> Manage add-ons -\> All add-ons -\> Confluence Files -\> Enable

comments: author: David Couillard
body: We were seeing "download needed" on first click of the "preview" button. Select "X", or escape , then clicking "preview" a second time would render a preview of the document.

This was acceptable as for a Word doc it allowed us to see the comments which had been entered by others, (Is there any other way to view these docs, with comments?) then it stopped rendering for all clicks of "preview". I found this question, followed the suggested answer as "Confluence Files" was disabled, and the behavior is the same as before.

I don't know if it was enabled previously, or not, as I didn't set this instance up.

Why would the first click on "preview" cause different behavior than subsequent clicks?


author: AnnWorley
body: Callen, I am the Atlassian emailed by Boris. :)

I opened a support request on your behalf so we can examine your logs. You will receive an email soon from our portal.

To help Support get started troubleshooting please attach a support zip to the ticket. To create a support zip, please follow these instructions: [Creating a Support Zip File via the Confluence Administration Console](https://confluence.atlassian.com/display/DOC/Troubleshooting+Problems+and+Requesting+Technical+Support#TroubleshootingProblemsandRequestingTechnicalSupport-CreatingaSupportZipFileviatheConfluenceAdministrationConsole)[](https://confluence.atlassian.com/display/DOC/Troubleshooting+Problems+and+Requesting+Technical+Support#TroubleshootingProblemsandRequestingTechnicalSupport-CreatingaSupportZipFileviatheConfluenceAdministrationConsole)

comments: author: John Lill
body: I have this same issue on our test instance (server 6.1.2). Was there any outcome to the support ticket.


author: Callen Steffensen
body: We are still working on finding a solution with Atlassisan support. There has been no resolution yet.


author: Boris Berenberg - Atlas Authority
body: h2 is for demo purposes only, you should migrate to a supported database.

You should also be looking in `atlassian-confluence.log and not the catalina.out file`

comments: author: Callen Steffensen
body: We understand that we should be using another database, we will be migrating soon.

I have just checked the log file mentioned above and there is nothing written to the log when I am attempting to preview a file, it just doesn't open.


author: Boris Berenberg - Atlas Authority
body: Do you see any errors in your browser JS or Network console?


author: Callen Steffensen
body: There is a "404 Not Found" error when I attempt to launch the preview. It cannot find these paths:

https://domain_name/rest/files/1.0/files/content/1737230/byAttachmentIds

https://domain_name/rest/files/1.0/files/content/1737230/minusAttachmentIds

I can still right click on these files and save and open the files manually.


author: Boris Berenberg - Atlas Authority
body: You may be able to work around this by following Ann's suggestion at: <https://community.atlassian.com/t5/Confluence-questions/Is-it-possible-to-regenerate-thumbnails-in-Confluence/qaq-p/595111>


author: Callen Steffensen
body: I have cleared the thumbnails directory and we get the same error as before (404 Not Found). The preview still doesn't open.


author: Boris Berenberg - Atlas Authority
body: Did you restart the application after clearing it?


author: Callen Steffensen
body: Yes, we did restart the application after clearing the directory.


author: Boris Berenberg - Atlas Authority
body: Hmm, sorry but I am a bit stuck without digging further into your system. I would consider reaching out to Atlassian support directly.


author: Callen Steffensen
body: We are using a starter licence, we don't have any support from Atlassian. It would be great if you could help us further! If you would like any more information I could get it for you.


author: Boris Berenberg - Atlas Authority
body: I emailed an Atlassian I know, hopefully they may be able to help you out.