Problem with Cros origin

Product: PDFTron WebViewer

Product Version: 7.3.3

Please give a brief summary of your issue:
I get an error message “Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions” when I run my app with viewer.

Please describe your issue and provide steps to reproduce it:
I get an error message “Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions” when I run my app with viewer.
I don’t know why this happens, because i’m using electron offline app, and initial document and viewer files are in the same project/folder.
I attach screenshots of Network page from dev tools, with info about my Home file and webviewer.js file so you can check and help me to slove this problem.

I also assume, that this problem cause another problem. I can’u use any of API functions (for example setTheme/disableElements) in my viewer.
If I tried to disable elements in WebViewer “part of code” (before .then), some buttons from header toolset are acctualy disabled. but when I call this method later, it doesn’t work. I think that this is because of the “cross domain” error.

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

Hi EruoCert
I follow the steps when I downloaded the electron sample and run it. It does not crash.
Can you provide more steps to tell us how to reproduce it.
What kind of sample are you using? And how do you set up your environment?

Hi,

I downloaded files from there: https://www.pdftron.com/documentation/web/get-started/manually/

I use manual integation guide.
Electron guide doesn’t work for, so I used this.
What do you mean by “How do you set up your enviroment”?

Hello,
Did you add some additional files to your environment? Did you try GitHub - PDFTron/webviewer-electron-sample: Sample to demonstrate integrating WebViewer into an Electron App? It’s just upgraded to WebView8.0. Let me know if this one work for you