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] Sidecar binary doesn't work for tauri dev once it's been changed #4134

Closed
saml-dev opened this issue May 16, 2022 · 2 comments
Closed

Comments

@saml-dev
Copy link

saml-dev commented May 16, 2022

Describe the bug

The dev flow with a python binary as a sidecar gets interrupted after making any changes to the sidecar. I'm on an ARM Mac (M1 Air).
I've created a repo with info and easy reproduction steps in the readme: https://github.com/SamLewis0602/tauri-repro

Reproduction

To reproduce

  1. Clone https://github.com/SamLewis0602/tauri-repro
  2. Use pyinstaller to build simple.py (pyinstaller -F simple.py)
  3. Place binary in src-tauri/bin
  4. Append target triple (I'm on ARM mac so left my binary in there)
  5. Run yarn tauri dev, see app for command output
  6. Make any change to simple.py (change printed text or whatever)
  7. Repeat steps 3-5
  8. See that sidecar fails with signal 9

Expected behavior

To be able to change the sidecar binary itself and still have it run in yarn tauri dev

Platform and versions

$ tauri info

Environment
  › OS: Mac OS 12.3.0 X64
  › Node.js: 16.13.1
  › npm: 8.1.2
  › pnpm: Not installed!
  › yarn: 1.22.18
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: stable-aarch64-apple-darwin 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.10
  › @tauri-apps/api [NPM]: 1.0.0-rc.5
  › tauri [RUST]: 1.0.0-rc.10,
  › tauri-build [RUST]: 1.0.0-rc.8,
  › tao [RUST]: 0.8.4,
  › wry [RUST]: 0.16.2,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: ../dist

App directory structure
  ├─ dist
  ├─ node_modules
  ├─ src-tauri
  └─ .git
✨  Done in 6.68s.

Stack trace

No response

Additional context

Note:

  • The binary still works normally when called from the terminal
  • The sidecar works in the prod build yarn tauri build
  • The sidecar only fails in dev yarn tauri dev

If I reboot my computer the binary will work again without changing the binary at all. It makes me wonder if it's somehow related to signing the binary? Thanks for any help.

@lucasfernog
Copy link
Member

Thanks for the detailed issue, makes my job a fun one! The problem only happens on macOS, don't ask me why but I think it's some kind of cache preventing the new sidecar from running. I noticed playing in the terminal that deleting the file and copying again works, so let's do this :) really really thank you for catching this!

@saml-dev
Copy link
Author

Happy to help, thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants