tauri-apps / tauri

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

[bug] Cookies not being saved in production in Fedora 39 rpm #9919

Open ajaypillay opened 1 month ago

ajaypillay commented 1 month ago

Describe the bug

I set a simple cookie as follows:

document.cookie = "a=b;";
console.log("cookie", document.cookie);

In dev, the following is printed (the previous two print statements occur beforehand as expected): image And in production: image I verified in the Cookies tab that it's empty in production in a debug build.

Reproduction

Can be reproduced as per above.

Expected behavior

Both screenshots should have the same print statements. The cookie should be printed correctly.

Full tauri info output

[✔] Environment
    - OS: Fedora 39.0.0 X64
    ✔ webkit2gtk-4.1: 2.44.1
    ✔ rsvg2: 2.57.1
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.12.2
    - pnpm: 8.12.0
    - yarn: 1.22.22
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.19
    - tauri-build [RUST]: 2.0.0-beta.15
    - wry [RUST]: 0.39.5
    - tao [RUST]: 0.28.0
    - @tauri-apps/api [NPM]: 2.0.0-beta.12
    - @tauri-apps/cli [NPM]: 2.0.0-beta.18

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace

No response

Additional context

No response

ahqsoftwares commented 1 month ago

I think its related to how the webkitgtk functions? (not sure, linux always is strange to me) Couldn't replicate the same in debian, tho the libraries should be the same ig?

ajaypillay commented 1 month ago

I verified that this is indeed the case after adding the 2 lines above to the baseline project: pnpm create tauri-app --beta in the rpm build.