Getting 'HTTP 415 Unsupported Media' or 'HTTP 404 Not Found' error message when previewing a PPT/PPTX file
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Confluence fails to preview a PPT/PPTX file.
Diagnosis
When loading the preview of the file, it can be observed with your browser Developer Tools that the conversion request returns a HTTP 415 Unsupported Media error when accessing via your Load Balancer or Reverse Proxy, or a HTTP 404 Not Found when accessed Confluence directly (see KB Data Center How to bypass a reverse proxy or SSL in Application Links if you want to validate this behaviour).
The conversion request might look like the following:
https://CONFLUENCE_URL/rest/documentConversion/latest/conversion/convertHD/249299691/1?_=1682403897520
[HTTP/2 415 Unsupported Media Type 284ms]
Despite following KB How to rebuild the file preview cache from scratch in Confluence, the issue remains.
Cause
The underlying problem is that the first time the file was converted by the external Sandbox process in Confluence DC, it failed and the preview file in the cache was not completed properly. This implies that following requests to preview this same file will use the cached files and the conversion will not be forced again.
If the preview cached is cleared, a new fresh conversion is triggered. However, it will fail if the root cause of the initial failure was not resolved earlier.
Solution
Follow the steps below, as guidance for troubleshooting this situation:
- As initial step, the preview cache file of the specific file that is not converted needs to be cleared.
There are two alternatives in this regard:- The whole preview cache for every file can be cleared following KB How to rebuild the file preview cache from scratch in Confluence
A more fine-grained approach is to find and rename/remove the specific files related to the affected file.
The attachment ID of the PPT/PPTX file can be found in the HTTP request submitted while converting the file.
> cd CONFLUENCE_HOME/shared-home/dcl-document* > find . -name 249299691* > cd CONFLUENCE_HOME/shared-home/dcl-document_hd* > find . -name 249299691* > cd CONFLUENCE_HOME/shared-home/dcl-thumbnail* > find . -name 249299691*
- Once the cache is cleared, enable the Debug mode following the steps on How to enable debug logging to investigate document conversion problems in Confluence's External Process Pool (sandbox)
- Reproduce the issue, accessing to the preview of the affected file. As the cache was cleared, the conversion will take place.
- Investigate any potential error in the
atlassian-confluence.log
file that may indicate why the file is not previewed properly. If the issue is related to the sandbox and the conversion process itself, the Document conversion for Confluence Data Center might be handy. - Perform the necessary modifications to address the issue and confirm that the error is solved.
This is an iterative process, as each try will require the preview cache to be cleared again until the file is properly converted, rendered and previewed.