undefined is not valid JSON
See original GitHub issueHi - I’m sorry at this point I’m not sure what it takes to reproduce, will post if I find out. However sometimes the page errors out with the following logs in the console:
SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at getLoginParams (oidc.ts:199:1)
at Oidc._callee23$ (oidc.ts:963:1)
....
at localsilentLoginAsync (oidc.ts:961:1)
refreshTokensAsync_silent_error {"message":"exceptionSilent","exception":"\"undefined\" is not valid JSON"}
Do you know what would cause this at all?
Thankyou
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
JSON undefined value type - Stack Overflow
undefined is not a valid JSON value, even though it is valid in javascript. From the official JSON standard (ECMA-404, Section 5):.
Read more >Is undefined valid JSON? - Quora
No, a JSON value can be an object, array, number, string, true, false, or null. So undefined is not a valid JSON value....
Read more >error syntaxerror: "undefined" is not valid json - You.com
That error is normally seen when the value given to JSON.parse is actually undefined . So, I would check the code that is...
Read more >Why the undefined variable is not sent in a JSON API response?
Undefined is not a valid JSON type. All javascript objects are not valid JSON and vice versa. Example,. const response = { undefined: ......
Read more >'JSON' is undefined error when calling jQuery.parseJSON
It looks like we have created a situation here where we silently allow invalid JSON of undefined or null if there is no...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found out how to reproduce this !
Ideally, I would like all tabs to recover automatically once the auth sever has recovered… maybe they could continue trying rather than give up after 4 attempts?
Thanks!
Thank you very much for this !
I will fix it as soon as possible. Yes may be retry whithout limit in certain situation may work for this issue.