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

Timeout while Client creation #7

Open
Oni22 opened this issue Jul 15, 2024 · 8 comments
Open

Timeout while Client creation #7

Oni22 opened this issue Jul 15, 2024 · 8 comments

Comments

@Oni22
Copy link

Oni22 commented Jul 15, 2024

Hey,

First of all we are using:
vapi: 0.0.9
Flutter: 3.22.2

We are trying to add vapi to our flutter app but we get a timeout error while the client is created (see image). The app crashed right after. It happens also on real devices.

Screenshot 2024-07-15 at 18 00 07

We are using the example from the repository:

Future<void> test() async {
    setState(() {
      buttonText = 'Loading...';
      isLoading = true;
    });
    try {
      if (!isCallStarted) {
        await vapi.start(assistantId: VAPI_ASSISTANT_ID);
      } else {
        await vapi.stop();
      }
    } catch (err) {
      print(err);
    }
  }
}

Thanks!

@nikhilro
Copy link
Contributor

Could you try increasing the timeout manually? Seemed to work in another issue #6

@Oni22
Copy link
Author

Oni22 commented Jul 15, 2024

tried that already didnt worked :/

@knowunity-jan
Copy link

@nikhilro so it seems like that one of your dependecies daily_flutter is causing that issue. Not 100% sure but maybe you can also check it again?

@nikhilro
Copy link
Contributor

nikhilro commented Jul 23, 2024

daily_flutter is essential because we use daily for webrtc transport. this sdk should actually be a thin wrapper on daily_flutter. i'm pretty swamped with infra right now. if someone wants to take a stab at making the sdk work, happy to merge their PR.

for reference, this is how web sdk works with dailyjs: https://github.com/VapiAI/web/blob/main/vapi.ts (again, should be pretty thin wrapper)

@alimcharaniya
Copy link

wish i could take a stab.. i'm more of a hacker than an engineer. hope we can see progress here soon. good luck. blocked from development

@nikhilro
Copy link
Contributor

nikhilro commented Aug 7, 2024

#10 might solve the creation timeout. Lmk if any issues remaining.

@alimcharaniya
Copy link

Oh sh**! I got it. Increased timeout to 5000ms but it connected pretty much instantly. LETS GO
image

@alimcharaniya
Copy link

alimcharaniya commented Aug 31, 2024

Ah, but then I ran into this:

The 'daily_flutter_audio_manager_events' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
image

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

4 participants