cybex-dev / twilio_voice

Flutter Twilio Voice Plugin
https://twilio-voice-web.web.app/
MIT License
39 stars 81 forks source link

[Studio Flow] Always return 400 code at the end of the flow #190

Open kkday-kevinhorasia opened 11 months ago

kkday-kevinhorasia commented 11 months ago

Using any voice widget from studio flow will always give me error message [We are sorry, an application error has occur] at the end. But if I use my make-call function in studio flow, it will not give me any error.

Possible cause:

  1. Free account vs Paid account? (already try both)
  2. Wrong constant setting? (already check multiple times)
  3. Studio flow bug? (tried with Twilio Client in TwiML App with no problem)

Assumption:

  1. Some bug in twilio_voice package, since using native android and ios SDK from twilio doesn't give me that problem

Any idea or possible solution to this problem? Thanks.

cybex-dev commented 11 months ago

HI @kkday-kevinhorasia

Thanks for reporting this issue.

I'm unfamiliar with Studio Flow - do you have a link to the platform I might further investigate the issue with?

kkday-kevinhorasia commented 11 months ago

Unfortunately due to confidential issue I can't share the link. But I will describe it more detail here

Steps:

  1. Inside Studio Flow I use [Connect Call To] widget, as the name suggest it connects incoming call to callee.
  2. Then I put Studio Flow [Webhook URL] in my TwiML App (instead of function service - make-call).
  3. Lastly, in Flutter using TwilioVoice.instance.call.place() to make a call to my TwiML App which connect to my Studio Flow.
cybex-dev commented 11 months ago

@kkday-kevinhorasia sorry, I wasn't clear.

I'm unfamiliar with the Studio Flow platform, my best guess is https://flutterflow.io/ since "Studio Flow" didn't seem to show any results.

Do you have a link to the platform e.g. facebook.com. I understand, respect and do not need access to your account on the platform.

kkday-kevinhorasia commented 11 months ago

Sorry, I mean In Twilio Console Studio Flow.

cybex-dev commented 11 months ago

@kkday-kevinhorasia

I see, thanks for reporting this issue - I'll be investigating over the weekend.

cybex-dev commented 10 months ago

@kkday-kevinhorasia

If you've found a solution in the interim, that's fantastic. If not, I'd like to offer a few suggestions:

Review your TwiML application's code:

kkday-kevinhorasia commented 10 months ago

Thanks for the reply. I will give a simple example that give me that error:

  1. In my TwiML app request url link to my Studio Flow.
  2. Inside my Studio Flow connect incoming call to Say widget as in the picture below

Greenshot 2023-11-17 09 21 11

  1. From my Flutter App make call to my TwiML App (which redirect to my Studio Flow)
    TwilioVoice.instance.call.place(
      from: caller, // My own identity
      to: callee, // any (since it will only hear message only)
      extraOptions: extraOptions,
    );
  2. I will hear the message from my Studio Flow, but I will also hear the error message "We are sorry, an application error has occur". The execution also will not stop properly and it return 400 error code as we can see from the picture below

Greenshot 2023-11-09 09 32 10 Greenshot 2023-11-09 09 34 54

cybex-dev commented 10 months ago

Thanks for the reply. I will give a simple example that give me that error:

  1. In my TwiML app request url link to my Studio Flow.
  2. Inside my Studio Flow connect incoming call to Say widget as in the picture below

Greenshot 2023-11-17 09 21 11

  1. From my Flutter App make call to my TwiML App (which redirect to my Studio Flow)
TwilioVoice.instance.call.place(
      from: caller, // My own identity
      to: callee, // any (since it will only hear message only)
      extraOptions: extraOptions,
);
  1. I will hear the message from my Studio Flow, but I will also hear the error message "We are sorry, an application error has occur". The execution also will not stop properly and it return 400 error code as we can see from the picture below

Greenshot 2023-11-09 09 32 10 Greenshot 2023-11-09 09 34 54

Might I recommend obfuscating some details

First thoughts, To field is empty - does the same occur with a valid client provided?

kkday-kevinhorasia commented 10 months ago

Yes, with valid client provided (call is connected to callee), the To field at the first flow will have value, but as the flow goes to the second widget the To parameter will be empty.

This behavior also occur when I am calling from Twilio Client in TwiML App, but calling from Twilio Client will not give me any error and the flow end normally.

image

cybex-dev commented 10 months ago

Yes, with valid client provided (call is connected to callee), the To field at the first flow will have value, but as the flow goes to the second widget the To parameter will be empty.

This behavior also occur when I am calling from Twilio Client in TwiML App, but calling from Twilio Client will not give me any error and the flow end normally.

image

I see - we're using call flows but haven't run into this problem. I'll need to investigate.

Though, the audible message "An application error has occurred" usually indicates a TwiML (or related) issue.

kkday-kevinhorasia commented 10 months ago

Hi @cybex-dev, I just wondering maybe the problem is caused by not up to date dependencies?

kkday-kevinhorasia commented 5 months ago

UPDATED

The problem is actually from the Twilio Android and iOS SDK and not this package. It seems that Twilio team already fix it.

Twilio reference ticket: # 14617521