Can't access the embedded charts from chrome browser but can do from mozilla

I am trying to access embedded charts in metabse which I am pretty much successful in doing. But the thing is that when I access it from iframe then I can only access it in the Mozilla browser. It doesn’t let me do the same with the chrome browser.

Is it a cross-origin issue? if yes how can it be rectified?

My HTML file

<!DOCTYPE HTML>
 <HTML>
 <body>
 <iframe 

src="http://localhost:3000/embed/question/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJw
YXJhbXMiOnsiY2xpZW50X2lkIjoxMDAzfSwicmVzb3VyY2UiOnsicXVlc3Rpb24iOjZ9LCJleHAiOjE2MTE3MzExMzEuMH0.vUggFEZZICXpYY_uwE7OwnSajArJX99SwdwEnJmhAVg#bordered=true&titled=true
"
frameborder=“0”
width=“800”
height=“600”
allowtransparency
>

When I run it as a .htm file on Mozilla it returns the chart I wanted but when I run the same on chrome it doesn’t return me anything.

How can I solve it?

Hi @druidMetabase
Please post “Diagnostic Info” from Admin > Troubleshooting.
Check your browser developer console for warnings/errors. Most browsers are fairly strict about embedding an iframe from a file:// reference.

@flamber I checked my developer console, it displayed me this error
"Refused to frame 'http://localhost:3000/’ because an ancestor violates the following Content Security Policy directive: “frame-ancestors *”.

Please let me know what are your thoughts on this?

Best,

Aditya

@druidMetabase
Post “Diagnostic Info” from Admin > Troubleshooting.
Which domains have you defined in Admin > Settings > Embedding ?
Most modern browsers does not allow interaction with file://, and http://localhost also has some restrictions.

Hello
i have exactly the same problem
When I run the iframe locally from public question:

<iframe
src="https://meta.com/public/question/123455645132"
frameborder="0"
width="800"
height="600"
allowtransparency

everything works through firefox, but through chrome I get the error
Refused to frame 'https://meta.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors *".

Is there a solution for this?

@adddvb

  1. Post “Diagnostic Info” from Admin > Troubleshooting.
  2. Most modern browsers does not allow interaction with file:// , and http://localhost also has some restrictions. And since you're trying to iframe a https-source, then locally generally also needs to be https.

@flamber Is it possible to change nginx configuration if I deploy metabase via AWS beanstalk?

@adddvb Yes, you can upload your own config script instead of the official release, which overrides headers via a reverse-proxy (currently Nginx is included, but will likely be removed in version 0.40)

@flamber thanks!
just to clarify i have to do this in metabase-setup.sh?

@adddvb Yes, that is currently where the Nginx configuration is stored.

1 Like