webViewer not return any instance after load the module

WebViewer Version: 8.1.0

Do you have an issue with a specific file(s)?
For some reasson I only can load

Can you reproduce using one of our samples or online demos?

Are you using the WebViewer server?

Does the issue only happen on certain browsers?
Same issues for all the browsers

Is your issue related to a front-end framework?
Yes, I am working with Nustjs 2

Is your issue related to annotations?

Please give a brief summary of your issue:
(Think of this as an email subject)

Please describe your issue and provide steps to reproduce it:

I have tried to use the viewer (in the corner of the page only for test) but for some reason is impossible. Once I do this.$webViewer(this.getViewerConf, viewerElement) the viewer app never loads the response of this promise… In general we should do this

this.$webViewer(this.getViewerConf, viewerElement)
(instance) => {…})
So App never gets into the (.then).

Please provide a link to a minimal sample where the issue is reproducible:

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:


Hello eduardo.inerarte,

  1. It looks like WebViewer is being instantiated correctly by the logging in the console, does the “viewerElement” exist on the HTML?

  2. I see there is an error in the console, does this come from WebViewer?

  3. If you could provide a minimal sample to reproduce this issue, that would greatly help the debugging.

Best regards,
Tyler Gordon
Web Development Support Engineer

Hi tgordon

  • The viewerElement is in the DOM already.
  • The error doesn’t have any relation with PDFTron
  • As long I see the issue is related to a rejected promise… I mean this.$webViewer(this.getViewerConf, viewerElement) is return a promise and for some reason is getting rejected .
  • I have looked deeper and believe the issue is inside the …/core/pdf/PDFNet.js file because isn’t return any feedback…

You can have an overview of the component here

Hello eduardo.inerarte,

It could be the this.path is not pointing to the correct spot where the WebViewer files live.
Does your directory look like this guide? PDFTron Systems Inc. | Documentation

One last question, does this sample work for you out of the box?

Best regards,
Tyler Gordon
Web Development Support Engineer

Yes, I have tested (the demo), and it is working fine but when I try to replay the solution in my app the promise from WebViewer().then((instance)=>{}) doesn’t work.

Hello eduardo.inerarte,

Did you check the path to the lib files this.path?
If you could provide a sample that this issue is reproducible with since this is only occurring on your implementation, that would be very helpful!

Best regards,
Tyler Gordon
Web Development Support Engineer