Summary
The nightly but remote CLI serves the embedded SvelteKit frontend over HTTP, but the bundle assumes a Tauri runtime. In a plain browser window.__TAURI_INTERNALS__ and window.__TAURI_OS_PLUGIN_INTERNALS__ are undefined, so the app crashes during mount and the user sees a white screen.
Environment
but --version: but 0.5.1997 (nightly 0.5.1997-2992, Linux x86_64 binary from releases.gitbutler.com)
- Server:
but remote --local --port 6978 (also reproduces with the Cloudflare quick-tunnel mode)
- Client: any modern browser (tested Chromium via agent-browser) over SSH
-L 6978:localhost:6978
- OS: Ubuntu 24.04 (Linux 6.8)
Steps to reproduce
but remote --local --port 6978 from a GitButler project directory
- Forward the port to another host (e.g.
ssh -L 6978:localhost:6978 <vps>) or hit it directly in a browser
- Open
http://localhost:6978/
Expected
The embedded GitButler UI renders and the project is usable from the browser (the whole point of but remote).
Actual
Blank white page. Console:
TypeError: Cannot read properties of undefined (reading 'platform')
at ... /_app/immutable/chunks/CZlikwsS.js:5:5791
TypeError: Cannot read properties of undefined (reading 'invoke')
at ... /_app/immutable/chunks/B7_bfKp9.js:1:20253
at ... /_app/immutable/entry/app.CWh5gVUS.js:2:1187
The server itself is healthy:
GET / → 200 (HTML shell)
GET /_app/immutable/entry/start.*.js → 200
GET /_app/env.js → 200
GET /api → 200
- CORS allow-origin
http://localhost:6978, access-control-allow-credentials: true
- CSP
connect-src includes ws://localhost:6978 — WS path is fine
So it's purely a frontend problem: the bundle that but-server embeds is the Tauri-targeted apps/desktop/build/, which calls window.__TAURI_OS_PLUGIN_INTERNALS__.platform and window.__TAURI_INTERNALS__.invoke unconditionally. Without polyfills for a browser context, the SvelteKit app throws on mount and nothing else renders.
Suggested fixes
- Guard the
__TAURI_* accesses behind a runtime check and fall back to an HTTP/WebSocket transport when running under but remote (i.e. when served from the embedded server rather than Tauri).
- Or build a separate "browser" variant of the frontend for
embedded-frontend that ships browser-mode transports, and have but-server serve that one.
- At minimum, document that
but remote currently only works if the frontend is launched via Tauri, so users don't go chasing tunnel/CORS/Tailnet red herrings.
Happy to test a fix.
Summary
The nightly
but remoteCLI serves the embedded SvelteKit frontend over HTTP, but the bundle assumes a Tauri runtime. In a plain browserwindow.__TAURI_INTERNALS__andwindow.__TAURI_OS_PLUGIN_INTERNALS__areundefined, so the app crashes during mount and the user sees a white screen.Environment
but --version:but 0.5.1997(nightly0.5.1997-2992, Linux x86_64 binary from releases.gitbutler.com)but remote --local --port 6978(also reproduces with the Cloudflare quick-tunnel mode)-L 6978:localhost:6978Steps to reproduce
but remote --local --port 6978from a GitButler project directoryssh -L 6978:localhost:6978 <vps>) or hit it directly in a browserhttp://localhost:6978/Expected
The embedded GitButler UI renders and the project is usable from the browser (the whole point of
but remote).Actual
Blank white page. Console:
The server itself is healthy:
GET /→ 200 (HTML shell)GET /_app/immutable/entry/start.*.js→ 200GET /_app/env.js→ 200GET /api→ 200http://localhost:6978,access-control-allow-credentials: trueconnect-srcincludesws://localhost:6978— WS path is fineSo it's purely a frontend problem: the bundle that
but-serverembeds is the Tauri-targetedapps/desktop/build/, which callswindow.__TAURI_OS_PLUGIN_INTERNALS__.platformandwindow.__TAURI_INTERNALS__.invokeunconditionally. Without polyfills for a browser context, the SvelteKit app throws on mount and nothing else renders.Suggested fixes
__TAURI_*accesses behind a runtime check and fall back to an HTTP/WebSocket transport when running underbut remote(i.e. when served from the embedded server rather than Tauri).embedded-frontendthat ships browser-mode transports, and havebut-serverserve that one.but remotecurrently only works if the frontend is launched via Tauri, so users don't go chasing tunnel/CORS/Tailnet red herrings.Happy to test a fix.