loud-coral
loud-coral17mo ago

Web SDK Calling - Does not work outside of 'localhost:3000'

This maybe a Noob question but I am trying to run Vapi web sdk on aws s3 http://hs-web-call-app.s3-website-us-east-1.amazonaws.com/ or http://192.168.2.10:3000 and getting error attached when I click Call. The code is the boilerplate quickstart. All I did was add my public key and build and start using yarn. This works when using http://localhost:3000. Any thoughts?
Vapi Web Quickstart
Vapi Web Quickstart
No description
No description
6 Replies
Ask Inkeep
Ask Inkeep17mo ago
Hi @mardadi, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Vapi Web SDK * Web SDK * Developing Locally * Web Calling ----------------------------- Answer It sounds like you're encountering an issue related to hosting environments or the network configuration when trying to deploy the Vapi Web SDK outside of the localhost environment. Here are a few things to consider: 1. Cross-Origin Resource Sharing (CORS): When deploying on AWS S3 or another domain, ensure that CORS settings are configured correctly. The Vapi Web SDK might be trying to access resources that are not allowed by the CORS policy of your server. 2. Public Key Configuration: Verify that the public key used is correct and is intended for the deployment environment. Sometimes, keys that work on localhost might not be configured for other environments. 3. HTTPS Requirement: Modern browsers require secure contexts (HTTPS) for many features. If your server is hosted on HTTP (like your S3 example), it may cause issues. Try configuring your server to serve content over HTTPS. 4. Network Configuration: Check if there are any network configuration issues, like firewalls or security groups on AWS, that might be blocking the SDK's network requests. Here’s a basic checklist to ensure your environment is configured correctly: - Ensure your domain is correctly configured for HTTPS if you're moving away from localhost. - Verify CORS policies allow requests from your domain. - Double-check your public key and other configuration details specific to the Vapi setup. These are general recommendations and without specific error messages, it's challenging to provide a more detailed solution. If you continue to face issues, reviewing the server and browser console logs for any error messages can provide more insights into what might be going wrong. Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
fair-rose
fair-rose17mo ago
Same issue as on the first image. Locally works fine
Ask Inkeep
Ask Inkeep17mo ago
Got it. Tagging @Vapi Team for additional help.
passive-yellow
passive-yellow17mo ago
@Evgenii @mardadi Kaustaubh will be the right person to help you out with this issue. Can you guys please join the Offices Today and ask this question? https://discord.gg/FTWDNqrT?event=1245822066586812507
absent-sapphire
absent-sapphire17mo ago
https://www.daily.co/security/secure-calls/ Daily only allows calls on https.
Daily
WebRTC Video & Audio APIs for Every Developer - Daily
Daily is the enterprise WebRTC platform to build real-time voice, video and AI at scale. Industry-leading SLAs, analytics, and APIs since 2016.
fair-rose
fair-rose17mo ago
it was indeed an https problem. got an ssl and now works fine, thank you!

Did you find this page helpful?