Something Randomly prevents file from rendering

Hello, I am running PDF viewer In a React app, pulling mostly PFDs. It is my private repository using S3-like library. I have a very unstable result. The file URL’s are always correct, but the files are displayed by the viewer probably 50% of the time. Sometimes, the viewer does not execute the load event. Sometimes, the load Get returns 206, but the file never appears in the viewer. The download, however, mainly downloads the file. My network is stable. But the success wildly fluctuates over time. It is also very dependent on the speed of the internet connection: the slower the connection, the less likely the viewer will render the file. I have had significant success if I disable the cache for the browser. I can literally refresh the page 20 times and have only ten times the file shows up in the viewer. Would you be so kind to recommend which direction I should explore to find the reason for this?

Hello Roman,

Thank you for contacting us.

To better assist you, please provide the following information:

  1. What version of WebViewer are you on?
  2. Are there any console errors, warnings, or network failures when the PDF fails to load? If so, please provide screenshots and a HAR file.
  3. Have you noticed this occurring on all browser or just certain ones?
  4. Could you provide more details on how you’re serving the files from your S3-like storage? Are you using any specific service or library for this?
  5. Have you implemented any custom logic for loading documents or handling network requests within your application that might affect the loading process?
  6. Is this issue file specific? Please provide the S3 urls.
  7. Lastly, have you tried loading this file on our demo page? JavaScript PDF Viewer Demo

Best Regards,
Darian

Thank you for your response. We are on 10.8.0; it does not look browser-type related.

We invoke a preassigned URL with wvLoaded event and do not do the initialDoc:

loadDocument(presignedUrl, { extension: fileExtension?.toLowerCase() })

No console errors, warnings, or network failures; the preassigned URL always gets the file. The confusing part is the complete predictability of the result. We can get 5 times the file rendered, and the 6th time with the identical content of the network and console logs, the file is not loading.

Hello Roman,

Would it be possible to provide a minimal sample project that reproduces this issue? You can attach a download or GitHub link here.