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

Problem with calls after hot restart #19

Open
AsemAmmar99 opened this issue Dec 11, 2022 · 13 comments
Open

Problem with calls after hot restart #19

AsemAmmar99 opened this issue Dec 11, 2022 · 13 comments

Comments

@AsemAmmar99
Copy link

Hello, My issue is that all calls failed after a hot restart or after answering 1 call from the background using flutter_callkit_incoming plugin push UI and it doesn't work again till closing and reopening my application.

@YuliaGrigorieva
Copy link
Contributor

Hello!

Regarding the issue with hot restart.
If you face with MissingPluginException, it may be expected as according to the documentation:

If the package brings platform-specific code (Kotlin/Java for Android, Swift/Objective-C for iOS), that code must be built into your app. Hot reload and hot restart only update the Dart code, so a full restart of the app might be required to avoid errors like MissingPluginException when using the package.

Regarding the issue with flutter_callkit_incoming plugin.
Unfortunately, there is no enough information about the issue, so I cannot provide any recommendations. Could you please give some information about what exactly does not work?

@AsemAmmar99
Copy link
Author

When pressing hot restart or answering one call in the background and trying to answer another call without closing and reopening the app the answerCall function tells ( Trying to answer having no active call )

@YuliaGrigorieva
Copy link
Contributor

"Trying to answer having no active call" is the exact error? Do you see it in the logs? Could you please add a logs snippet here?

Regarding the case, do I understand correctly that you have 2 simultenious incoming calls at the moment and you try to answer one or both of them?
So, step-by-step scenario is:

  1. app is in the background
  2. app receives an incoming call (call 1)
  3. app receives an incoming call (call 2)
  4. user tries to answer both calls

is it a correct scenario? Sorry, I have a misunderstanding about the case

@AsemAmmar99
Copy link
Author

AsemAmmar99 commented Dec 12, 2022

step-by-step scenario is:

1- app is in the background
2- app receives an incoming call (call 1)
3- user answers it and continue the call normally till the end
4- app receives an incoming call (call 2)
5- user tries to answer it

@AsemAmmar99
Copy link
Author

My Logs
Screen Shot 2022-12-12 at 12 49 23 PM

@AsemAmmar99
Copy link
Author

Any updates or help ????!!!!

@AsemAmmar99
Copy link
Author

Is there any solution to my problem ?!!!!!!!!!!!!!!

@YuliaGrigorieva
Copy link
Contributor

Hello @AsemAmmar99 ,

According to the screenshot, the issue is caused by missing VICall instance. However I can't reproduce the issue with demo project.

I see 3 possible reasons:

  1. you have mentioned a hot restart action in the issue description. Hot restart loads code changes into the VM, and restarts the Flutter app, losing the app state. if a hot restart was done after receiving a VICall instance, VICall instance might be reinitiliazed to null and calling any methods getting a call id or anything related to the call may result in this error
  2. there is an issue with getting a VICall instance for the second call. However the provided information is not enough to understand the root cause.
  3. if the app is in the background when a second call is received, user might answer the call fast, before the push is processed. In this case the issue should be resolved with the callkit API with pending transactions mechanism.

According to that please answer the following questions:

  1. do you run hot restart before the call2 is answered?
  2. is the app in the background when it receives call2 and how fast the call is answered? can you check in the logs that you receive VIClient,onIncomingCall event

Best regards,
Yulia Grigorieva

@AsemAmmar99
Copy link
Author

AsemAmmar99 commented Dec 20, 2022

Hi @YuliaGrigorieva

1- No, when there are no calls.
2- The app is in the background when it receives call1 and then answering all calls in the background or foreground is failed till restarting the app.
3- I answer it fast.

@AsemAmmar99
Copy link
Author

4- No, after receiving call1 in the background and answering or declining it, I don't receive VIClient, onIncomingCall event, I only receive the notification.

@YuliaGrigorieva
Copy link
Contributor

Hello @AsemAmmar99,

If you don't receive VIClient.onIncomingCall event that's may be the reason, since VICall instance as well as its call id, can only be gotten with this event.

Can you please check VIClient state?

If it is not logged in, you should connect and login to the Voximplant Cloud, when you receive a push notification.

Best regards,
Yulia Grigorieva

@AsemAmmar99
Copy link
Author

Hi @YuliaGrigorieva

I connected and logged in to the Voximplant Cloud when I received a push notification, but sadly the problem remains.
Any other solution ?!

@YuliaGrigorieva
Copy link
Contributor

Hi @AsemAmmar99

I would recommend to collect the logs (all output from the application start including sdk logs with tags VOXSDK on android and #VI on iOS) and send them to our support - [email protected]

Without the logs it's difficult to say what's wrong.

Best regards,
Yulia Grigorieva

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

2 participants