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.38k stars 2.58k forks source link

[bug] TLS Support is not available (NixOS) #11647

Closed ndom91 closed 1 week ago

ndom91 commented 1 week ago

Describe the bug

So recently our Tauri v2 app has started not being able to complete any fetch requests to https endpoints, logging the error Failed to load resource: TLS support is not available.

We've been using the same flake.nix (src) for the past few months and this issue appeared all of a sudden after a system update (nix flake update && nix-rebuild switch)

The system update did not touch glib-networking, which afaik usually includes the TLS stuff. It did, however, bump webkit2gtk_4_1 from 2.46.1 to 2.46.3. That's the only relevent change I can think of.

On the other hand, the flake for this project hasn't changed at all and I haven't updated it in a while, so in that environment it should still be using a slightly older version of libwebkit2gtk_4.1. EDIT: yeah so according to tauri info it's still using 2.44.3 :thinking:

Is anyone else on Nix (or generally on 2.46.3 of libwebkit2gtk_4.1) having similar issues?

Reproduction

  1. Clone https://github.com/gitbutlerapp/gitbutler
  2. direnv allow or nix develop
  3. Run pnpm dev:desktop to start the application, and notice all fetch requests to external domains throw the TLS support is not available error in the console.

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: NixOS 24.5.0 x86_64 (X64)
    ✔ webkit2gtk-4.1: 2.44.3
    ✔ rsvg2: 2.58.1
    ✔ rustc: 1.82.0-nightly (28a58f2fa 2024-07-31)
    ✔ cargo: 1.82.0-nightly (257b72b8a 2024-07-30)
    ✔ rustup: 1.27.1 (1980-01-01)
    ✔ Rust toolchain: nightly-2024-08-01-x86_64-unknown-linux-gnu (overridden by '/opt/gitbutler/gitbutler/rust-toolchain.toml')
    - node: 20.15.1
    - pnpm: 9.5.0
    - npm: 10.7.0
    - bun: 1.1.31

[-] Packages
    - tauri 🦀: 2.0.6
    - tauri-build 🦀: 2.0.2
    - wry 🦀: 0.46.3
    - tao 🦀: 0.30.3
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli : 2.0.1 (outdated, latest: 2.1.0)

[-] Plugins
    - tauri-plugin-os 🦀: 2.0.1
    - @tauri-apps/plugin-os : not installed!
    - tauri-plugin-store 🦀: 2.1.0
    - @tauri-apps/plugin-store : not installed!
    - tauri-plugin-log 🦀: 2.0.1
    - @tauri-apps/plugin-log : not installed!
    - tauri-plugin-http 🦀: 2.0.3
    - @tauri-apps/plugin-http : not installed!
    - tauri-plugin-fs 🦀: 2.0.3
    - @tauri-apps/plugin-fs : not installed!
    - tauri-plugin-updater 🦀: 2.0.2
    - @tauri-apps/plugin-updater : not installed!
    - tauri-plugin-single-instance 🦀: 2.0.1
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-process 🦀: 2.0.1
    - @tauri-apps/plugin-process : not installed!
    - tauri-plugin-window-state 🦀: 2.0.1
    - @tauri-apps/plugin-window-state : not installed!
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : not installed!
    - tauri-plugin-dialog 🦀: 2.0.3
    - @tauri-apps/plugin-dialog : not installed!

[-] App
    - build-type: build
    - CSP: style-src 'self' 'unsafe-inline'; script-src 'self' https://eu.posthog.com https://eu.i.posthog.com; default-src 'self'; img-src 'self' asset: https://asset.localhost data: tauri://localhost https://avatars.githubusercontent.com https://*.gitbutler.com  https://gitbutler-public.s3.amazonaws.com https://*.gravatar.com https://io.wp.com https://i0.wp.com https://i1.wp.com https://i2.wp.com https://i3.wp.com https://github.com https://*.googleusercontent.com; connect-src 'self' ipc: http://ipc.localhost https://eu.posthog.com https://eu.i.posthog.com https://app.gitbutler.com https://o4504644069687296.ingest.sentry.io ws://localhost:7703 https://github.com https://api.github.com https://api.openai.com https://api.anthropic.com
    - frontendDist: ../../apps/desktop/build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Rollup

Stack trace

image

Additional context

No response

ndom91 commented 1 week ago

Not sure exactly what the issue was, but rolling back to the hyprland@0.45.1 tagged release (instead of master) and re-enabling programs.hyprland.enable = true (instead of just via home-manager) fixed it