-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error Unexpected token < in JSON at position 0 #18126
Comments
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! |
but if i use same url in browser then there is no issue. only while integrating it with iframe i was getting this issue |
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. |
I believe this is fixed by #17530 |
Hi @suddjian,
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
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 CaseI am trying to embedded Charts and Dashboard into Google Sites and my webApp. I tried embedding using two approaches:
<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
This also led to the error message on the iframe Additional Information
Any guidance is appreciated. |
For anyone interested on this thread, the error message was misleading.
I added the following to my SESSION_COOKIE_SAMESITE = None This issue describes the CSRF token error: #8382 |
@suraj-12 can you provide a documentation on how you are running superset on AWS ECS, if you have ? |
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:
<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>The text was updated successfully, but these errors were encountered: