IllegalStateException
See original GitHub issueI init the KeyGenerator by this code:
keyGenerator = KeyStoreKeyGenerator.get(application, application.getPackageName());
But I got the IllegalStateException:
W/System.err: java.lang.IllegalStateException: java.security.InvalidKeyException: Failed to unwrap key
W/System.err: at in.co.ophio.secure.core.KeyStoreKeyGenerator.<init>(KeyStoreKeyGenerator.java:51)
W/System.err: at in.co.ophio.secure.core.KeyStoreKeyGenerator.get(KeyStoreKeyGenerator.java:56)
How can I resolve this problem?
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
IllegalStateException (Java Platform SE 7 ) - Oracle Help Center
Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is...
Read more >java - What is IllegalStateException? - Stack Overflow
Usually, IllegalStateException is used to indicate that "a method has been invoked at an illegal or inappropriate time." However, this doesn't look like...
Read more >How to Solve java.lang.IllegalStateException in Java main ...
IllegalStateException is the child class of RuntimeException and hence it is an unchecked exception. This exception is rise explicitly by ...
Read more >IllegalStateException - Android Developers
Constructs an IllegalStateException with no detail message. A detail message is a String that describes this particular exception.
Read more >java.lang.IllegalStateException: Can not perform this action ...
IllegalStateException : Can not perform this action after onSaveInstanceState at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1265)
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 FreeTop 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
Top GitHub Comments
Hi. I’m using this in an Android app and have users crashing on this problem. I read the Stackoverflow link you posted, however I am not 100% clear on what it means. Is there a fix for this issue or is it completely unavoidable?
@mjurekov @vashisthg @ragdroid I have found a workaround for this issue. The cause is https://issuetracker.google.com/issues/37137351
Created pull request with the workaround https://github.com/ophio/secure-preferences/pull/26 but Travis seems not able to create emulator and failed check.