Flutter_blue: Unhandled Exception: MissingPluginException(No implementation found for method setLogLevel

Created on 6 Apr 2020  路  9Comments  路  Source: pauldemarco/flutter_blue

E/flutter (30606): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method setLogLevel on channel plugins.pauldemarco.com/flutter_blue/methods)
E/flutter (30606): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:154:7)
E/flutter (30606):
E/flutter (30606): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12)
E/flutter (30606): #2 FlutterBlue.setLogLevel (package:flutter_blue/src/flutter_blue.dart:161:20)
E/flutter (30606): #3 new FlutterBlue._ (package:flutter_blue/src/flutter_blue.dart:27:5)
E/flutter (30606): #4 FlutterBlue._instance (package:flutter_blue/src/flutter_blue.dart:29:38)
E/flutter (30606): #5 FlutterBlue._instance (package:flutter_blue/src/flutter_blue.dart:29:22)
E/flutter (30606): #6 FlutterBlue.instance (package:flutter_blue/src/flutter_blue.dart:30:38)
E/flutter (30606): #7 bluetoothScanner (package:android_ble_code/bluetoothrecorder.dart:13:41)
E/flutter (30606): #8 _setupForegroundServiceCallbackChannel. (package:foreground_service/foreground_service.dart:208:50)
E/flutter (30606): #9 _setupForegroundServiceCallbackChannel. (package:foreground_service/foreground_service.dart:204:41)
E/flutter (30606): #10 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:409:55)
E/flutter (30606): #11 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:377:54)
E/flutter (30606): #12 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:218:33)
E/flutter (30606): #13 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:252:13)
E/flutter (30606): #14 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:251:38)
E/flutter (30606): #15 ChannelBuffers.drain (dart:ui/channel_buffers.dart:188:21)
E/flutter (30606): #16 _DefaultBinaryMessenger.setMessageHandler (package:flutter/src/services/binding.dart:251:23)
E/flutter (30606): #17 MethodChannel.setMethodCallHandler (package:flutter/src/services/platform_channel.dart:375:21)
E/flutter (30606): #18 _setupForegroundServiceCallbackChannel (package:foreground_service/foreground_service.dart:204:20)
E/flutter (30606): #19 _runMainZoned.. (dart:ui/hooks.dart:241:25)
E/flutter (30606): #20 _rootRun (dart:async/zone.dart:1184:13)
E/flutter (30606): #21 _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter (30606): #22 _runZoned (dart:async/zone.dart:1619:10)
E/flutter (30606): #23 runZonedGuarded (dart:async/zone.dart:1608:12)
E/flutter (30606): #24 _runMainZoned. (dart:ui/hooks.dart:233:5)
E/flutter (30606): #25 _startIsolate. (dart:isolate-patch/isolate_patch.dart:301:19)
E/flutter (30606): #26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
E/flutter (30606):

bug

All 9 comments

Same issue when trying to run the example app on an android device with android 5.1 (No implementation found for method setLogLevel on channel plugins.pauldemarco.com/flutter_blue/methods)
This error seems to be related to android V2 embeding support (https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects) as the debug console prints the following error :

Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@3e117a2f) but could not find and invoke the GeneratedPluginRegistrant

However, testing the exact same example app on an android 8.0 device, this app is runing fine so it is a bit weird.

solved: I am writing my own plugin :dancer:

The fact you are writing your own plugin do not solve this issue for the flutter_blue plugin.
So no, it isn't solved and the author of flutter_blue should try to fix it ASAP

A fix for this will be included in the next update.

This fix has not been comited to the github repository yet? Because I am using the latest version of the master repository so if the fix is supposed to be in it, it is not working

Not yet.

@pauldemarco to add some insight the problem might be bacause I am running it inside flutter_foreground_service

Is there any update on this issue? I experience the issue when calling FlutterBlue.instance in a top level function.

Some news about this issue ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

janekm picture janekm  路  3Comments

pauldemarco picture pauldemarco  路  3Comments

coduy96 picture coduy96  路  5Comments

ekuleshov picture ekuleshov  路  4Comments

ArcticSpaceFox picture ArcticSpaceFox  路  6Comments