ConnectyCube / connectycube-flutter-call-kit

A Flutter plugin for displaying call screen when the app in the background or terminated.
https://developers.connectycube.com/flutter
Apache License 2.0
52 stars 75 forks source link

Has error not show imcomming call when voip comming in ios lockscreen #141

Open BaoDevFS opened 4 months ago

BaoDevFS commented 4 months ago

When ios on lockscreen after receiving an viop incoming call, ios has error log and not show the incoming call screen [ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend.

TatankaConCube commented 4 months ago

could you please provide the output of the command flutter doctor -v?

BaoDevFS commented 4 months ago

[!] Flutter (Channel stable, 3.19.0, on macOS 14.3 23D56 darwin-arm64, locale en-VN) • Flutter version 3.19.0 on channel stable at /Users/baonn/fvm/versions/3.19.0 ! Warning: dart on your path resolves to /opt/homebrew/Cellar/dart/2.19.3/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/baonn/fvm/versions/3.19.0. Consider adding /Users/baonn/fvm/versions/3.19.0/bin to the front of your path. • Upstream repository https://github.com/flutter/flutter.git • Framework revision bae5e49bc2 (8 days ago), 2024-02-13 17:46:18 -0800 • Engine revision 04817c99c9 • Dart version 3.3.0 • DevTools version 2.31.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/baonn/Library/Android/sdk ✗ cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C500b • CocoaPods version 1.14.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

BaoDevFS commented 4 months ago

im running release in sdk 3.16.8 i have this error after updating to 3.19.0 this error is not fixed. When app opened, everything worked well

TatankaConCube commented 4 months ago

have you tried to build iOS without impeller enabling? does this issue present here too?

TatankaConCube commented 4 months ago

could you please provide the full log not only the error string?

BaoDevFS commented 4 months ago

fvm flutter run --release -d 00089630-001914A61A044533 --no-enable-impeller This is a command I have run. After i close app and lock my phone This is logs flutter: [initEventsHandler] rawData: {event: voipToken, args: {voipToken: XXXXXXX}} [ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend. flutter: [initEventsHandler] rawData: {args: {voipToken: XXXXXX}, event: voipToken}

TatankaConCube commented 4 months ago

is this full log?

BaoDevFS commented 4 months ago

yes, this is full logs in my console/

BaoDevFS commented 4 months ago

Update: after adding

FLTEnableImpeller

to Info.split and run command fvm flutter run --release -d 00089630-001914A61A044533 --no-enable-impeller Error has disappeared but the coming call not show This is new logs: GrMtlCommandBuffer: WARNING: Creating MTLCommandBuffer while in background. GrMtlCommandBuffer: WARNING: Creating MTLCommandBuffer while in background. flutter: [initEventsHandler] rawData: {args: {voipToken: 7E787AAF2C294E4B3B2C41E0498AE0FDE7174312B8E4D2CE4D02C76749AEAB08}, event: voipToken}

TatankaConCube commented 4 months ago

please provide the full payload what do you put in the VoIP push notification

TatankaConCube commented 4 months ago

flutter: [initEventsHandler] rawData:

it is the part of starting the app, but before in log you should to see the info about incoming voip

TatankaConCube commented 4 months ago

if your system ignores the voip, try to remove the app and install it again

BaoDevFS commented 4 months ago
                "session_id" => "{$call->id}",
                "call_type" => $forIos ? ($call->is_video ? 1 : 0) : ($call->is_video ? '1' : '0'),
                "caller_id" => $forIos ? $user->id : "{$user->id}",
                "caller_name" => "{$user->fullname}",
                "call_opponents" => $receiverIds,
                "photo_url" => "{$user->avatar_path}",
                "message" => $body,
                "signal_type" => "startCall",
                "ios_voip" => "1",
                "notification_type" => "PUSH"
BaoDevFS commented 4 months ago

Just reinstall the app incoming call showed on lockscreen

TatankaConCube commented 4 months ago

what platform do you use for sending the push notification? looks like it is not the flutter. also please check if you send the correct types of data, here is the types which plugin expects https://github.com/ConnectyCube/connectycube-flutter-call-kit/blob/master/ios/Classes/VoIPController.swift#L66-L72

TatankaConCube commented 4 months ago

Just reinstall the app incoming call showed on lockscreen

is your app work with enabled impeller?

BaoDevFS commented 4 months ago

And i found a new issue when accepting voice calls on lockscreen. When incoming calls show on lockscreen, I accept call after i click button leave call, native call is closed, but action in callback onCallRejectedWhenTerminated not triggered

TatankaConCube commented 4 months ago

but action in callback onCallRejectedWhenTerminated not triggered

it works for Android only, please see README more carefuly, for iOS use the common onCallRejected because the iOS app starts in background immediately after receiving the VoIP push notification

BaoDevFS commented 4 months ago

When incoming calls show on lockscreen, I accept call after i click button leave call, native call is closed, If I answer a call while it is on lockscreen, it will not show up again. Logs: GrMtlCommandBuffer: WARNING: Creating MTLCommandBuffer while in background.

TatankaConCube commented 4 months ago

I need a full log not only the warning or errors

BaoDevFS commented 4 months ago

When i run the release on iOS, I only see these logs. So sorry, Do you know how to see more logs on iOS run release?

TatankaConCube commented 4 months ago

yes, you can do it via the Console app. To start it go to Xcode -> Window -> Devices and Simulators, then select your device and press the 'Open console' button, then in the opened window click the 'Start streaming' button. after that, you should to see all logs from your device and can filter them by your app

TatankaConCube commented 4 months ago

When i run the release on iOS

can you reproduce the same issue in the debug build?

BaoDevFS commented 4 months ago

I do not think I can replicate this problem in debug mode because, in this instance, I have to lock my iPhone and close the app.

TatankaConCube commented 4 months ago

I have to lock my iPhone and close the app.

and why can't do it in debug mode when the device is connected to the Xcode?

BaoDevFS commented 4 months ago

After I close the app, it cannot start. How can you run debug?

TatankaConCube commented 4 months ago

then you need the Console app for reading and collecting logs

can you reproduce the same issue in the debug build?

here I meant the build installed via Xcode, not other release-delivering systems