connectycube-flutter-call-kit icon indicating copy to clipboard operation
connectycube-flutter-call-kit copied to clipboard

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

Open BaoDevFS opened this issue 1 year ago • 27 comments

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.

BaoDevFS avatar Feb 21 '24 16:02 BaoDevFS

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

TatankaConCube avatar Feb 21 '24 16:02 TatankaConCube

[!] 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 avatar Feb 21 '24 16:02 BaoDevFS

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

BaoDevFS avatar Feb 21 '24 16:02 BaoDevFS

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

TatankaConCube avatar Feb 21 '24 16:02 TatankaConCube

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

TatankaConCube avatar Feb 21 '24 16:02 TatankaConCube

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}

BaoDevFS avatar Feb 21 '24 16:02 BaoDevFS

is this full log?

TatankaConCube avatar Feb 21 '24 16:02 TatankaConCube

yes, this is full logs in my console/

BaoDevFS avatar Feb 21 '24 16:02 BaoDevFS

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}

BaoDevFS avatar Feb 21 '24 16:02 BaoDevFS

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

TatankaConCube avatar Feb 21 '24 16:02 TatankaConCube

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 avatar Feb 21 '24 16:02 TatankaConCube

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

TatankaConCube avatar Feb 21 '24 16:02 TatankaConCube

                "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 avatar Feb 21 '24 16:02 BaoDevFS

Just reinstall the app incoming call showed on lockscreen

BaoDevFS avatar Feb 21 '24 17:02 BaoDevFS

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 avatar Feb 21 '24 17:02 TatankaConCube

Just reinstall the app incoming call showed on lockscreen

is your app work with enabled impeller?

TatankaConCube avatar Feb 21 '24 17:02 TatankaConCube

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

BaoDevFS avatar Feb 21 '24 17:02 BaoDevFS

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

TatankaConCube avatar Feb 21 '24 17:02 TatankaConCube

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.

BaoDevFS avatar Feb 21 '24 17:02 BaoDevFS

I need a full log not only the warning or errors

TatankaConCube avatar Feb 22 '24 14:02 TatankaConCube

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?

BaoDevFS avatar Feb 22 '24 15:02 BaoDevFS

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 avatar Feb 22 '24 15:02 TatankaConCube

When i run the release on iOS

can you reproduce the same issue in the debug build?

TatankaConCube avatar Feb 22 '24 15:02 TatankaConCube

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.

BaoDevFS avatar Feb 22 '24 15:02 BaoDevFS

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?

TatankaConCube avatar Feb 22 '24 15:02 TatankaConCube

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

BaoDevFS avatar Feb 22 '24 15:02 BaoDevFS

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

TatankaConCube avatar Feb 26 '24 09:02 TatankaConCube