superset icon indicating copy to clipboard operation
superset copied to clipboard

Unable to embed imported dashboard.

Open kushalmraut opened this issue 10 months ago • 2 comments

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

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

kushalmraut avatar Apr 23 '24 09:04 kushalmraut

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

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

ranasaket avatar Apr 23 '24 12:04 ranasaket

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 

shantanukhond avatar May 08 '24 07:05 shantanukhond

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

anuragsingh-prospera avatar Jul 10 '24 05:07 anuragsingh-prospera