-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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] Always get Uncaught (in promise) invalid utf-8 sequence of 1 bytes from index 2
with sidecar
#5912
Comments
Please provide the sidecar binary so I can test this without having to setup c# dev env. |
The sidecar binary is in src-tauri/console, run it with option |
Works fine here, the app fails to launch (different issue) but no errors. Seems like this is the same issue as #5309 which I can't reproduce. Can you try providing a utf-8 encoding like this: const command = Command.sidecar("console/MyConsoleApp", ["-l"], { encoding: 'utf-8' }) |
Thanks for your help.
I've updated my console app. With any execution, it will have a log message saved in file. According to the error message in stderr, i'm doubting that the console app is not able to find it's corresponding dll. The console app itself is good to run directly in the |
Describe the bug
I'm trying to use the sidecar feature, so i write a console app with c# to test.
The app works well when give it correct options and will return error message if options are wrong.
But when i try using the sidecar feature to call it, the result will always be
Uncaught (in promise) invalid utf-8 sequence of 1 bytes from index 2
, even if specific the output format to UTF8.Try put them all under the src-tauri folder won't fix it.
I'm not sure whats wrong, any idea?
Reproduction
MyConsoleApp
folder is a visual studio console app project and build it will get the MyConsoleApp.exe which is the test program for Tauri sidecar.Greet
button, you will see theUncaught (in promise) invalid utf-8 sequence of 1 bytes from index 2
Expected behavior
No response
Platform and versions
Environment
› OS: Windows 10.0.22000 X64
› Webview2: 108.0.1462.54
› MSVC:
- Visual Studio Community 2022
› Node.js: 16.15.1
› npm: 8.15.0
› pnpm: 7.13.4
› yarn: 1.22.19
› rustup: 1.24.3
› rustc: 1.62.0
› cargo: 1.62.0
› Rust toolchain: stable-x86_64-pc-windows-msvc
Packages
› @tauri-apps/cli [NPM]: 1.2.2
› @tauri-apps/api [NPM]: 1.2.0
› tauri [RUST]: 1.2.2,
› tauri-build [RUST]: 1.2.1,
› tao [RUST]: 0.15.8,
› wry [RUST]: 0.23.4,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: React
› bundler: Vite
App directory structure
├─ .git
├─ .vscode
├─ MyConsoleApp
├─ node_modules
├─ public
├─ src
└─ src-tauri
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: