# WebViewer doesn't work in localhost

**URL:** <https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910>\
**Category:** Technical Support\
**Created:** [October 27, 2023, 10:53am UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910 "2023-10-27T10:53:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![serhii.mamai](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@serhii.mamai](https://pdfjs.community/u/serhii.mamai)\
**Post date:** [October 27, 2023, 10:53am UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910/1 "2023-10-27T10:53:26Z")

</div>

**Which product are you using?**

I’m using PDF.js Express Plus  
**PDF.js Express Version**  
Version 8.7.4

**Detailed description of issue**  
When I run my project on localhost:8082  
web viewer doesn’t loaed  
it shows `AccessDenied` Access DeniedGVNT22WT94SZNG58HjxTWdjItrHOdyN/nZzra8+2mls/rZEizY1cBCeyGQn9D4+D8V1eB6UeslpMdYZj7xXfYDV5Vr+3h6I+TTM/1adGAT4kIGRh0lZD760/l24=

but it works perfect on staging  
**Expected behaviour**  
When I run my project on localhost:8082  
web viewer should load PDF

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

**Link to document**  
‘[https://pdftron.s3.amazonaws.com/downloads/pl/PDFTRON\_about.pdf’](https://pdftron.s3.amazonaws.com/downloads/pl/PDFTRON_about.pdf%E2%80%99),  
**Code snippet**  
import WebViewer from ‘@pdftron/pdfjs-express’

WebViewer(  
{  
path: `${process.env.VUE_APP_PUBLIC_URL}/pdfjs-express`,  
licenseKey: process.env.VUE\_PDFJS\_EXPRESS\_TOKEN!,  
initialDoc:  
‘[https://pdftron.s3.amazonaws.com/downloads/pl/PDFTRON\_about.pdf](https://pdftron.s3.amazonaws.com/downloads/pl/PDFTRON_about.pdf)’,  
},  
quickSignViewer.value!  
)

---

<div class="post-metadata">

**Author:** ![ejohnson](https://avatars.discourse-cdn.com/v4/letter/e/a3d4f5/32.png) [@ejohnson](https://pdfjs.community/u/ejohnson)\
**Post date:** [October 27, 2023, 3:04pm UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910/3 "2023-10-27T15:04:28Z")

</div>

Thank you for posting the incident to our forum. We will provide you with an update as soon as possible.

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [October 27, 2023, 4:00pm UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910/4 "2023-10-27T16:00:14Z")

</div>

Hi there,

It looks like from the code snippet, everything looks correct.

Could you make sure the url to the document is correct? It looks like when there is a symbol in the end of the URL, you will get a similar error message (note the ’ single quote in url):

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/6/685de6d40661341becff5f212de12c044716c210.png)

Best regards,  
Kevin Kim

---

<div class="post-metadata">

**Author:** ![serhii.mamai](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@serhii.mamai](https://pdfjs.community/u/serhii.mamai)\
**Post date:** [October 30, 2023, 7:09pm UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910/5 "2023-10-30T19:09:31Z")

</div>

It doesn’t matter which link I’m using  
I also used ‘[https://pdftron.s3.amazonaws.com/downloads/pl/demo-annotated.pdf](https://pdftron.s3.amazonaws.com/downloads/pl/demo-annotated.pdf)’  
but have got the same error

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [October 30, 2023, 7:36pm UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910/6 "2023-10-30T19:36:38Z")

</div>

Hi there,

Thanks for your response,

If I go to the [demo](https://pdfjs.express/demo) and enter the above url, I am able to load the document.  
Do you have any network settings or browser extensions that are blocking the access? Does it work in incognito/private mode or another browser?

Best regards,  
Kevin Kim

---

<div class="post-metadata">

**Author:** ![jenner](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jenner](https://pdfjs.community/u/jenner)\
**Post date:** [October 31, 2023, 9:17am UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910/7 "2023-10-31T09:17:30Z")

</div>

help me, no foun in my local domain, example: mydomain.local

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [October 31, 2023, 2:19pm UTC](https://pdfjs.community/t/webviewer-doesnt-work-in-localhost/2910/8 "2023-10-31T14:19:40Z")

</div>

Hi there,

A screenshot of error messages and even a minimal runnable sample project will help troubleshoot this issue.

Best regards,  
Kevin Kim
