apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
63.14k stars 13.99k forks source link

Unable to embed imported dashboard. #28179

Open kushalmraut opened 7 months ago

kushalmraut commented 7 months ago

Bug description

Unable to embed imported dashboard.

image

end point /api/v1/dashboard/17 giving error 404 not found end point /api/v1/dashboard/17/charts giving error 404 not found end point /api/v1/dashboard/17/datasets giving error 404 not found

Unexpected error: SupersetApiError: Not found

image

I am not getting any error on superset terminal tho.

I have successfully imported the dashboard and chart.

image

How to reproduce the bug

Import Dashboard. Try embedding the dashboard with superset sdk. (@superset-ui/embedded-sdk)

Screenshots/recordings

No response

Superset version

4.0.0

Python version

3.11

Node version

16

Browser

Chrome

Additional context

No response

Checklist

ranasaket commented 7 months ago

hi.. i was also faing the same issue. The below link will solve your problem definitly.

https://www.tetranyde.com/blog/embedding-superset

shantanukhond commented 7 months ago

Try putting

GUEST_TOKEN_JWT_EXP_SECONDS = 300 # 5 minutes 

in your superset_config.py (filename could vary if you created it with different name) file if it works if not then try putting below code

  # Dashboard embedding 
  GUEST_ROLE_NAME = "Gamma" 
  GUEST_TOKEN_JWT_SECRET = "PASTE_GENERATED_SECRET_HERE" 
  GUEST_TOKEN_JWT_ALGO = "HS256" 
  GUEST_TOKEN_HEADER_NAME = "X-GuestToken" 
  GUEST_TOKEN_JWT_EXP_SECONDS = 300 # 5 minutes 
anuragsingh-prospera commented 4 months ago

@shantanukhond this doesnt works when I want to filter the data on dashboard using row level security. Got any suggestions for that ?