Comments (23)
Finding a potentially similar issue:
Debug Build:
qemu-system-i386: Oreo
After a restart of the emulator, I receive this in the log output:
E/FlutterSecureStoragePl( 8971): Registration failed
E/FlutterSecureStoragePl( 8971): java.security.UnrecoverableKeyException: Failed to obtain information about private key
E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePublicKeyFromKeystore(AndroidKeyStoreProvider.java:223)
E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(AndroidKeyStoreProvider.java:259)
E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePrivateKeyFromKeystore(AndroidKeyStoreProvider.java:269)
E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreSpi.engineGetKey(AndroidKeyStoreSpi.java:94)
E/FlutterSecureStoragePl( 8971): at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:474)
E/FlutterSecureStoragePl( 8971): at java.security.KeyStore.getEntry(KeyStore.java:1560)
E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.ciphers.RSACipher18Implementation.createRSAKeysIfNeeded(RSACipher18Implementation.java:93)
E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.ciphers.RSACipher18Implementation.<init>(RSACipher18Implementation.java:30)
E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.ciphers.StorageCipher18Implementation.<init>(StorageCipher18Implementation.java:31)
E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.<init>(FlutterSecureStoragePlugin.java:42)
E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.registerWith(FlutterSecureStoragePlugin.java:30)
E/FlutterSecureStoragePl( 8971): at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:24)
And then the error returned from the plugin is:
"MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage)"
Offending Call:
Future<dynamic> _getKeyFromStorage(String account) {
final storage = new FlutterSecureStorage();
return storage.read(key: '$account-key');
}
Problem resolves by uninstalling app and reinstalling, which is not optimal...
from flutter_secure_storage.
Recently received same issue on an emulator like reported by @cchatfield
Is it really don't reproduce on real devices?
from flutter_secure_storage.
Happened to me too. Reproduced both on emulator (Nexus 5) and real device (Galaxy Note 8)
2020-04-17 10:50:36.071 19720-19720/? E/MethodChannel#plugins.it_nomads.com/flutter_secure_storage: Failed to handle method call java.lang.IllegalArgumentException: Unsupported value: javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT at io.flutter.plugin.common.StandardMessageCodec.writeValue(Unknown Source:392) at io.flutter.plugin.common.StandardMethodCodec.encodeErrorEnvelope(Unknown Source:21) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(Unknown Source:10) at e.c.a.a.onMethodCall(Unknown Source:133) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17) at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57) at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:326) at android.os.Looper.loop(Looper.java:181) at android.app.ActivityThread.main(ActivityThread.java:7073) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
from flutter_secure_storage.
Happen to me too in Nexus 5X API 26 Emulator
from flutter_secure_storage.
I received below exception in Nexus 5x
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.setMethodCallHandler(io.flutter.plugin.common.MethodChannel$MethodCallHandler)' on a null object reference at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.onDetachedFromEngine(FlutterSecureStoragePlugin.java:62) at io.flutter.embedding.engine.FlutterEnginePluginRegistry.remove(FlutterEnginePluginRegistry.java:252) at io.flutter.embedding.engine.FlutterEnginePluginRegistry.remove(FlutterEnginePluginRegistry.java:260) at io.flutter.embedding.engine.FlutterEnginePluginRegistry.removeAll(FlutterEnginePluginRegistry.java:268) at io.flutter.embedding.engine.FlutterEnginePluginRegistry.destroy(FlutterEnginePluginRegistry.java:112) at io.flutter.embedding.engine.FlutterEngine.destroy(FlutterEngine.java:292) at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:500) at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:576) at android.app.Activity.performDestroy(Activity.java:6422) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1142) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3822) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3853) at android.app.ActivityThread.-wrap5(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5421) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
from flutter_secure_storage.
Hi @alexwhiteside1 ,
Could you provide steps to reproduce this issue?
from flutter_secure_storage.
Thanks for reporting, I will investigate
from flutter_secure_storage.
Maybe the same underlying problem?
E/FlutterSecureStoragePl(10643): Registration failed
E/FlutterSecureStoragePl(10643): java.security.InvalidKeyException: Failed to unwrap key
E/FlutterSecureStoragePl(10643): at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineUnwrap(AndroidKeyStoreCipherSpiBase.java:682)
E/FlutterSecureStoragePl(10643): at javax.crypto.Cipher.unwrap(Cipher.java:2121)
E/FlutterSecureStoragePl(10643): at com.it_nomads.fluttersecurestorage.ciphers.RSACipher18Implementation.unwrap(RSACipher18Implementation.java:46)
E/FlutterSecureStoragePl(10643): at com.it_nomads.fluttersecurestorage.ciphers.StorageCipher18Implementation.<init>(StorageCipher18Implementation.java:48)
E/FlutterSecureStoragePl(10643): at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.<init>(FlutterSecureStoragePlugin.java:46)
E/FlutterSecureStoragePl(10643): at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.registerWith(FlutterSecureStoragePlugin.java:33)
E/FlutterSecureStoragePl(10643): at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:33)
E/FlutterSecureStoragePl(10643): at de.ffuf.uffl2.MainActivity.onCreate(MainActivity.kt:11)
E/FlutterSecureStoragePl(10643): at android.app.Activity.performCreate(Activity.java:6998)
E/FlutterSecureStoragePl(10643): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1230)
E/FlutterSecureStoragePl(10643): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2899)
E/FlutterSecureStoragePl(10643): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3046)
E/FlutterSecureStoragePl(10643): at android.app.ActivityThread.-wrap11(Unknown Source:0)
E/FlutterSecureStoragePl(10643): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
E/FlutterSecureStoragePl(10643): at android.os.Handler.dispatchMessage(Handler.java:105)
E/FlutterSecureStoragePl(10643): at android.os.Looper.loop(Looper.java:164)
E/FlutterSecureStoragePl(10643): at android.app.ActivityThread.main(ActivityThread.java:6798)
E/FlutterSecureStoragePl(10643): at java.lang.reflect.Method.invoke(Native Method)
E/FlutterSecureStoragePl(10643): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
E/FlutterSecureStoragePl(10643): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
E/FlutterSecureStoragePl(10643): Caused by: javax.crypto.IllegalBlockSizeException
E/FlutterSecureStoragePl(10643): at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:519)
E/FlutterSecureStoragePl(10643): at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineUnwrap(AndroidKeyStoreCipherSpiBase.java:680)
E/FlutterSecureStoragePl(10643): ... 19 more
E/FlutterSecureStoragePl(10643): Caused by: android.security.KeyStoreException: Unknown error
E/FlutterSecureStoragePl(10643): at android.security.KeyStore.getKeyStoreException(KeyStore.java:695)
E/FlutterSecureStoragePl(10643): at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:224)
E/FlutterSecureStoragePl(10643): at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:506)
E/FlutterSecureStoragePl(10643): ... 20 more
I/FlutterActivityDelegate(10643): onResume setting current activity to this
Syncing files to device ONEPLUS A3003...
E/flutter (10643): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (10643): MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage)
E/flutter (10643): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:278:7)
E/flutter (10643): <asynchronous suspension>
E/flutter (10643): #1 FlutterSecureStorage.read (package:flutter_secure_storage/flutter_secure_storage.dart:16:24)
E/flutter (10643): <asynchronous suspension>
E/flutter (10643): #2 AuthService.getAccessToken (package:uffl/network/auth_service.dart:107:37)
E/flutter (10643): <asynchronous suspension>
E/flutter (10643): #3 _RegisterPageState.initState (package:uffl/feature/intro/RegisterPage.dart:42:17)
E/flutter (10643): #4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3751:58)
from flutter_secure_storage.
@jonasbark did you change passcode/fingerprints etc?
it doesn't look as the same issue, could you please open separate issue?
from flutter_secure_storage.
I have same issue after switching to Pixel XL simulator with Oreo.
MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage
from flutter_secure_storage.
@MichalMisiaszek that's different error.
If you add this package, you need to relaunch the app (or in some cases do flutter clean
).
from flutter_secure_storage.
from flutter_secure_storage.
I'm seeing the same thing when building to Android. iOS builds are ✅.
from flutter_secure_storage.
Finding a potentially similar issue:
Debug Build:
qemu-system-i386: OreoAfter a restart of the emulator, I receive this in the log output:
E/FlutterSecureStoragePl( 8971): Registration failed E/FlutterSecureStoragePl( 8971): java.security.UnrecoverableKeyException: Failed to obtain information about private key E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePublicKeyFromKeystore(AndroidKeyStoreProvider.java:223) E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(AndroidKeyStoreProvider.java:259) E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePrivateKeyFromKeystore(AndroidKeyStoreProvider.java:269) E/FlutterSecureStoragePl( 8971): at android.security.keystore.AndroidKeyStoreSpi.engineGetKey(AndroidKeyStoreSpi.java:94) E/FlutterSecureStoragePl( 8971): at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:474) E/FlutterSecureStoragePl( 8971): at java.security.KeyStore.getEntry(KeyStore.java:1560) E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.ciphers.RSACipher18Implementation.createRSAKeysIfNeeded(RSACipher18Implementation.java:93) E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.ciphers.RSACipher18Implementation.<init>(RSACipher18Implementation.java:30) E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.ciphers.StorageCipher18Implementation.<init>(StorageCipher18Implementation.java:31) E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.<init>(FlutterSecureStoragePlugin.java:42) E/FlutterSecureStoragePl( 8971): at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.registerWith(FlutterSecureStoragePlugin.java:30) E/FlutterSecureStoragePl( 8971): at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:24)
And then the error returned from the plugin is:
"MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage)"
Offending Call:
Future<dynamic> _getKeyFromStorage(String account) { final storage = new FlutterSecureStorage(); return storage.read(key: '$account-key'); }
Problem resolves by uninstalling app and reinstalling, which is not optimal...
Exact same issue for me. I had to wipe my emulator to get it work again. Not sure if this happens on real devices.
from flutter_secure_storage.
from flutter_secure_storage.
Same Issue here on android emulator Nexus_S_API_27.
Issue didn't appear on ios with me.
java.security.UnrecoverableKeyException: Failed to obtain information about private key
I've uninstalled previous version from the emulator and run flutter clean then flutter run. It worked.
I think it is just keys conflicting with another key of previous installation (I'm not sure about that). Didn't test it on release yet (but I think if you have the debug apk on the same device, It is the same issue).
from flutter_secure_storage.
Same issue here, I'm seeing it on an emulator just like the one reported by @cchatfield
When I get this error, I fix by restarting the emulator (no need to wipe it) and running flutter clean
before a new run.
from flutter_secure_storage.
@w3ggy I have using this from past 3-4 months. I do see this issue on emulator from time to time. And I never had issues on real device.
from flutter_secure_storage.
I have same issue on some device(It works on Huawei Y9 but doesn't work on Samsung J3).
I read storage in my main and It return this error:
MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage)
from flutter_secure_storage.
Same problem were
from flutter_secure_storage.
Same issue, We always clean and rebuild and from time to time this plugin is missing. Note we are using about 20 plugins and this is the only one behaving like this
from flutter_secure_storage.
Please try again with the latest version of the code. If this issue is still occurring feel free to comment.
from flutter_secure_storage.
Happened and I'm using the latest version!
from flutter_secure_storage.
Related Issues (20)
- > Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}. HOT 2
- InfoSec Documentation for Windows is missing
- Question about files on Windows platform
- Getting values in separate isolate fails - Code: -25308, Message: User interaction is not allowed HOT 7
- Reading a specific key or using read all returns a null from the store HOT 1
- Running on web fails when _selectOptions are called
- Recording with encrypted data
- Linux read always empty
- Cannot compile my project with AGP >=8.0.0 due to R8 error HOT 2
- I am trying to save data but for some reason it is not saved on Flutter web (Chrome)
- app run crash on macos m1 pro HOT 2
- After reopen application, getting null values in IOS. But working in Android. HOT 10
- flutter_secure_storage for web get error: type LegacyJavaScriptObject is not a subtype of FutureOr<CryptoKey> HOT 1
- Error while reading data on windows HOT 1
- SHA-1 is a weak hash known to have hash collisions.
- App uses the encryption mode CBC with PKCS5/PKCS7 padding
- After reopen application, getting null values in IOS. But working in Android HOT 1
- Null check operator used on a null value
- iOS: Breaking Change from 9.1.x forward, causing loss of data HOT 3
- Datas are not removed when app is uninstalled - I0S HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_secure_storage.