CORS Error embebbing the bot in my website - Channel Web

Hi, I have my bot hosted in a VM in Google Cloud Platform ( Google Cloud - Compute Engine ).
I have activated ok the SSL in the VM, so I can use botpress In a secure way.
I have pointed the DNS to that VM instance, so now I can access ok the bot dashboard in a subdomain by typing “https://subdomain.mywebsite.com
Since here I have no problem :slight_smile:
I can manage and access all botpress features ok by typing “https://subdomain.mywebsite.com

The problem comes when I want to embed the bot in my website. ( “https://mywebsite.com” )
I am following the instructions that are in botpress documentation: ( https://botpress.io/docs/channels/web ) , but am getting CORS error in the browser and I can’t see the chatbot bubble.

The browser gives me the next error:

Could not display component

An error occurred while loading the component

Blocked a frame with origin “https://subdomain.mywebsite.com” from accessing a cross-origin frame.

Developer? click hereto see why this might happen

If I inspect the page, I can see in the console tab that the browser is giving me the next error:
DOMException: Blocked a frame with origin “https://subdomain.mywebsite.com” from accessing a cross-origin frame

If I Disable my web browser security, I can see the botpress chatbot bubble ok:

The botpress version I am using is: 12.1.6
Botpress Server Enviroment: Ubuntu 18.04 LTS in Google Cloud Engine
Web Server: nginx/1.14.0 (Ubuntu)

Can somebody help me solve this problem or have someone any Idea how can this be solved?

Thank You so much :slight_smile:

I have the same issue with 12.1.6 It’s not a prob with 12.1.4 though.

1 Like

As crbenson2019 suggest. For testing purpose, I have downgraded to version v12.1.4 , and in that version I have no problem for embedding the chatbot:

Have tested version v12.1.5 and same problem

So, it seems to be a v12.1.5 and v12.1.6 issue :frowning:

is there any fix for this issue or the only solution is to downgrade

Something was added in 12.1.5 to access the store from the parent window (to have greater control over the webchat), but it seems to be causing issue, so it will be optional in the next release (12.2).

1 Like

12.1.6 here as well on Ubuntu 18.

Could not display component

An error occurred while loading the component

Blocked a frame with origin “***” from accessing a cross-origin frame.

Developer? click hereto see why this might happen

Good to know, I’m facing the same issue. Any idea when 12.2 is going to be released?

I have tested v12.2, but still having the same issue :frowning:
No chatbot icon in the page, but the next error in the browser console:

Uncaught (in promise) DOMException: Blocked a frame with origin “https://mysubdomain.mywebsite.com” from accessing a cross-origin frame.

Any idea how tro solve this?
Thank you so much :slight_smile:

1 Like

i am having same problem

Its working on botpress-v12_2_0 . Try out guys.

I have tried with v12_2_0 But still getting the same error :frowning:
Have you done any type of configuration for getting it working?
Maybe have you edited any botpress config file or something else ?
I dont understand… v12_1_4 is working fine for me. But I am installing botpress v12_2_0 the same way as v12_1_4 and it dont work for me.
Any Idea what could be happening ?
Thank you so much :slight_smile:

I was facing the same issue. I am also using the google gce server. However, instead of the conventional hosting server. I opted for the managed version of Google cloud hosting. Initaially, I thought it is some infrastructure related issue. But, then after talking to the support department It was cleat to me that Botpress is sustainable with any hosting provider.
I wanted to embed Botpress in my website which is created on wordpress. I was able to do that with the below mentioned resource.


I hope it works fine for you.