Jefferson
Jefferson

Reputation: 67

PDFjs ERR_TOO_MANY_REDIRECTS Request.Cookies

We have some users that are using PDFjs that are getting Failed to fetch error message. In the console the error is Failed to load resource: net::ERR_TOO_MANY_REDIRECTS. I am not sure why this error is happening. The user need to be authentication to view the pdf file so I am not sure if that is related to PDF.js being in a VM Runtime and can't access the cookies. When I do context.Request.Cookies["customerid"] the cookie is found and can validate. But when I do HttpContext.Current.Session["customerid"] the data is missing and I get into the loop?

PDF.js v2.3.164 (build: 12ff2527)
Message: Failed to fetch

Network

enter image description here

Upvotes: 1

Views: 243

Answers (1)

samwu
samwu

Reputation: 5205

You can try to use the following four methods to solve this error:

  • Test with other browsers

You can try visiting the same URL using other browsers. If the error still persists, the issue may come from the server side. You may need to log on the website at another time. If the error doesn’t appear on a new browser, try the methods below to fix issues on your original browser.

  • Clear your browser data

Browser data like browsing history, cache, cookies, etc can contain faulty files that cause the ERR_TOO_MANY_REDIRECTS error. Once the browser data are cleared, you can try logging in the website and see if the error is gone.

  • Check your browser extensions

You can open the extension manager in your browser to check the extensions you have installed on your browser and disable all the extensions to see if this fix the problem. If it does, you can enable one extension at a time to identify the one that causes the trouble.

  • Correct your system date and time

Usually you meet the ERR_TOO_MANY_REDIRECTS error due to the incorrect or outdated date and time settings on your system. To correct your system date and time.

More information about this error you can refer to this link: ERR_TOO_MANY_REDIRECTS

Upvotes: 2

Related Questions