GithubHelp home page GithubHelp logo

MissingPluginException (MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage)) about flutter_secure_storage HOT 12 CLOSED

mogol avatar mogol commented on August 11, 2024
MissingPluginException (MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage))

from flutter_secure_storage.

Comments (12)

Kyle-Mendes avatar Kyle-Mendes commented on August 11, 2024 8

I actually think I might have fixed it!

I manually removed the app from my emulator (went to the app drawer, long pressed, app info, uninstall) and it seems to be building again.

Thanks for the help in debugging this!

from flutter_secure_storage.

mogol avatar mogol commented on August 11, 2024 1

that’s great,
you are welcome.

from flutter_secure_storage.

wilyanto avatar wilyanto commented on August 11, 2024 1

After few hours of surfing. Finally SOLVED for me. Here is what I found out.

If you are calling flutter_secure_storage (or any packages) method in background service (as example, when you are using notification onBackgroundMessage). This exception occurred because usually our plugin registered at main.dart in foreground, but if we are calling our plugin's method in background we need to manually registered our plugin in our app/src/main/[kotlin/java]/.../Application.[java or kt].

Inside the Application.java or Application.kt

image

After done that, do flutter run again. Hope it helps!

from flutter_secure_storage.

mogol avatar mogol commented on August 11, 2024

Hi @Kyle-Mendes
is it iOS or Android?

Flutter has such issue from time to time. You need to force dependency update, e.g. add new plugin , get packages and remove the plugin. So it shouldn't be problem of this package.

from flutter_secure_storage.

Kyle-Mendes avatar Kyle-Mendes commented on August 11, 2024

Just tested, and I'm only getting the error on Android right now.

The steps I've tried

  1. flutter doctor
  2. flutter clean
  3. remove the flutter_secure_storage from ~/.pub_cache and then flutter packages get

So are you suggesting

  1. add a package, flutter packages get, remove the package?

from flutter_secure_storage.

mogol avatar mogol commented on August 11, 2024

add a package, flutter packages get, remove the package?
yes, it should be the only step to solve.
try to add, get and remove e.g. https://pub.dartlang.org/packages/image_picker

The error means that native code was proper added as a dependency. If it doesn't help please share flutter doctor -v

from flutter_secure_storage.

Kyle-Mendes avatar Kyle-Mendes commented on August 11, 2024

That doesn't seem to have worked, unfortunately

    • Flutter version 1.3.8 at /Users/user/Projects/flutter
    • Framework revision e5b1ed7a7f (5 weeks ago), 2019-03-06 14:23:37 -0800
    • Engine revision f4951df193
    • Dart version 2.2.1 (build 2.2.1-dev.0.0 571ea80e11)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/user/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 9.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.2, Build version 9C40b
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install:
        brew install ios-deploy
    ! CocoaPods out of date (1.5.0 is recommended).
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To upgrade:
        brew upgrade cocoapods
        pod setup

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 22.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] VS Code (version 1.33.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.25.0

[✓] Connected device (2 available)
    • Android SDK built for x86 • emulator-5554                        • android-x86 • Android 8.0.0 (API 26) (emulator)
    • iPhone X                  • AFE355F9-BD65-4E01-AD21-956C7163274B • ios         • iOS 11.2 (simulator)

! Doctor found issues in 1 category.

from flutter_secure_storage.

mogol avatar mogol commented on August 11, 2024

I found this comment. Can you check
flutter/flutter#14137 (comment) ?

from flutter_secure_storage.

Kyle-Mendes avatar Kyle-Mendes commented on August 11, 2024

Just tried removing all of ios and android. Ran flutter create . and then updated the gradle file to have the minSdk for this package. I'm still encountering the title error however :(

EDIT: I also reset my computer and tried a different Flutter version, with no luck

from flutter_secure_storage.

mogol avatar mogol commented on August 11, 2024

Did you experience the same issue with another package with native plugins? Can you try any new package , eg Firebase or image pickers ?

from flutter_secure_storage.

Kyle-Mendes avatar Kyle-Mendes commented on August 11, 2024

I just tested a very simple app using the image_picker that you shared before, and was able to get it to run.

import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';

void main() => runApp(MyHomePage());

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  var _image;

  Future getImage() async {
    var image = await ImagePicker.pickImage(source: ImageSource.camera);

    setState(() {
      _image = image;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
      appBar: AppBar(
        title: Text('Image Picker Example'),
      ),
      body: Center(
        child: _image == null ? Text('No image selected.') : Image.file(_image),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: getImage,
        tooltip: 'Pick Image',
        child: Icon(Icons.add_a_photo),
      ),
    ));
  }
}

from flutter_secure_storage.

craiglabenz avatar craiglabenz commented on August 11, 2024

@Kyle-Mendes That also worked for me when nothing else was

from flutter_secure_storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.