-
-
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] HashMap
always empty when passed to #[tauri::command]
#6078
Comments
The problem is that |
I am currently solving it by manually stingify-ing the |
alright, I think I found an acceptable solution using |
It doesn't seem this fix has been included in Tauri yet. Is it expected to be included in a future release? |
this was part of tauri 1.3 - which version are you using? And is the MRE above after updating the versions to let's say 1.5 still accurate? |
Sorry, the issue was actually coming from an |
Describe the bug
When passing a
HashMap
to a#[tauri::command]
the contents is always empty. This seems to be the case regardless of the types associated with theHashMap
. I have verified that theHashMap
is correctlySerialized
. I am using Yew as a front end.Reproduction
MRE is located at https://github.com/bicarlsen/tauri-command-hashmap-mre.
Expected behavior
HashMap
should arrive as was sent.Platform and versions
Environment
› OS: Pop!_OS 22.04 X64
› Node.js: 19.4.0
› npm: 9.2.0
› pnpm: Not installed!
› yarn: Not installed!
› rustup: 1.25.1
› rustc: 1.66.0
› cargo: 1.66.0
› Rust toolchain: stable-x86_64-unknown-linux-gnu
Packages
WARNING: no lock files found, defaulting to npm
› @tauri-apps/cli [NPM]: 1.2.2
› @tauri-apps/api [NPM]: Not installed!
› tauri [RUST]: 1.2.3,
› 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/
package.json not found
App directory structure
├─ .vscode
├─ src-tauri
├─ .git
├─ target
├─ dist
├─ public
└─ src
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: