-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
New window created on each trigger of sidecar #4823
Comments
I thought this was on Windows lol can you share a sample sidecar or go app that we can use? Just to check if it isn't something specific to Go. |
The program is just the Go snippet above, just to get it working. |
Also an entire repo showcasing this issue might be useful since it could be related to the project configuration. |
Ok I'll see if I can reproduce with this data thanks @siegerts |
|
Also, for the sidecar above:
|
@siegerts I couldn't reproduce it :( can you try creating a repo that I can use to reproduce it? |
I'll try again from scratch but the example I'm using is only the above + the vite/Vue setup from the CLI prompts. |
@lucasfernog do you mind sharing your set up, either here or on discord so I can see if I've diverged somehow. Thanks for the help. |
I just used the sidecar example here in this repo and used your go code instead of the Nodejs app as sidecar. |
@lucasfernog Got it to work :) . So my app name was the same as my sidecar name. Also, I didn't have the Rust portion in For reference - use tauri::{
api::process::{Command, CommandEvent},
Manager,
};
fn main() {
tauri::Builder::default()
.setup(|app| {
let window = app.get_window("main").unwrap();
let (mut rx, mut child) = Command::new_sidecar("sc")
.expect("failed to create `mem` binary command")
.spawn()
.expect("Failed to spawn sidecar");
Ok(())
})
// .invoke_handler(tauri::generate_handler![my_custom_command])
.run(tauri::generate_context!())
.expect("error while running tauri application");
} |
The main.rs code is only needed if you need to run the sidecar from the Rust code. It should still work without it. Anyway I've added some validation in #4814 so this won't happen again. |
Describe the bug
Every time I trigger the sidecar via JS a new window is opened.
Very similar to #3564
Reproduction
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: