Skip to content

[log] process hang and never open the window if add dep tokio with signal feature #307

Open
@meowtec

Description

@meowtec

platform

Linux / macOS, but not Windows

reproduction

https://github.com/meowtec/bug-reproductions/tree/tauri-log the branch is tauri-log

  1. usetauri-plugin-log
  2. add dependence tokio with the signal feature
  3. add some log in setup() hook
  4. npm run tauri dev

main.rs

fn main() {
    tauri::Builder::default()
        .plugin(
            tauri_plugin_log::Builder::default()
                .targets([LogTarget::LogDir, LogTarget::Stdout, LogTarget::Webview])
                .build(),
        )
        .setup(move |_app| {
            // NOTICE: use log here!!!
            log::info!("setup app");
            Ok(())
        })
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Cargo.toml

[dependencies]
tauri = { version = "1.2", features = ["shell-open"] }
log = "0.4"
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }

# NOTICE: add tokio!!!!
tokio = { version = "1", features = ["signal"] }

The window will never show.

The output:

> [email protected] tauri
> tauri dev

        Info Watching /bugs-report/src-tauri for changes...
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
Could not determine the accessibility bus address
[2023-04-15][14:21:50][tauri_app][INFO] setup app
[2023-04-15][14:21:50][mio::poll][TRACE] registering event source with poller: token=Token(2147483649), interests=READABLE

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplugin: logstatus: upstreamThis issue needs to be fixed in an upstream project

    Type

    No type

    Projects

    Status

    📬Proposal

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions