You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/21 10:00:22 UTC

[GitHub] [superset] suraj-12 opened a new issue #18126: error Unexpected token < in JSON at position 0

suraj-12 opened a new issue #18126:
URL: https://github.com/apache/superset/issues/18126


   use case is to embed superset dasboards in a web application as iframe but while doing so on some visualization getting Unexpected token < in JSON at position 0 error. 
   
   normally in superset application same dashboard is working fine but while sahring as iframe only this issue is coming.
   
   superset version 1.32
   
   html page content for testing:
   <html>
   <iframe name="iframe1" src="https://xxxxxxxxxxx-
   ![supersetiframeerror](https://user-images.githubusercontent.com/48901138/150507033-1e215d15-2824-41f8-9e61-6e7834add800.JPG)
   superset.ad.infosys.com/superset/dashboard/13/" frameborder="0" 
       marginheight="0" 
       marginwidth="0" 
       width="100%" 
       height="100%" 
       scrolling="auto"></iframe>
   </html>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] gndsnts commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
gndsnts commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1021178984


   Sorry to repeat this issue, but i think is better wait for this solution, and verify if it works correctly. After confirm, i will close my issue.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] mdeshmu commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
mdeshmu commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1072068867


   @suraj-12 can you provide a documentation on how you are running superset on AWS ECS, if you have ?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] geido commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
geido commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1019984372


   Hello @suraj-12 thanks for reporting this issue. Would you please provide more information concerning those viz types for which you are experiencing this problem? Thank you!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] suddjian closed issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
suddjian closed issue #18126:
URL: https://github.com/apache/superset/issues/18126


   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] thalesvon commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] suddjian commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
suddjian commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1021770245


   I believe this is fixed by #17530 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] gndsnts commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
gndsnts commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1021178984


   Sorry to repeat this issue, but i think is better wait for this solution, and verify if it works correctly. After confirm, i will close my issue.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] suraj-12 commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
suraj-12 commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1020001669


   ![iframe issue](https://user-images.githubusercontent.com/48901138/150775224-a68944d5-08dc-460a-be6b-9ae02af65b18.JPG)
   
   Facing issues in filters, metrics and pie charts


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] suraj-12 commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
suraj-12 commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1020002306


   but if i use same url in browser then there is no issue. only while integrating it with iframe i was getting this issue
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] thalesvon commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
thalesvon commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1068473985


   For anyone interested on this thread, the error message was misleading. 
   I found an error on the superset logs with the message:
   
   `The CSRF session token is missing`
   
   I added the following to my `superset_config.py` and the iframe worked like a charm.
   
   ```python
   SESSION_COOKIE_SAMESITE = None
   ```
   
   This issue describes the CSRF token error: https://github.com/apache/superset/issues/8382


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] mdeshmu commented on issue #18126: error Unexpected token < in JSON at position 0

Posted by GitBox <gi...@apache.org>.
mdeshmu commented on issue #18126:
URL: https://github.com/apache/superset/issues/18126#issuecomment-1072068867


   @suraj-12 can you provide a documentation on how you are running superset on AWS ECS, if you have ?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org