flutter_secure_storage: MissingPluginException(No implementation found for method write on channel plugins.it_nomads.com/flutter_secure_storage)
flutter doctor -v
[✓] Flutter (Channel unknown, v1.7.8+hotfix.3, on Mac OS X 10.14.6 18G95, locale en-GB)
• Flutter version 1.7.8+hotfix.3 at /Users/paul/flutter
• Framework revision b712a172f9 (2 months ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/paul/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/paul/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/paul/Library/Android/sdk
• Java binary at: /Users/paul/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.3, Build version 10G8
• CocoaPods version 1.7.5
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.5)
• Android Studio at /Users/paul/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android Studio.app/Contents
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.2)
• IntelliJ at /Users/paul/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin version 35.3.2
• Dart plugin version 191.7019
[✓] Connected device (3 available)
• Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 8.0.0 (API 26) (emulator)
• macOS • macOS • darwin-x64 • Mac OS X 10.14.6 18G95
• web • web • web-javascript • Google Chrome 76.0.3809.132
• No issues found!
Stack trace during scripted build/launch (MacOS 10.14.6, homebrew up to date):
Restarted application in 2,710ms.
Hot Restarted!
I/flutter (23832): Start Integration App...
I/flutter (23832): Error caught by Crashlytics plugin <recordError>:
I/flutter (23832): MissingPluginException(No implementation found for method readAll on channel plugins.it_nomads.com/flutter_secure_storage)
I/flutter (23832):
I/flutter (23832): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)
I/flutter (23832): <asynchronous suspension>
I/flutter (23832): #1 FlutterSecureStorage.readAll (package:flutter_secure_storage/flutter_secure_storage.dart:40:40)
I/flutter (23832): <asynchronous suspension>
I/flutter (23832): #2 PreferencesService.loadFromStorage (package:myapp/data/services/preference_service.dart:37:33)
I/flutter (23832): <asynchronous suspension>
I/flutter (23832): #3 main (package:myapp/main.dart:109:30)
Version in pubspec.yaml -> v3.2.1+1
Building on API 28, deploying to API 26 … could that be the issue? There’s a minimum supported version? Should it fail more gracefully?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 37
- Comments: 43 (3 by maintainers)
Uninstalling and installing the app works for me
The solution based on https://github.com/mogol/flutter_secure_storage/issues/71#issuecomment-532334622 is to uninstall the app. Works for me.
Hi, I have installed this plugin, and I have the same issue. I tried unistalling the app, but it does not work. Is there a workaround for this issue?
thank you in advance
Something as simple as this fails to work for me.
It turned out that most probably the problem is that the plugin does not register itself when it has no Activity Context. Can you please provide a method to register the plugin in the application context to be able to access it without UI.
Work manager issue
I have a similar problem. I would like to access the secure storage while the app is in the background. I use the workmanager package.
Initialization:
Workmanager.initialize(callbackDispatcher, isInDebugMode: true);
The callbackDispatcher method:
However, I always receive the following exception when I simulate the background fetch.
@8fdafs2 Try the no-shrink flag. I resolved the MissingPluginException with the no-shrink flag. https://flutter.dev/docs/deployment/android#shrinking-your-code-with-r8
It should not work. No plugins are available in test environment. You can mocks for test purpose
Sent from ProtonMail for iOS
On Thu, May 13, 2021 at 21:55, Abhinav Singh @.***> wrote:
facing problem in google pixel 3a.
Same here, user reported this problem on Moto e5, Android 8.0
thanks, this was affecting me in widget test
@felipecastrosales This is great! Thanks
Many thanks! The problem disappears by using this workaround! But I think this is not a final solution as people may still need to ‘shrink code’.
And I am worrying about whether or not Google will try to shrink the uploaded appbundle automatically to re-introduce this issue.Anyway, some progress has been made!Uninstalling/reinstalling the app works – make sure you set your minSdkVersion in your app/build.gradle to 18 or else it will fail on reinstall
For me the error also disappeared. Most probably because I cleaned everything and/or uninstalled and reinstalled the app. I don’t know what could cause that error. Fortunately it works properly now.
Please note that sometimes the installed plugin version is not in sync with the
pubspec.yaml
file. You can check thepub-cache
(for me it is ~/.pub-cache/hosted/pub.dartlang.org) folder to check what version is installed.In pubspec.yaml:
flutter_secure_storage: ^3.3.1+1