-
DescriptionNow I'm fully frustrated about importing plugins in stable tauri version. I have another project on it, currently switching from tauri-v2.0.0-beta.19 to tauri-v2.0.4. Now I faced with problem of giving correct permissions for frontend.
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "main-capability",
"description": "Capability for the main window",
"windows": [
"main"
],
"permissions": [
"core:default",
"window:default",
"path:default",
"event:default",
"event:allow-listen",
"app:default",
"resources:default",
"menu:default",
"tray:default",
"fs:default",
"fs:write-all",
"fs:read-all",
"shell:allow-open",
"dialog:allow-save",
"dialog:allow-open"
],
"capabilities": []
} tauri.conf.json: {
"productName": "DesktopA",
"identifier": "app-pc",
"build": {
"beforeDevCommand": "npm run dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "npm run build",
"frontendDist": "../dist"
},
"app": {
"windows": [
{
"fullscreen": false,
"height": 720,
"minHeight": 600,
"minWidth": 845,
"resizable": true,
"title": "Desktop app",
"width": 845
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"category": "Utility",
"copyright": "Amazooon llc LLC, all rights reserved",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"publisher": "Amazooon llc",
"shortDescription": "app for pc",
"targets": [
"deb",
"msi"
],
"linux": {
"deb": {
"files": {
"file": "example_file.so"
}
}
},
"windows": {
"wix": {
"language": ["en-US","uk-UA"]
}
}
},
"plugins": {
"fs": {
"requireLiteralLeadingDot": false
}
}
} Needless to note, in the main.rs file before running, as usual I add plugins for usage: .plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_fs::init()) Tauri info
ReproduceActually, I can't reproduce that..., and all posts mentioned before with
Maybe you can give me any advice on how to fix that? In advance, thanks for help!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you try it in a fresh create-tauri-app and compare? If it has the same problems, please upload it to a repo for us to check out. Also, permissions for the non-plugin api should be prefixed with |
Beta Was this translation helpful? Give feedback.
Sorry, but I can't reproduce that bug( All projects in which I wanted to show the bug, just work!
Needless to say, I managed somehow to correctly build it by copying all my files into the new project, created with
cargo create-tauri-app
. I don't know how, but it works like a magic wand :) I changed only one file with capabilities, as permissions were changed.Yes, I understand that nothing can happen without some interference, so I believe that beta and stable versions differ somehow which makes the transition difficult.
The main recipe:
cargo create-tauri-app
and move your files into another one.