Web SDK error
# support
t
I'm getting this error in JS console while using the web SDK integration using .start(). Any way to solve this? could not emit {action: 'error', errorMsg: "Failed to load call object bundle https://c.daily.… target origin 'null' in a call to 'postMessage'.", error: {…}, callClientId: '17436627157970.8125370514313617'} Error: Unhandled error. (undefined) at Vapi.emit (chunk-BONOX2KM.js?v=e88423fd:95:19) at Vapi.emit (@vapi-ai_web.js?t=1743661144326&v=e88423fd:8453:22) at ee2. (@vapi-ai_web.js?t=1743661144326&v=e88423fd:8542:18) at k.emit (@vapi-ai_web.js?t=1743661144326&v=e88423fd:2717:36) at ee2.value (@vapi-ai_web.js?t=1743661144326&v=e88423fd:6102:53) at @Vapi-ai_web.js?t=1743661144326&v=e88423fd:5284:47 at e2._failureCallback (@vapi-ai_web.js?t=1743661144326&v=e88423fd:4473:39) at e2.t2 [as _failureCallback] (@vapi-ai_web.js?t=1743661144326&v=e88423fd:4490:74) at e2. (@vapi-ai_web.js?t=1743661144326&v=e88423fd:4564:16) at Generator.next () ChatWidget.svelte:469 Failed to load call object bundle https://c.daily.co/call-machine/versioned/0.75.2/static/call-machine-object-bundle.js: SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin 'null' in a call to 'postMessage'
v
Hi there! 👋 I see you're running into an error with the Vapi Web SDK when using the
.start()
method. I'm unable to see your specific implementation details, but I can definitely help troubleshoot this "Failed to load call object bundle" error with the postMessage issue. Based on the information I found, here are several potential solutions: ### 1. Check Daily.js Version This error is likely related to the Daily.js library (which Vapi uses as a transport layer). The error message shows it's trying to load version 0.75.2 of the call object bundle. Make sure you're using a supported version of Daily.js, as outdated versions can cause this issue. ### 2. Browser-related Fixes - Update your browser to the latest version - Disable browser extensions one by one to see if any are causing the issue - Check network connectivity to ensure your environment can properly reach Vapi servers ### 3. Configuration Issues - Verify your Vapi configuration is correct, including API keys and tokens - If you're using the 11labs flash_model, try changing the model to "turbo" as [this has resolved similar issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335277468805758986) - Make sure you're passing the correct parameters to the
.start()
method, including the squadId as a third parameter if needed:
Copy code
js
  const call = vapi.start(null, null, <squadId-or-squadConfig>)
### 4. Implement Error Handling Add an error event listener to get more detailed error information:
Copy code
js
vapi.on("error", (e) => { 
  console.error(e); 
});
If you continue to experience issues after trying these steps, I'd recommend reaching out to Vapi support at support@vapi.ai with your organization ID and the specific error message. Is there anything specific about your implementation that I can help clarify further? Sources:
Hi there! 👋 I see you're experiencing that "Failed to load call object bundle" error with the postMessage issue in the Vapi Web SDK. I don't have visibility into your specific implementation, but I can definitely help troubleshoot this error based on similar issues others have encountered. Here are some potential solutions to try: ### 1. Check Daily.js Version This error is directly related to the Daily.js library (which Vapi uses as a transport layer). The error shows it's trying to load version 0.75.2 of the call object bundle. Make sure you're using a supported version of Daily.js, as [outdated versions can cause this issue](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344328162024362095). ### 2. Browser-related Fixes - Update your browser to the latest version - Disable browser extensions one by one (some extensions can interfere with postMessage) - Check network connectivity to ensure your environment can properly reach Vapi servers ### 3. Configuration Issues - Verify your Vapi configuration is correct, including API keys and tokens - If you're using the 11labs flash_model, try changing the model to "turbo" as [this has resolved similar issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335277468805758986) - Make sure you're passing the correct parameters to the
.start()
method, including the squadId as a third parameter if needed:
Copy code
js
  const call = vapi.start(null, null, <squadId-or-squadConfig>)
### 4. Implement Error Handling Add an error event listener to get more detailed error information:
Copy code
js
vapi.on("error", (e) => { 
  console.error(e); 
});
Would you be able to share any details about your implementation that might help narrow down the issue further? Sources: - [Discord Thread on Daily.js Version](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344328162024362095)
t
how do i ensure im using the right version of daily.js
a
checking if this is resolved/solved for you?
t
yes this has been resolved, thanks
a
Marking this ticket as Solved ✅
5 Views