Webviewer does not load documents on Safari

WebViewer Version: 11.0.0 (tested on 11.2.0 aswell)

Do you have an issue with a specific file(s)?
Maybe, tested with multiple files thus unlikely (see below)
Can you reproduce using one of our samples or online demos?
Yes
Are you using the WebViewer server?
No
Does the issue only happen on certain browsers?
Yes (Safari Version 18.2 (20620.1.16.11.8))
Is your issue related to a front-end framework?
No
Is your issue related to annotations?
No

Im unable to load documents on Safari when setting useDownloader: false
While this happens in our React based project I was able to reproduce with

I added useDownloader: false and voila Safari is stuck showing a loading spinner forever.

Same happens for non-linearized files e.g. here: https://pdfobject.com/pdf/sample.pdf
of course now even useDownloader: true doesn’t work as the file is not linearized, nor does the server work with byte-request headers.
[Warning] Could not use incremental download for url https://pdfobject.com/pdf/sample.pdf. Reason: Could not retrieve Content-Range header. (webviewer-core.min.js, line 244)

The only thing which seems to work is a linearized pdf with useDownloader: true.
However we want to support cases where useDownloader: false or non linearized pdfs work.

1 Like

Hi there,

Using Safari, I am able to open the URL provided using downloader false:

By default, useDownloader will be true, so you don’t have to explicitly set this for linearized documents. Using useDownloader: false should be for when you cannot support byte range request for linearized documents:

When you are unable to load the document, are there any errors in the console (aside from the warning) or failed network requests?
Can you share a minimal runnable sample project?

Best regards,
Kevin

1 Like

Hey Kevin,

I noticed that this happens after developing in Safari for some time. It may have to do with hot reloading in our current framework (nextjs) which may intefere with proper resource cleanup. After I restarted Safari it started working again.

Regarding the runnable example, I can literally reproduce this issue with the given repo and just adding the useDownloader line + trying out different pdfs.

Notably, even when having the original nextjs application running in a different tab it seems to mess up the simple demo in another tab and persists until I close the development tab.
Maybe it’s just some throttle mechanism of Safari ?

1 Like

Hi there,

I was unable to reproduce using the above project as is or with the react sample project (GitHub - ApryseSDK/webviewer-react-sample: Sample to demonstrate integrating WebViewer into React). I’ve tried with a new tab, and about a dozen documents each, but there was no crash or any instances of failed loading of the document.

For reference, I was using Safari ‘Version 17.5 (19618.2.12.11.6)’. Like you mentioned, this is likely an issue with hot reloading and some resources may not be fetched correctly.

Best regards,
Kevin

1 Like