flutter_blue icon indicating copy to clipboard operation
flutter_blue copied to clipboard

Unhandled Exception: MissingPluginException(No implementation found for method startScan on channel flutter_blue_plus/methods)

Open RafCoder90 opened this issue 2 years ago • 7 comments

I entered in the pubspec.yaml the dipendence flutter_blue_plus: ^1.3.1 . I have a button that calls a method. In this method I declare a FlutterBlue instance but: Unhandled Exception: MissingPluginException(No implementation found for method startScan on channel flutter_blue_plus/methods)

RafCoder90 avatar Nov 08 '22 09:11 RafCoder90

Have you tried rebuilding your app ?

iamsupercode avatar Nov 18 '22 13:11 iamsupercode

yes

RafCoder90 avatar Nov 18 '22 14:11 RafCoder90

The same error sometimes occurs when the application is in background for me

baranacikgoz avatar Nov 19 '22 14:11 baranacikgoz

E/flutter ( 8557): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method setLogLevel on channel flutter_blue_plus/methods) E/flutter ( 8557): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:7) E/flutter ( 8557):

RafCoder90 avatar Nov 19 '22 16:11 RafCoder90

Same issue after upgrading from 1.4.0 that was working fine on IOS and now, with 1.5.2 does not work anymore ...

saguado69 avatar May 24 '23 18:05 saguado69

run flutter clean and try again

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Santi Aguado @.> Sent: Wednesday, May 24, 2023 8:08:37 PM To: pauldemarco/flutter_blue @.> Cc: Gishobert Gwenzi @.>; Comment @.> Subject: Re: [pauldemarco/flutter_blue] Unhandled Exception: MissingPluginException(No implementation found for method startScan on channel flutter_blue_plus/methods) (Issue #1109)

Same issue after upgrading from 1.4.0 that was working fine on IOS and now, with 1.5.2 does not work anymore ...

— Reply to this email directly, view it on GitHubhttps://github.com/pauldemarco/flutter_blue/issues/1109#issuecomment-1561717001, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZJLC2N3U6GVH52LKZLVXBDXHZFCLANCNFSM6AAAAAAR2DMWWA. You are receiving this because you commented.Message ID: @.***> Gishobert Gwenzi

Full Stack Software Developer

p: +27104439799 m: e: @.***

22 Magwa Crescent, Gateway West, Waterfall City Midrand 2066

petalmafrica.com

+27115848290 +260630020001 +2638677240191

Facebook Twitter LinkedIn

iamsupercode avatar May 24 '23 18:05 iamsupercode

Thanks, now I have a Missing Plugin Implementation on the two lines looking for isOn and isAvailable that worked fine before upgrading:

// SCAN AND ADD BLUETOOTH PORTS
if (Platform.isAndroid || Platform.isIOS) {
  FlutterBluePlus ble = FlutterBluePlus.instance;
  // await ble.isOn.then((value) async {
  // await ble.isAvailable.then((value) async {
  await ble.startScan(
      // withServices: [Guid('0000ffe0-0000-1000-8000-00805f9b34fb')],
      timeout: const Duration(seconds: 4));
  ble.scanResults.listen((detectedPorts) async {
    // ADD BLE PORTS
    for (var port in detectedPorts) {
      String? name = port.device.name;
      if (name != '') {
        ports.add(
            {'key': 'BLT ($name)', 'value': name, 'type': 'bluetooth'});
      }
    }
  });
  await Future.delayed(const Duration(seconds: 5));
  // });
  // });
  await ble.stopScan();
}

saguado69 avatar May 24 '23 18:05 saguado69