You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "chadek (via GitHub)" <gi...@apache.org> on 2026/09/21 02:00:36 UTC
[I] Embedded dashboard goes blank after a navigation internal to the dashboard [superset]
chadek opened a new issue, #44468:
URL: https://github.com/apache/superset/issues/44468
### Bug description
### Bug description
In an embedded dashboard, clicking a link that navigates the iframe itself — a tab link, a link in a Markdown chart, a drill-down, anything pointing back at the dashboard — leaves an empty frame. The dashboard only comes back when the host remounts the iframe, i.e. by leaving the page and returning to it. There is no error, in the host console or in Superset's: the page was served (200 on /embedded/<uuid>), it simply never started.
The embedded page does not render until it receives a first guest token over its MessageChannel. In superset-embedded-sdk (0.4.0 and master), the iframe's load listener is registered before iframe.src, so it fires on every load, reloads included, and creates a fresh MessageChannel each time. But it only hands that channel back through resolve() of a promise that is already settled from the second load onwards. Nobody keeps the new port1: the new document waits for a guestToken on a channel whose other end no longer exists, while ourPort stays bound to the first document — so the initial emit, the periodic refresh and every method (getScrollSize, getActiveTabs, …) talk into the void.
Nothing is wrong on the Superset side: the new document registers its handshake listener and calls Switchboard.start() normally. It waits for a token that never comes. Worth noting that [#39860](https://github.com/apache/superset/pull/39860) already hardened the iframe side to accept a second 'port transfer' handshake — the host side was never completed to send one.
This cannot be worked around from the host app: in the iframe, Switchboard is a per-document singleton that refuses a second init, the SDK's own load listener is registered at iframe creation so it always speaks first, and a cross-origin iframe never exposes the URL it navigated to, so remounting on the clicked link is not possible either. The fix has to live where the port is created.
I have a patch with tests and will open a PR.
### How to reproduce the bug
Embed a dashboard that contains a link internal to the dashboard (a Markdown chart with a link to one of its own tabs is enough).
Click that link in the host application.
Network tab: GET /embedded/<uuid>?… answers 200, then only the bundle's CSS, JS and fonts follow. No chart/data call, no call to the host's guest-token endpoint. The frame is empty.
### Superset version
6.1.0 (also reproduced against master for the SDK code path)
### Node version
24
### Browser
Chrome
### Additional context
Two adjacent limitations, out of scope for this report, which I can file separately if useful: the SDK carries its display settings (uiConfig, show_filters, expand_filters) in the iframe URL, so any relative link internal to the dashboard wipes them; and the native filter bar only publishes native_filters_key on /superset/dashboard, never on /embedded/, so a link cannot carry the filter state either.
One deployment note for anyone hitting this: allowed_domains must be empty or include Superset's own origin, because after an internal navigation the iframe's referrer is Superset itself — a list holding only the host app's domain turns these links from a blank frame into a 403.
### 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.
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.11
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] 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.
--
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.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
Re: [I] Embedded dashboard goes blank after a navigation internal to the dashboard [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #44468:
URL: https://github.com/apache/superset/issues/44468#issuecomment-5768527756
Nice writeup. #44470 looks like it covers this exactly (re-registers the port/Switchboard on reload), CI's green there. Tagging it for review rather than starting a separate fix. Thanks for the PR!
--
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
Re: [I] Embedded dashboard goes blank after a navigation internal to the dashboard [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #44468: Embedded dashboard goes blank after a navigation internal to the dashboard
URL: https://github.com/apache/superset/issues/44468
--
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