thalesvon commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1065160977


   Hi @suddjian,
   
   > I believe this is fixed by https://github.com/apache/superset/pull/17530
   
   Could you elaborate what fixed this issue on the above PR? I still have the 
same issue. Here is a bit more of context on my scenario. 
   
   ## Environment
   
   - AWS ECS Fargate Platform 1.3.0, superset running on Docker.
   - Superset version 1.4.1
   - Authentication OAuth with Google
   - Additional settings on `superset_config.py`
   
   ```python
   ENABLE_PROXY_FIX = True
   PUBLIC_ROLE_LIKE_GAMMA = True
   
   ENABLE_CORS = True
   CORS_OPTIONS = {
       'supports_credentials': True,
       'allow_headers': ['*'],
       'resources':['*'],
       'origins': ['https://MY_SUPERSET.DOMAIN/','https://sites.google.com/', 
'https://MY_CUSTOM_APP.DOMAIN'],
   }
   ```
   
   ## Use Case
   
   I am trying to embedded Charts and Dashboard into Google Sites and my webApp.
   
   I tried embedding using two approaches: 
   
   1. **iframe**:
   
   ```html
   <iframe
     width="100%"
     height="100%"
     seamless
     frameBorder="0"
     scrolling="no"
     src="https://MY_SUPERSET.DOMAIN/superset/explore/?r=11&standalone=1";
   >
   </iframe>
   ```
   This led to the error message on the iframe `Unexpected token < in JSON at 
position 0`.
   
   2. Embbeding by URL. Using the link provided by Superset on the chart 
explore page **Copy chart URL to clipboard**:
   
   
![image](https://user-images.githubusercontent.com/19493900/157883043-1a2a8a79-0e46-499b-bd56-a51ccc14525b.png)
   
   This also led to the error message on the iframe `Unexpected token < in JSON 
at position 0`.
   
   
![image](https://user-images.githubusercontent.com/19493900/157883865-708aa8c6-2fbc-40b8-91e6-d4608f41ca83.png)
   
   
   ## Additional Information
   
   - If I open the URL on the `src`tag of my iframe and open I a new tab of my 
browser, I can see the Chart just fine, the error only apprear when the chart 
is embbeded.
   
   
![image](https://user-images.githubusercontent.com/19493900/157885719-899df95c-57d8-42b9-8e8a-be00317dd28d.png)
   
   - I also tried adding `EMBEDDED_SUPERSET=True` to `superset_config.py` but 
that did not change anything.
   
   Any guidance is appreciated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to