https://discord.gg/botpress logo
Help please: "Client Not Found" : Can't embed Chat...
# 🤝help
g
I'm trying to implement the Chatbot in an iFrame. I spent the whole day trying to track down bugs because I was just getting a blank screen. I finally tested the original code in Codepen, confirming it works as advertised. However, when I change to my bot ID, and my ClientID, the code in Codepen shows the same blank screen. When I do this on my own webserver, I get a console error saying "Client Not Found". I have double, triple checked both my bot ID and my Client ID. They are what is shown on my Webchat Integration page. I have published my bot, and it works fine with the embed code that doesn't include the ClientID, and it works with the sharing link. It only breaks when I try to associate with my ClientID.
Here's the link to my bot to demonstrate it's published and functioning. https://cdn.botpress.cloud/webchat/v2/shareable.html?botId=73617c17-6066-4f69-aeb6-f4f3d26fe22c
I tried uninstalling and reinstalling Webchat integration, got a new ClientID, and the problem persists. I'm getting these errors in the Console: analytics.ts:28 Uncaught (in promise) Client not found s @ analytics.ts:28 Promise.then (async) c @ analytics.ts:28 (anonymous) @ analytics.ts:28 uB @ analytics.ts:28 handleIframeApi @ main.tsx:169 When I drill down on those errors, I see "Could not load content for https://cdn.botpress.cloud/src/utils/storage.ts (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)
I tried uninstalling and reinstalling the Webchat integration. New ClientID. Same problem. Getting this error in the Console: @ analytics.ts:28 Promise.then (async) c @ analytics.ts:28 (anonymous) @ analytics.ts:28 uB @ analytics.ts:28 handleIframeApi @ main.tsx:169 And if I drill down to sources, I see this: Could not load content for ***ps://cdn.botpress.cloud/src/utils/analytics.ts (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)
Anyone? I'm supposed to demo Botpress in 90 minutes, and I'm about to run into a buzz saw.
@bumpy-butcher-41910 Pointed to where the problem might be, but I can't find a resolution: The original code uses the same BotID and ClientID, which suggests it originated with v1, where ClientID and BotID were the same. Oddly, however, while this code works fine with the default IDs when I'm toggled to v2, it does not work when I'm on v1--the iFrame loads with the script code. So, I tried switching to v1, and using the same BotID/ClientID in my configurable settings, and then switching to v2, but that didn't work either.
Here's the code that works: <iframe srcdoc=" window.botpressWebChat.init({ 'composerPlaceholder': 'Ask me anything AI!', 'botConversationDescription': 'ThreadripperGPT', 'botId': 'f87c4530-e481-49dd-8841-236d83aa1389', 'hostUrl': '*ttps://cdn.botpress.cloud/webchat/v0', 'messagingUrl': '*ttps://messaging.botpress.cloud', 'clientId': 'f87c4530-e481-49dd-8841-236d83aa1389', 'enableConversationDeletion': true, 'showPoweredBy': false, 'className': 'webchatIframe', 'containerWidth': '100%25', 'layoutWidth': '100%25', 'hideWidget': true, 'showCloseButton': false, 'disableAnimations': true, 'closeOnEscape': false, 'showConversationsButton': false, 'enableTranscriptDownload': false, 'stylesheet':'*ttps://webchat-styler-css.botpress.app/prod/code/3fcd3e4e-d5bc-4bf5-8699-14b621b3ada2/v31782/style.css' }); window.botpressWebChat.onEvent(function () { window.botpressWebChat.sendEvent({ type: 'show' }) }, ['LIFECYCLE.LOADED']); " width="100%" height="100%"> Note: BotID/ClientID the same, yet only works when I'm switched to v2. The only thing I'm changing is adding my BotID/ClientID.
b
ah didn't realize you had posted here as well!
n
@great-laptop-30228 Hi. I was able to get it to work with first putting it on an iframe.
You can see it here.
ClientID and botID are the same
2 Views