Uncaught TypeError: Cannot read properties of undefined (reading 'querySelector')

Which product are you using?

PDF.js Express Version

Detailed description of issue
When a document loads, the viewer throws a undefined error. This also happens when the mouse moves anywhere on the page. Document loads fine, but lags to render when scrolling down or back up.
I recently changed from @pdftron/pdfjs-express to @pdftron/pdfjs-express-viewer. I deleted all the previous files from pdfjs-express.
I am using blazor to develop.

Expected behaviour

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

Link to document

Code snippet
WebViewer_ = await WebViewer({
path: ‘pdfjsexpress/7.8.0’,
licenseKey: key
}, viewerElement).then(instance => {

        window.getBlob(request_options,  (blob, filename) => {
            try {
                instance.UI.loadDocument(blob, { filename: filename });
            catch (e) {


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:


Found temp solution: PDF Viewer React sample has error - #3 by dfelix

Hello rbramasco,

The fix will be fixed in our next version which should be this month. Thank you for your patience!

Best regards,
Tyler Gordon
Web Development Support Engineer

Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here