tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
85.05k stars 2.57k forks source link

[bug] Tauri + next js Error. Blank window rendered. Developing using WSL2 #11061

Closed mapacdev closed 1 month ago

mapacdev commented 1 month ago

Describe the bug

I'm using vs code with tauri and next developing under ubuntu linux using windows WSL2. When I execute yarn tauri dev I got a BLANK WINDOW. In the console appears the following error:

Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.29s

libEGL warning: failed to open /dev/dri/renderD128: Permission denied

(next-tauri-linux:25725): WARNING : 16:18:13.167: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing. libEGL warning: failed to open /dev/dri/renderD128: Permission denied

○ Compiling / ... ✓ Compiled / in 804ms (525 modules) GET / 200 in 990ms ✓ Compiled in 126ms (253 modules)

Reproduction

I execute yar tauri dev

Expected behavior

I window rendering the page written using next js

Full tauri info output

arn run v1.22.22
$ /home/miguel/dev/cursos/tauri/01-tauri/next-tauri-linux/node_modules/.bin/tauri info

[✔] Environment
    - OS: Ubuntu 22.4.0 X64
    ✔ webkit2gtk-4.0: 2.44.3
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.17.0
    - yarn: 1.22.22
    - npm: 10.8.2

[-] Packages
    - tauri [RUST]: 1.8.0
    - tauri-build [RUST]: 1.5.5
    - wry [RUST]: 0.24.11
    - tao [RUST]: 0.16.10
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 1.6.2

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../out
    - devPath: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack
Done in 10.03s.

Stack trace

No response

Additional context

No response

FabianLars commented 1 month ago

Try running it like this

WEBKIT_DISABLE_DMABUF_RENDERER=1 yarn tauri dev

If that doesn't work, try WEBKIT_DISABLE_COMPOSITING_MODE=1 instead.

mapacdev commented 1 month ago

export WEBKIT_DISABLE_DMABUF_RENDERER=1

Thanks fabian. It works !!! 🎉🎉🎉