Webviewer not loading only on one machine

WebViewer Version: 5.2.3

Do you have an issue with a specific file(s)? Arimo-Regular.ttf.lzma
Can you reproduce using one of our samples or online demos? No, This is causing issues to only one user, while other users in the same environment are not facing this problem. User is able to load pdfviewer when using the application from another machine.

Are you using the WebViewer server? No
Does the issue only happen on certain browsers? User is only using latest version of Chrome
Is your issue related to a front-end framework? No
Is your issue related to annotations? No

Please give a brief summary of your issue:
(Think of this as an email subject)
Webviewer not loading only on one machine

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Here is the console log of an error received by only one user -
822d76dd-376d-41e4-bb83-d2c4696a55aa:1 Access to XMLHttpRequest at ‘https://www.pdftron.com/webfonts/v2/Arimo-Regular.ttf.lzma’ from origin ‘xyzxyzxyz’(intentionally updated as only 2 links are allowed in this post) has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

In network logs -
Following request fails for this user - https://www.pdftron.com/webfonts/v2/Arimo-Regular.ttf.lzma


image

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

Our application hosting is IIS based and webviewer is integrated with AngularJS.
It seems to be a CORS error, but only for 1 user! All other users using same version of application and workflow are not receiving any error.

  1. We are trying to understand where exactly a change is needed to support CORS. Please help.
  2. Would moving to latest version of webviewer resolve this?

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:

Guides:APIs:Forums:

Hello bhushan.panchabhai,

Thank you for reaching out to us regarding this issue.

Would you be able to see if the user having trouble with CORS can get WebViewer to load on a different browser or in incognito mode on the same machine? The issue could possibly be caused by a browser extension such as an ad blocker if it’s only that machine with the issue and only in Chrome.

Best Regards,

Carlo Mendoza
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

Hello,

We have checked that user is not having any AdBlocker on the chrome browser.
User is able to load on multiple other machines except a couple of them.

We have upgraded the webviweer to version - 8.7.0
We have optimized the lib using ‘npm run optimize’.

Client is not able to use this functionality related to webviewer due to this.
Please help.

Here are screenshots from the error being received on a specific machine -


Please help.

Hello bhushan.panchabhai,

Would you be able to provide any specs for the machines that aren’t able to load WebViewer? Information about the OS, browser version, and processors might be helpful.

Also, is this issue happening only when trying to view a specific document?

Best Regards,

Carlo Mendoza
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

Hi Carlo,

While we try to get the machine information, it was noticed that -
httpVersion is empty only for this request - “httpVersion”: “”
Would that possibly cause the request to fail?

Here is the request and response form HAR file -
“_priority”: “VeryHigh”,
“_resourceType”: “xhr”,
“cache”: {},
“request”: {
“method”: “GET”,
“url”: https://www.pdftron.com/webfonts/v2/Arimo-Regular.ttf.lzma,
“httpVersion”: “”,
“headers”: [
{
“name”: “Referer”,
“value”: https://uat.scrambledurl.com/
},
{
“name”: “User-Agent”,
“value”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36”
}
],
“queryString”: [],
“cookies”: [],
“headersSize”: -1,
“bodySize”: 0
},
“response”: {
“status”: 0,
“statusText”: “”,
“httpVersion”: “”,
“headers”: [],
“cookies”: [],
“content”: {
“size”: 0,
“mimeType”: “x-unknown”
},
“redirectURL”: “”,
“headersSize”: -1,
“bodySize”: -1,
“_transferSize”: 0,
“_error”: “net::ERR_FAILED”
},
“serverIPAddress”: “”,
“startedDateTime”: “2022-04-27T22:20:17.357Z”,
“time”: 327.49200001126155,
“timings”: {
“blocked”: 327.49200001126155,
“dns”: -1,
“ssl”: -1,
“connect”: -1,
“send”: 0,
“wait”: 0,
“receive”: 0,
“_blocked_queueing”: -1

Is there anything that we should look at which would cause httpVersion to be empty in the request for a specific windows user profile?

Hello bhushan.panchabhai,

My apologies for the delay in getting back to you on this. Since the issue appears to be limited to certain machines and we don’t know the specs for them and if this is only happening on certain documents, it’s difficult to tell what could be causing the request to fail.

If you could find out which machines are failing and what they have in common as well as if the user is able to open any WebViewer instances at all, such as our demo here: PDFTron WebViewer Demo: JavaScript PDF Viewer Demo and our samples here: PDFTron Systems Inc. | Documentation we might be able to narrow the problem down.

We do also have a guide on CORS support here: PDFTron Systems Inc. | Documentation if the problem could be somehow related to the code in your app.

Best Regards,

Carlo Mendoza
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

Hi Carlos,

Thank you so much for inputs.

We have an important observation -
If another user logs in to the same machine with a different windows user profile, and then if we use the same web application it works well!!
But we are not sure what setting or detail of a windows user profile could be causing this.

We have tried to collect more data around this and here are the details -

Question Answer
What is Operating System of the machine? Have tried in both Windows 10 and Windows 11
What Processor is used on the machine? Intel i7-8640U
Chrome Version? 105.0.5195.102 (currently, has been tried on several older Chrome version)
Works in Normal mode on Chrome? No
Works in Incognito mode on Chrome? No
Works for another user profile on same machine? Yes
Works for same user profile on another machine? Only if another user has logged on before me, otherwise no
Works on Edge browser with same user profile? No
Edge Version? 105.0.1343.33
Any Adblocker Extensions installed on Chrome/Firefox/Edge? No
Error occurs for opening any/specific document? No, affects all documents
Is this demo working in Chrome?PDFTron WebViewer Demo: JavaScript PDF Viewer Demo Yes, and Edge
Are all these demos working in Chrome? 1, 3, and 4 work. 2 does not (webviewer server). Same in Edge
Please use 4 “Launch Demo” buttons on this link -
PDFTron Systems Inc. | Documentation
(Only if above is not working) Assuming this is asking for incognito mode: Exactly the same as above. 2nd link does not work.
Are all these demos working in Chrome?
Please use 4 “Launch Demo” buttons on this link -
PDFTron Systems Inc. | Documentation

Please share if you have any inputs on potential cause of this.

Thanks!
Bhushan

Hello Bhushan,

Thank you for gathering the additional data surrounding this issue. Just to confirm, the user that you originally reported having issues opening your app is the same one that is also able to open all the WebViewer demo samples except the WebViewer server sample? For the WebViewer server demo not working, are there any error messages being printed to the console? Additionally, if another user logs onto the same machine using the same browsers, they are not having issues opening any of the samples or your app?

Best Regards,

Carlo Mendoza
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

Hi Carlo,

Thank you for your response and your help with this.

Here are the questions and answers -

  1. The user that you originally reported having issues opening your app is the same one that is also able to open all the WebViewer demo samples except the WebViewer server sample?
    Yes, this is the same user.

  2. For the WebViewer server demo not working, are there any error messages being printed to the console?
    I have attached screenshots of the HAR file here (Could not attach .har file here) -


(I’ll try to confirm if there were any console errors)

  1. Additionally, if another user logs onto the same machine using the same browsers, they are not having issues opening any of the samples or your app?
    That is correct

Thank you,
Bhushan