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

Failed to handle method call #70

Open
Ckc1124 opened this issue Feb 10, 2023 · 5 comments
Open

Failed to handle method call #70

Ckc1124 opened this issue Feb 10, 2023 · 5 comments

Comments

@Ckc1124
Copy link

Ckc1124 commented Feb 10, 2023

my code:
image

version: 0.1.6

issue
E/MethodChannel#flutter_background( 9919): Failed to handle method call
E/MethodChannel#flutter_background( 9919): kotlin.KotlinNullPointerException
E/MethodChannel#flutter_background( 9919): at de.julianassmann.flutter_background.FlutterBackgroundPlugin.onMethodCall(FlutterBackgroundPlugin.kt:67)
E/MethodChannel#flutter_background( 9919): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230)
E/MethodChannel#flutter_background( 9919): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter_background( 9919): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#flutter_background( 9919): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_background( 9919): at android.os.MessageQueue.next(MessageQueue.java:335)
E/MethodChannel#flutter_background( 9919): at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#flutter_background( 9919): at android.app.ActivityThread.main(ActivityThread.java:7697)
E/MethodChannel#flutter_background( 9919): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_background( 9919): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/MethodChannel#flutter_background( 9919): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
E/flutter ( 9919): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(error, null, null)
E/flutter ( 9919): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:572:7)
E/flutter ( 9919): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:161:18)
E/flutter ( 9919):
E/flutter ( 9919): #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12)
E/flutter ( 9919): #3 FlutterBackground.hasPermissions (package:flutter_background/src/flutter_background.dart:37:27)
E/flutter ( 9919): #4 _ModuleSelectMainPageState.build.. (package:FlutterApp/common/widget/module_select_main_page.dart:209:71)
E/flutter ( 9919): #5 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
E/flutter ( 9919): #6 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:1098:38)
E/flutter ( 9919): #7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
E/flutter ( 9919): #8 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
E/flutter ( 9919): #9 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
E/flutter ( 9919): #10 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:219:7)
E/flutter ( 9919): #11 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:477:9)
E/flutter ( 9919): #12 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:78:12)
E/flutter ( 9919): #13 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:124:9)
E/flutter ( 9919): #14 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter ( 9919): #15 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:122:18)
E/flutter ( 9919): #16 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:108:7)
E/flutter ( 9919): #17 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:220:19)
E/flutter ( 9919): #18 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
E/flutter ( 9919): #19 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7)
E/flutter ( 9919): #20 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7)
E/flutter ( 9919): #21 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7)
E/flutter ( 9919): #22 _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter ( 9919): #23 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter ( 9919): #24 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter ( 9919): #25 _invoke1 (dart:ui/hooks.dart:267:10)
E/flutter ( 9919): #26 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
E/flutter ( 9919):

@binvb
Copy link

binvb commented Apr 10, 2023

same error, any update?

@Muhammad-Mohsen
Copy link

I think this is related to #69
I'd try the solution by @jakoss to add the service to the AndroidManifset manually

<service android:name="de.julianassmann.flutter_background.IsolateHolderService" android:exported="false" />

@vmwsree
Copy link

vmwsree commented Jul 14, 2023

I added still no notification icon

@jakoss
Copy link

jakoss commented Jul 15, 2023

I added still no notification icon

Are you on Android 13?

@JulianAssmann
Copy link
Owner

JulianAssmann commented Aug 15, 2024

Thanks for creating the issue. Can you please upgrade to the new version of the plugin (1.3.0), update your AndroidManifest.xml according to the new README (specifically including the foreground service types) and report back?

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

6 participants