#White screen until browserlist warning?
39 messages · Page 1 of 1 (latest)
tbh it just sounds like your frontend server/bundler is a bit slow to start 🤔
any idea how i can fix this?
you could spawn the window hidden and then show it from the frontend, but since it should be dev-only that may be a bit much.
or idk, rewrite your frontend stack in something faster :/ (though all frameworks and tools will have that problem once your project is big enough.
basically talking about this: https://tauri.app/v1/guides/features/splashscreen but without the extra splashscreen window.
hm but even in the release version it's like that
the release version shows a white screen at first asw
But not that long right, just a fraction of a second?
Because that'd be expected basically
nope like 10 seconds
this delay happens after the rust backend loads so after the run handler finishes
and before the frontend starts rendering
in the release version, it's just a white screen and nothing else
Environment
› OS: Windows 10.0.22621 X64
› Webview2: 119.0.2151.97
› MSVC:
- Visual Studio Build Tools 2019
› Node.js: 20.9.0
› npm: 10.1.0
› pnpm: 7.30.0
› yarn: 1.22.19
› rustup: 1.26.0
› rustc: 1.73.0
› cargo: 1.73.0
› Rust toolchain: stable-x86_64-pc-windows-msvc
Packages
› @tauri-apps/cli [NPM]: 1.2.3
› @tauri-apps/api [NPM]: 1.2.0
› tauri [RUST]: 1.2.4,
› tauri-build [RUST]: 1.2.1,
› tao [RUST]: 0.15.8,
› wry [RUST]: 0.23.4,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: React
› bundler: Vite
App directory structure
├─ .git
├─ .vscode
├─ dist
├─ migrations
├─ node_modules
├─ public
├─ src
└─ src-tauri```
my tauri info
on the release version, the frontend doesn't even load so I can't do ctrl+shift+i to debug
Do you run anything inside Tauri's .setup hook? Anything that runs for a long time in there will block the main thread which will delay the webview loading.
none, i even completely removed all the plugins and kept an empty run function to ensure that there was nothing blocking
the delay occurs after the run callback finishes and before the frontend renders
with the release version, it's just stuck in a white screen so idk where to start debuing
for the release issue. can you do a debug build via yarn tauri build --debug (output in target/debug/) and check the devtools console for errors?
i also have an error saying that require is not defined
otherwise the elements are empty
there's just a root element and nothing else
i guess the require one is import then
i mean, require is indeed not a thing in a browser
holy shit that was the issue
that worked
just had to make vite use cjs
thank you so much @dire oar
I'm definitely seeing this same issue, but my javascript console is empty... if I build the app for debug, i get those same asset not found errors...
in my case its its these errors in the console:
Asset `favicon.ico` not found; fallback to favicon.ico.html
Asset `favicon.ico` not found; fallback to favicon.ico/index.html
Asset `favicon.ico` not found; fallback to index.html
And in the Javascript console, i see this:
so not the same require error
@dire oar any thoughts?
Well, the asset not found errors are irrelevant really. The localhost:8097 error is weird though, that doesn't sound like something from tauri 🤔