The promise from WebViewer function is rejected

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version

Detailed description of issue
@Logan,Hi Mr. Logan, I saw the demo case and it was great.But I ran into some problems when I tried. I registered lisenceKey, and it shows that lisenceKey binding is correct in offline test. However, under this domain name, an error occurred. I changed the cORS Settings for the document server, but it still didn’t work. My config.js doesn’t work either.

Expected behaviour
{Provide a screenshot or description of the expected behaviour}

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

Link to document
{Provide a link to the document in question if possible}

Code snippet
{Provide a relevant code snippet}

 useEffect(() => {
    if (ereportInfo) {
          path: `${process.env.REACT_APP_Path}/lib/webviewer`,
          licenseKey: 'xxxxxx',
          initialDoc: ereportInfo.link_path,
          config: `${process.env.REACT_APP_Path}/config.js`
  }, [ereportInfo])


instance.UI.addEventListener(instance.UI.Events.VIEWER_LOADED, () => {



Anything I am potentially missing?

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:


Hey there!

Can you try updating to the latest version and letting me know if it fixes it? We had some timing issues in 8.1 that may be the issue here.

Let me know,


After I updated the version to 8.2, the problem was solved , Thanks a million! :+1:

1 Like