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] Backend Crashes when inside of GitHub Codespace #12419

Open
Peggun opened this issue Jan 16, 2025 · 2 comments
Open

[bug] Backend Crashes when inside of GitHub Codespace #12419

Peggun opened this issue Jan 16, 2025 · 2 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@Peggun
Copy link

Peggun commented Jan 16, 2025

Describe the bug

When trying to run an application inside of GitHub Codespaces, the front end works fine with the port forward, however, because of the headless version, GTK/Tao crashes. I was wondering if there is a way to fix this?

Reproduction

  1. Open a repository in the GitHub Codespace
  2. Run either cargo tauri dev or npm run tauri dev and see the backend crash

Expected behavior

To leave the front end (Vite) working as usual, and leave the backend GTK initialisation to if there is a found display.

Full tauri info output

[✔] Environment
    - OS: Ubuntu 22.4.0 x86_64 (X64) (Unknown DE on Unknown Session)
    ✔ webkit2gtk-4.1: 2.46.5
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.84.0 (9fc6b4312 2025-01-07)
    ✔ cargo: 1.84.0 (66221abde 2024-11-19)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 23.6.0
    - npm: 10.9.2

[-] Packages
    - tauri 🦀: 2.2.2
    - tauri-build 🦀: 2.0.5
    - wry 🦀: 0.48.1
    - tao 🦀: 0.31.1
    - tauri-cli 🦀: 2.2.4
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.4

[-] Plugins
    - tauri-plugin-opener 🦀: 2.2.4
    - @tauri-apps/plugin-opener : 2.2.4

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

Stack trace

thread 'main' panicked at /home/vscode/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.31.1/src/platform_impl/linux/event_loop.rs:212:53:
Failed to initialize gtk backend!: BoolError { message: "Failed to initialize GTK", filename: "/home/vscode/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gtk-0.18.2/src/rt.rs", function: "gtk::rt::init", line: 141 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additional context

Just so you know, Im not quite sure if this is a Tauri issue or a Tao issue for the window initialisation.

@Peggun Peggun added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jan 16, 2025
@Peggun
Copy link
Author

Peggun commented Jan 16, 2025

If you would like to try it on my repository, try here: https://github.com/Peggun/WhatIsThis

@Peggun
Copy link
Author

Peggun commented Jan 16, 2025

Ok I found a way to make the Ubuntu Installation think that it has a display by using Xvfb. All good now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

1 participant