tauri-apps / tauri

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

[bug] blank page with webkit2gtk 2.42 #7927

Open aaalloc opened 1 year ago

aaalloc commented 1 year ago

Describe the bug

Basicaly blank page

Reproduction

Probably due to webkit2gtk last version (2.42)

Expected behavior

No response

Platform and versions

[✔] Environment
    - OS: Fedora 38.0.0 X64
    ✔ webkit2gtk-4.0: 2.42.0
    ✔ rsvg2: 2.56.3
    ✔ rustc: 1.71.0 (8ede3aae2 2023-07-12)
    ✔ Cargo: 1.71.0 (cfd3bbd8f 2023-06-08)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 18.18.0
    - pnpm: 8.6.7
    - yarn: 1.22.19
    - npm: 9.8.1

[-] Packages
    - tauri [RUST]: 1.4.1
    - tauri-build [RUST]: 1.4.0
    - wry [RUST]: 0.24.3
    - tao [RUST]: 0.16.2
    - @tauri-apps/api [NPM]: 1.4.0 (outdated, latest: 1.5.0)
    - @tauri-apps/cli [NPM]: 1.4.0 (outdated, latest: 1.5.0)

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

Stack trace

No response

Additional context

No response

Bricklou commented 1 year ago
[✔] Environment
    - OS: Archlinux 6.5.5-arch1-1 X64
    ✔ webkit2gtk: 2.42.1-1
    ✔ librsvg: 2:2.57.0-1
    ✔ rustc: 1.72.1 (d5c2e9c34 2023-09-13)
    ✔ Cargo: 1.72.1 (103a7ff2e 2023-08-15)
    ✔ rustup: 1.26.0 (2023-05-04)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 18.12.1
    - pnpm: 8.8.0
    - npm: 8.8.0

[-] Packages
    - tauri [RUST]: 2.0.0-alpha.14
    - tauri-build [RUST]: 2.0.0-alpha.8
    - wry [RUST]: 0.33.0
    - tao [RUST]: 0.22.2
    - @tauri-apps/api [NPM]: 2.0.0-alpha.8
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.14

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: Vue
    - bundler: Vite

image

aaalloc commented 1 year ago

I can confirm that the problem happens when passing webkit2gtk 2.42, no problems with 2.40.

lighttigerXIV commented 1 year ago

If someone ends up here but still want's to use 2.42 you can run the dev command like this: WEBKIT_DISABLE_COMPOSITING_MODE=1 npm run tauri dev

It might work for future release of webview too.

Narcha commented 1 year ago

possibly a duplicate of #5143

aaalloc commented 1 year ago

If someone ends up here but still want's to use 2.42 you can run the dev command like this: WEBKIT_DISABLE_COMPOSITING_MODE=1 npm run tauri dev

It might work for future release of webview too.

This fixed the problem, but it is a bit problematic because I didn't needed to do that before that update

doums commented 1 year ago

Hi, I have the same issue on Arch Linux

[✔] Environment
    - OS: Arch Linux Unknown X64
    ✔ webkit2gtk-4.1: 2.42.1
    ✔ rsvg2: 2.57.0
    ✔ rustc: 1.72.1 (d5c2e9c34 2023-09-13)
    ✔ Cargo: 1.72.1 (103a7ff2e 2023-08-15)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 18.13.0
    - yarn: 1.22.19
    - npm: 8.19.3

[-] Packages
    - tauri [RUST]: 1.5.1
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.4
    - tao [RUST]: 0.16.4
    - @tauri-apps/api [NPM]: 1.5.0
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.8

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite

Using WEBKIT_DISABLE_COMPOSITING_MODE=1 fix the issue. But there might be downsides using that because it "forces accelerated compositing mode to be always off" in tauri windows

Rohit19060 commented 6 months ago

Can anyone tell me how to do this in windows? WEBKIT_DISABLE_COMPOSITING_MODE=1