Repository navigation
[Bug] Sidebar browser stays blank when the dsh UI runs inside a guest webview (iframe fallback, no error shown) #12961
furkancak1r
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
The built-in sidebar browser ("Browser" tab in the right sidebar) stays blank for most sites when the dsh web UI runs inside a guest
<webview>in the desktop app. No error shows.Example: a plugin shows the dsh web UI of a different computer (remote host) inside a
<webview>. In that view,https://github.com/stays blank.https://example.com/and a plain local page load correctly.Steps to reproduce
<webview>(for example with a plugin).https://github.com/.Expected
The page loads, as it does in the sidebar browser of the local desktop UI. If the page cannot load, the panel shows an error and points to "Open in system browser".
Actual
The panel stays blank and shows no error. The iframe navigation fails with
net::ERR_BLOCKED_BY_RESPONSE(-27).Cause
Line numbers are approximate and refer to the bundled files in
app.asarof 0.2.2-rc.1. The same code is onmaster(e8f7b93).<webview>mode only whenglobalThis.dshDesktop.browserexists. If it does not exist, the panel falls back to an<iframe>(web mode).dsh-client-ui-sidebar-browser/lib/client.js, approximately lines 1771-1813 (mode select) and 968-974 (iframe).packages/client/ui-sidebar-browser/src/client/index.tsandsrc/client/view/IframePresentation.ts.dshDesktopbridge only to the main frame ofdsh-app://app. Other pages get{ protocolVersion: 1 }withoutbrowser(lib/preload-app.cjs, approximately line 1976, sourceapps/desktop/src/preload-app.ts).will-attach-webviewdeletes all preferences exceptdisablePopups, so the guest gets no preload (lib/main.js, approximately line 18671, sourceapps/desktop/src/browser-guests.ts).X-Frame-Optionsor a CSPframe-ancestorsdirective cannot load in the iframe.github.comsendsX-Frame-Options: denyandframe-ancestors 'none'. The iframe still firesload, so the panel records a successful load and shows no error.localhostURL in the remote view loads in the iframe of the local renderer. Thus it opens on the local computer, not on the remote host.dsh webin a normal browser also uses the iframe mode, so the missing error probably occurs there too.Suggested fix
loadfires anyway. For example, let the Host checkX-Frame-Optionsand CSPframe-ancestorsbefore the load. Then show an error with the "Open in system browser" action.webviewTag: false, and the main process blocks nestedwill-attach-webview(lib/main.js, approximately line 18724). Thus this change needs main-process support. If this is out of scope, document the limit.Workaround
Related: #9909 (public native sidebar browser APIs), #12670 (desktop remote host mode), #11987 ("Open in system browser" does nothing in some setups).
Environment
All reactions