Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Invalid scale on linux #12004

Open
vavakado opened this issue Dec 18, 2024 · 2 comments
Open

[bug] Invalid scale on linux #12004

vavakado opened this issue Dec 18, 2024 · 2 comments
Labels
platform: Nix/NixOS Issues specific to NixOS or Nix tooling status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug

Comments

@vavakado
Copy link

Describe the bug

When i run my application everything is tiny and when i open the devtools my tag has a size of -150000 px by -40000 px which makes it unstably tiny

Reproduction

  1. Create a new project with bun create tauri-app
  2. Run it on linux on wayland(i haven't tested on xorg)
  3. open devtools and see the wrong scale

Expected behavior

the tag and it's children having appropriate sizes that are not negative and more than 20 times bigger than my actual resolution

Full tauri info output

$ tauri info

[✔] Environment
    - OS: NixOS 25.5.0 x86_64 (X64)
    ✔ webkit2gtk-4.1: 2.46.4
    ✔ rsvg2: 2.58.3
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (1980-01-01)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.18.1
    - npm: 10.8.2
    - bun: 1.1.38

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - @tauri-apps/api : 2.1.1
    - @tauri-apps/cli : 2.1.0

[-] Plugins

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

Stack trace

No response

Additional context

I tried using a webkitgtk-based browser(midori) and it didn't have this issue.

@vavakado vavakado added status: needs triage This issue needs to triage, applied to new issues type: bug labels Dec 18, 2024
@FabianLars FabianLars added platform: Linux help wanted Help is requested to fix this issue platform: Nix/NixOS Issues specific to NixOS or Nix tooling labels Dec 19, 2024
@vavakado
Copy link
Author

okay this is a webkitgtk bug for sure, i tried switching my flake from nixpkgs-24.11 to nixpkgs-24.05 and it worked with no issues

here is the flake

{
  description = "tauri";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs =
    {
      self,
      nixpkgs,
      flake-utils,
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
      in
      {
        devShells.default = pkgs.mkShell {
          buildInputs = with pkgs; [
            at-spi2-atk
            atkmm
            cairo
            gdk-pixbuf
            openssl
            pkg-config
            glib
            gobject-introspection
            gobject-introspection.dev
            gtk3
            harfbuzz
            librsvg
            libsoup_3
            pango
            webkitgtk_4_1
            webkitgtk_4_1.dev
          ];

          shellHook = ''
            export PKG_CONFIG_PATH="${pkgs.glib.dev}/lib/pkgconfig:${pkgs.libsoup_3.dev}/lib/pkgconfig:${pkgs.webkitgtk_4_1.dev}/lib/pkgconfig:${pkgs.at-spi2-atk.dev}/lib/pkgconfig:${pkgs.gtk3.dev}/lib/pkgconfig:${pkgs.gdk-pixbuf.dev}/lib/pkgconfig:${pkgs.cairo.dev}/lib/pkgconfig:${pkgs.pango.dev}/lib/pkgconfig:${pkgs.harfbuzz.dev}/lib/pkgconfig"
          '';
        };
      }
    );
}

@vavakado
Copy link
Author

oh and here is the new tauri info output

[✔] Environment
    - OS: NixOS 25.5.0 x86_64 (X64)
    ✔ webkit2gtk-4.1: 2.44.3
    ✔ rsvg2: 2.58.1
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (1980-01-01)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.18.1
    - npm: 10.8.2
    - bun: 1.1.38

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - @tauri-apps/api : 2.1.1
    - @tauri-apps/cli : 2.1.0

[-] Plugins

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

@FabianLars FabianLars added status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes and removed status: needs triage This issue needs to triage, applied to new issues help wanted Help is requested to fix this issue platform: Linux labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Nix/NixOS Issues specific to NixOS or Nix tooling status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug
Projects
None yet
Development

No branches or pull requests

2 participants