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

MissingPluginException(No implementation found for method close on channel flutter_webview_plugin) #33

Closed
arnoldparge opened this issue Feb 1, 2018 · 14 comments
Labels

Comments

@arnoldparge
Copy link

arnoldparge commented Feb 1, 2018

I am trying to have WebView in Flutter using WebviewScaffold widget.

I have installed flutter_webview_plugin: "^0.1.0+1"

but I am getting ERROR:
MissingPluginException(No implementation found for method close on channel flutter_webview_plugin)
.
.
.
MissingPluginException(No implementation found for method launch on channel flutter_webview_plugin)
.
.
.

Below is how my page looks like:

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


class BulkProductUpdatePageRoute extends MaterialPageRoute {
  BulkProductUpdatePageRoute():
      super(builder: (BuildContext context) => new BulkProductUpdatePage());
}

class BulkProductUpdatePage extends StatefulWidget {
  @override
  _BulkProductUpdatePageState createState() => new _BulkProductUpdatePageState();
}

class _BulkProductUpdatePageState extends State<BulkProductUpdatePage> {

  @override
  Widget build(BuildContext context) {
    return new WebviewScaffold(
      appBar: new AppBar(
        leading: new RetailAppBarLeading(),
        title: new Text('Bulk Product Update'),
        bottom: appBarBottom(
          child: new Container(
            child: new TextField(
              decoration: new InputDecoration(
                  icon: new Icon(
                    Icons.search,
                    color: Colors.grey,
                  ),
                  hideDivider: true,
                  hintText: 'Search Products'
              ),
            ),
            padding: new EdgeInsets.only(
                bottom: 5.0
            ),
          ),
        ),
      ),
      url: 'https://pub.dartlang.org/packages/flutter_webview_plugin#-installing-tab-',
    );
  }
}

@lejard-h lejard-h added the bug label Feb 1, 2018
@lejard-h
Copy link
Collaborator

lejard-h commented Feb 1, 2018

It's like you did get the updated dart code but not the iOS/Android one.
Can you try to remove pubspec.lock and .pub then redo a flutter packages get ?

@imtoori
Copy link

imtoori commented Feb 26, 2018

Did you solve in some way? I'm having the same error

@IanDarwin
Copy link

I was having the same problem but it went away on its own, probably something wasn't clean. Restarted my Mac on Monday morning, rebuild and reloaded everything and my Help route via WebView is working fine on both platforms.

@zoechi
Copy link

zoechi commented Mar 26, 2018

flutter clean might help. I have this occasionally recently that some changes don't take effect.

@IanDarwin
Copy link

IanDarwin commented Mar 26, 2018

Yes, that's what I meant by "rebuilt and reloaded everything", flutter clean run forces it to rebuild everything in sight. Is now my go-to first thing to try when changes don't appear in a "hot reload"

@tiagosito
Copy link

tiagosito commented May 16, 2018

@lejard-h and others devs...
I have already performed the procedures of [Restart mac, flutter clean] and still it continues with error below for iOS..... and for Android the project can not be built

ERROR:
[VERBOSE-2: dart_error.cc (16)] Unhandled exception:
MissingPluginException (No implementation found for method launch on channel flutter_webview_plugin)

0 MethodChannel.invokeMethod (package: flutter / src / services / platform_channel.dart: 278: 7)

1 FlutterWebviewPlugin.launch (package: blablabla / webview / base.dart: 103: 20)

2 _WebviewScaffoldState.build (package:blablabla/ webview_scaffold.dart: 62:24)

@siyukok
Copy link

siyukok commented Jun 26, 2018

If you use the AS, please check the file - > project structure - > modules - > dependences, maybe could solve the problem

@Kumuda123
Copy link

Hey I am having the same problem. Did you find a solution ?

@manondidi
Copy link

Hey I am having the same problem. Did you find a solution ?

i have same issue,did you fix ?

@Kumuda123
Copy link

No i did not fix the issue !

@manondidi
Copy link

No i did not fix the issue !

it work fine in single flutter project but not in a exiting project add into flutter
what about you?

if cant fix ,what should we do? give up flutter in this function,use native develop it?

@manondidi
Copy link

No i did not fix the issue !

hey my friend ,i am so exited to share you my way to fix it, yes, i fixed it, maybe it is a bug

  1. it's happend in a exiting project add into flutter
  2. i add into flutter by offical wiki but i didnt use flutterview or flutterfragment

i create a activity class ShopActivity : FlutterFragmentActivity()
then
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
....}
when i use flutter-webview-plugin logcat print "MissingPluginException(No implementation found for method close on channel flutter_webview_plugin) "

i think flutter-webview-plugin maybe not register successfully
so i add " FlutterWebviewPlugin.registerWith(this.registrarFor("com.flutter_webview_plugin.FlutterWebviewPlugin"))"

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    GeneratedPluginRegistrant.registerWith(this)
    FlutterWebviewPlugin.registerWith(this.registrarFor("com.flutter_webview_plugin.FlutterWebviewPlugin"))

}

then success, that maybe a flutter bug in a exiting project add into flutter
我只是用取巧的方式绕过了这个问题,希望官方可以重视修复

@responilla07
Copy link

@arnoldparge @Kumuda123

I just fixed the issue on my side right now. I stop first the app then;

flutter clean
flutter clean cached --all
then ctrl + s in pubspec.yaml

in my pubspec i have this, 'flutter_webview_plugin:' and my flutter version is 1.17.5

@ankit-tyagi123
Copy link

I am also having same issue. Stuck from last 2 days. None of above solution worked for me.

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

No branches or pull requests