Clean the state store file when we have an error to avoid recurring #362
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Sometimes we have some errors when we try to execute certain calls to Okta and when the information's state at the storage becomes corrupted it's never cleaned and the error keeps recurring and makes the login completely impossible again.
Some stack errors:
[{"lineNumber":525, "file":"Authorization Exception.java","methodName":"by Encryption Exception", "class":"com.okta.pidc.util. AuthorizationException$EncryptionErrors"),
(" lineNumber":110, "file":"AuthAPI.java","methodName":"obtain NewConfiguration", "class" "com.okta.oidc.clients.AuthAPI"). ("lineNumber":80, "file":"SyncAuthClientImpl.java","method Name":"signin", "class":"com.okta.oidc.clients SyncAuthClientImpl").
("lineNumber":69, "file":"AuthClientImpl.java","methodName":"lambda$signin$2$com-okta-oidc-clients-AuthClientImpl","class":"com.okta.gidc.clients. AuthClientImpl"). ("lineNumber":8,"file": null, "methodName":"run","class":"com.okta.oidc.clients.AuthClientImpl$$ExternalSyntheticlambda5"},
("lineNumber":487, "file":"Executors.java","methodName":"call","class":"java.util.concurrent. Executors$RunnableAdapter"),
("lineNumber":264, "file": "Future Task.java","methodName":"run","class":"java.util.concurrent. Future Task"}, "lineNumber":1145, "file":"ThreadPoolExecutor.java", "methodName":"runWorker", "class":"java.util.concurrent.ThreadPoolExecutor"),
( ("lineNumber":644, "file":"ThreadPoolExecutor.java","methodName":"run", "class":"java.util.concurrent.ThreadPoolExecutor$Worker"), ("lineNumber":1012, "file":"Thread.java", "methodName":"run","class":"java.lang.Thread"}], "message":"Okta Qido error","code":"-600")
{[{"lineNumber":125, "file":"AuthAPI.java","methodName":"isVerificationFlow", "class":"com.okta.oidc.clients. AuthAPI").
"lineNumber":95, "file":"SyncAuthClientImpl.java","methodName":"signin", "class":"com.okta,oidc.clients. SyncAuthClientImpl"). (
"lineNumber":69,"file":"AuthClientImpl.java","methodName":"lambda$signin$2$com-okta-oidc-clients-AuthClientImpl","class":"com.okta.oidc.clients. AuthClientImpl"). (
(" lineNumber":8,"file":null,"methodName":"run","class" "com.okta.oidc.clients. AuthClientImpl$$ExternalSyntheticLambda5"), "lineNumber":487, "file":"Executors.java","methodName":"call","class":"java.util.concurrent.Executors$RunnableAdapter"}, (
"lineNumber":264, "file": "Future Task.java", "methodName":"run","class":"java.util.concurrent.FutureTask"}, ( lineNumber":1145, "file":"ThreadPoolExecutor.java","methodName":"runWorker","class":"java.util.concurrent.ThreadPoolExecutor"),
(" ("lineNumber":644, "file":"ThreadPoolExecutor.java", "methodName":"run","class":"java.util.concurrent.ThreadPoolExecutor$Worker"},
("lineNumber":1012, "file":"Thread.java", "methodName":"run","class":"java.lang.Thread"}], "message": "Okta Oido error","code":"-600")
Clean the state store file when we have an error to avoid recurring.