AuthApiError in chrome - xhr Type Error

I am able to login to my application in IE in production… But not able to get the token in chrome. Getting below error while parsing the code . It is failing on here oktaAuth.token.parseFromUrl()

  1. xhr: TypeError: Network request failed at XMLHttpRequest.E.s.onerror (https://global.oktacdn.com/okta-auth-js/4.0.0/okta-auth-js.min.js:160:7646)

  2. message: “Network request failed”

  3. stack: “TypeError: Network request failed↵ at XMLHttpRequest.E.s.onerror (https://global.oktacdn.com/okta-auth-js/4.0.0/okta-auth-js.min.js:160:7646)”

Not sure where to look for. Currently this is happening in production for some users.
Any help is much appreciated. Thanks

Hello,
If you can reproduce this can you supply the console log and .har file?
For the users is fails for, does it always fail, or just randomly?

this is failing from oktaAuth.token.parseFromUrl() and seeing below error. Not sure where this is failing at… I dont see any call is being made to okta to get the token at this point of time… but somewhere it is failed

xhr: I modified the urls in below xhr

“_priority”: “High”,
“_resourceType”: “xhr”,
“cache”: {},
“pageref”: “page_4”,
“request”: {
“method”: “POST”,
“url”: “https://{our tenant}/oauth2/{ourauth}/v1/token”,
“httpVersion”: “”,
“headers”: [
{
“name”: “Host”,
“value”: “our tenant”
},
{
“name”: “Connection”,
“value”: “keep-alive”
},
{
“name”: “Content-Length”,
“value”: “234”
},
{
“name”: “accept”,
“value”: “application/json”
},
{
“name”: “x-okta-user-agent-extended”,
“value”: “okta-auth-js/4.0.0”
},
{
“name”: “User-Agent”,
“value”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36”
},
{
“name”: “content-type”,
“value”: “application/x-www-form-urlencoded”
},
{
“name”: “Origin”,
“value”: “https://oururl
},
{
“name”: “Sec-Fetch-Site”,
“value”: “cross-site”
},
{
“name”: “Sec-Fetch-Mode”,
“value”: “cors”
},
{
“name”: “Sec-Fetch-Dest”,
“value”: “empty”
},
{
“name”: “Referer”,
“value”: “https://referrer url”
},
{
“name”: “Accept-Encoding”,
“value”: “gzip, deflate, br”
},
{
“name”: “Accept-Language”,
“value”: “en-US,en;q=0.9”
}
],
“queryString”: ,
“cookies”: ,
“headersSize”: -1,
“bodySize”: 234,
“postData”: {
“mimeType”: “application/x-www-form-urlencoded”,
“text”: “client_id=clientid&redirect_uri=https%3A%2F%2Foururl%2F&grant_type=authorization_code&code=code&code_verifier=verifier”,
“params”: [
{
“name”: “client_id”,
“value”: “clientid”
},
{
“name”: “redirect_uri”,
“value”: “https%3A%2F%2Fredirecturl%2F”
},
{
“name”: “grant_type”,
“value”: “authorization_code”
},
{
“name”: “code”,
“value”: “code”
},
{
“name”: “code_verifier”,
“value”: “code-verifier”
}
]
}
},
“response”: {
“status”: 0,
“statusText”: “”,
“httpVersion”: “”,
“headers”: ,
“cookies”: ,
“content”: {
“size”: 0,
“mimeType”: “x-unknown”
},
“redirectURL”: “”,
“headersSize”: -1,
“bodySize”: -1,
“_transferSize”: 0,
“_error”: “net::ERR_CONNECTION_RESET”
},
“serverIPAddress”: “”,
“startedDateTime”: “2021-02-02T23:27:07.512Z”,
“time”: 609.566997,
“timings”: {
“blocked”: 609.566997,
“dns”: -1,
“ssl”: -1,
“connect”: -1,
“send”: 0,
“wait”: 0,
“receive”: 0,
“_blocked_queueing”: -1
}
},

Does this happen all the time, or just some of the time, or just for certain clients?

The network error you are getting is a connection reset. I recommend opening a ticket with support. That way we can gather specific information about your Org and see if we see any issues in the configuration.

This is happening only in chrome if I connected to VPN.

If you have a single machine that has chrome and some other browser (IE) on it, and the other browser is able to login fine, but chrome gets connection resets, I would suggest checking chromes browser settings.

From Okta, you can set blocked networks, but you would get a 401, not a connection reset, which really sounds like a networking or device issue.

I recommend opening a support ticket since information about you Org will be needed to help assist and see if the issue might be on the Okta side.