[bug] proc macro panicked
Closed this issue · 5 comments
Describe the bug
error: proc macro panicked
--> src/lib.rs:19:14
|
19 | .run(tauri::generate_context!())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: failed to resolve ACL: SetPermissionNotFound { permission: "set-tray-icon-state", set: "default" }
error: could not compile tauriv2
(lib) due to 1 previous error
After configuring "permissions": [
"positioner:default"
] and running pnpm tarui dev, this error message will appear, but if it is not configured, the following method cannot be used
import { moveWindow, Position } from '@tauri-apps/plugin-positioner';
moveWindow(Position.TopRight);
Reproduction
No response
Expected behavior
Ability to use tauri-plugin-positioner plugin
Full tauri info
output
[✔] Environment
- OS: Mac OS 15.0.0 x86_64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-x86_64-apple-darwin (default)
- node: 18.20.4
- pnpm: 9.11.0
- yarn: 1.22.22
- npm: 10.7.0
[-] Packages
- tauri 🦀: 2.0.2
- tauri-build 🦀: 2.0.1
- wry 🦀: 0.44.1
- tao 🦀: 0.30.2
- tauri-cli 🦀: 1.6.2
- @tauri-apps/api : 2.0.0-rc.5 (outdated, latest: 2.0.2)
- @tauri-apps/cli : 2.0.0-rc.16 (outdated, latest: 2.0.2)
[-] Plugins
- tauri-plugin-shell 🦀: 2.0.0-rc.3
- @tauri-apps/plugin-shell : 2.0.0-rc.1 (outdated, latest: 2.0.0)
- tauri-plugin-positioner 🦀: 2.0.1
- @tauri-apps/plugin-positioner : 2.0.0
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: React
- bundler: Vite
Stack trace
No response
Additional context
No response
Did you add the tray-icon feature flag to the plugin as shown in the setup guide here? https://v2.tauri.app/plugin/positioner/ - or actually this sounds more like you didn't add the rust part of the plugin at all since the permissions should be detected regardless of the feature flag 🤔
Also, you have a few tauri packages still in their rc
versions according to the tauri info
output, that may be worth to look at too.
If my message doesn't help, could you please create a minimal reproduction for us to try?
Ah i think i misremembered how it worked. I'll close this in favor of tauri-apps/plugins-workspace#1891
Thanks for your help, the problem has been solved
Thanks for your help, the problem has been solved
I'm currently facing the same issue.
I added the permissions as per the documentation but still won't work.
Can you please explain how to solve this issue?
Thanks
Thanks for your help, the problem has been solved
I'm currently facing the same issue. I added the permissions as per the documentation but still won't work. Can you please explain how to solve this issue?
Thanks
Change positioner:default
in your capabilities json to:
"positioner:allow-move-window",
"positioner:allow-set-tray-icon-state"
That worked for us!