ChunkLoadError: Loading chunk 12 failed

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
8.4.0

Detailed description of issue
I followed the steps in the documentation for setting up PDF Express Viewer in my Vue application. It works as expected locally, but when I deploy it on Azure VM (behind IIS), it fails to load a PDF file. The UI is correctly rendered, constructor’s callback (.then(instance =>) is successfully invoked, but when I provide a file (via instance.UI.loadDocument(…)) it throws the following error:


NOTE: The same happens with few versions (8.4.0, 8.2.1, 8.1.0)

Expected behaviour
The component should successfully load and display the PDF file.

Does your issue happen with every document, or just one?
Every document.

Link to document
N\A

Code snippet

mounted() {
            WebViewer({
                path: '/assets/pdf-viewer',
                licenseKey: 'license_here',
                extension: 'pdf',
            }, this.$refs.pdfViewer)
                .then((instance) => {
                    console.log({ instance });
                    this.pdfViewer = instance; // Stored and used for later loading documents
                });
        }

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hey there,

Its hard for me to know what’s happening here without access to the environment.

Does /assets/pdf-viewer/core/LocalPdfPartRetriever.chunk.js for sure exist on your server? Is it being blocked by a firewall or something?

This is most likely an issue with your infrastructure and not PDF.js Express.

Thanks,
Logan