Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB][BUG] MissingPluginException after performing any action #788

Open
MuKhAlm opened this issue Sep 12, 2024 · 7 comments
Open

[WEB][BUG] MissingPluginException after performing any action #788

MuKhAlm opened this issue Sep 12, 2024 · 7 comments

Comments

@MuKhAlm
Copy link

MuKhAlm commented Sep 12, 2024

Getting the following error after performing read, write or delete:

MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage)
Stacktrace

packages/flutter/src/services/platform_channel.dart 332:7                    _invokeMethod

Notes:

  • I'm debugging the app using Chrome
  • Haven't done any specific configurations (as non were specified by package docs)

Package version: 9.2.2

Flutter doctor

[√] Flutter (Channel stable, 3.24.1, on Microsoft Windows [Version 10.0.22631.4169], locale en-GB)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/windows-android-setup for detailed instructions).
flutter config --android-sdk to update to that location.

[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[!] Android Studio (not installed)
[√] VS Code (version 1.93.0)
[√] Connected device (3 available)
[√] Network resources

@darwin-morocho
Copy link

Same issue

@rekire
Copy link

rekire commented Sep 15, 2024

I have the same issue on Android. Somehow I suspect that the root cause is the same as of flutter/flutter#153075 there however is the root cause not found yet.

@MuKhAlm
Copy link
Author

MuKhAlm commented Sep 15, 2024

I have the same issue on Android. Somehow I suspect that the root cause is the same as of flutter/flutter#153075 there however is the root cause not found yet.

That's interesting. One reply there suggested running flutter clean

@rekire
Copy link

rekire commented Sep 15, 2024

I did that multiple times. I also deleted my App multiple times and even Flutter. My current theory is that something breaks the initialization of the method channels.

@rekire
Copy link

rekire commented Sep 15, 2024

As expected, in my app is the FlutterSecureStoragePlugin's method onAttachedToEngine() is not called, that is why the the method channel is not found. Digging deeper...

@rekire
Copy link

rekire commented Sep 15, 2024

Okay got it repaired, but not sure why it broke.
I'm calling there the GeneratedPluginRegistrant.registerWith(flutterEngine) in my MainActivity and it starts working again. The most interesting question is why this is necessary and why it broke.

My simplified code is like this:

class MainActivity: FlutterActivity() {
    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine)
    }
}

(I removed the part regarding a custom Application since that is not related as I found out later)

@eggzotic
Copy link

I have the same issue on Android. Somehow I suspect that the root cause is the same as of flutter/flutter#153075 there however is the root cause not found yet.

That's interesting. One reply there suggested running flutter clean

This flutter clean fixed it for me. I was happily using flutter run -d chrome but a release build flutter build web was hitting this error in chrome when loading from the prod web server. Seems the flutter clean just prior to the flutter build web gives me a working release build...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants