flutter-webrtc / callkeep

iOS CallKit and Android ConnectionService for Flutter
MIT License
137 stars 151 forks source link

PlatformException(E_ACTIVITY_DOES_NOT_EXIST, Activity doesn't exist, null, null) #194

Open dmsherazi opened 3 weeks ago

dmsherazi commented 3 weeks ago

When the FCM message Arrives And I want to display the incoming call screen I get

D/FLT:CallKeepModule(19734): Called displayIncomingCall D/FLT:CallKeepModule(19734): backToForeground, app isOpened ?false E/flutter (19734): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(E_ACTIVITY_DOES_NOT_EXIST, Activity doesn't exist, null, null) E/flutter (19734): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7) E/flutter (19734): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18) E/flutter (19734):

I am using the main.dart of the example code without any modification Here is the log.

D/FLTFireMsgReceiver(19734): broadcast received for message
V/ActivityThread(19734): scheduleReceiver info = ActivityInfo{b405f97 com.google.firebase.iid.FirebaseInstanceIdReceiver} intent = Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x11080010 pkg=com.astrolabetech.iremote cmp=com.astrolabetech.iremote/com.google.firebase.iid.FirebaseInstanceIdReceiver (has extras) } sync = true hasCode = 249044041
W/abetech.iremote(19734): Accessing hidden method Landroid/os/WorkSource;->add(I)Z (unsupported,test-api, reflection, allowed)
W/abetech.iremote(19734): Accessing hidden method Landroid/os/WorkSource;->add(ILjava/lang/String;)Z (unsupported,test-api, reflection, allowed)
W/abetech.iremote(19734): Accessing hidden method Landroid/os/WorkSource;->get(I)I (unsupported, reflection, allowed)
W/abetech.iremote(19734): Accessing hidden method Landroid/os/WorkSource;->getName(I)Ljava/lang/String; (unsupported, reflection, allowed)
I/flutter (19734): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (19734): │ #0   myBackgroundMessageHandler (package:astrolabe/main.dart:32:10)
I/flutter (19734): │ #1   _firebaseMessagingCallbackDispatcher.<anonymous closure> (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:47:22)
I/flutter (19734): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (19734): │ 🐛 backgroundMessage: message => Instance of 'RemoteMessage'
I/flutter (19734): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (19734): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (19734): │ #0   myBackgroundMessageHandler (package:astrolabe/main.dart:82:10)
I/flutter (19734): │ #1   _firebaseMessagingCallbackDispatcher.<anonymous closure> (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:47:22)
I/flutter (19734): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (19734): │ 🐛 backgroundMessage: displayIncomingCall (Door-5)
I/flutter (19734): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
D/FLT:CallKeepModule(19734): Called displayIncomingCall
D/FLT:CallKeepModule(19734): backToForeground, app isOpened ?false
E/flutter (19734): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(E_ACTIVITY_DOES_NOT_EXIST, Activity doesn't exist, null, null)
E/flutter (19734): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
E/flutter (19734): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter (19734): <asynchronous suspension>
E/flutter (19734): #2      FlutterCallkeep.requestPermissions (package:callkeep/src/api.dart:390:16)
E/flutter (19734): <asynchronous suspension>
E/flutter (19734): #3      FlutterCallkeep._setupAndroid (package:callkeep/src/api.dart:361:28)
E/flutter (19734): <asynchronous suspension>
E/flutter (19734): #4      FlutterCallkeep.setup (package:callkeep/src/api.dart:36:7)
E/flutter (19734): <asynchronous suspension>
E/flutter (19734):