Comments (5)
Looking at the error, it is related to permissions and specifically shell:allow-open
which is included by default in the create-tauri-app template. It may not be able to find the permissions either because you removed tauri-plugin-shell
from Cargo.toml
or maybe you need to add patch for tauri-plugin
crate as well so try adding the following in Cargo.toml
then run cargo update
inside src-tauri:
[patch.crates-io]
tauri-plugin = { path = "path/to/local/tauri/core/tauri-plugin" }
from tauri.
Thanks, @amrbashir! I did remove tauri-plugin-shell
, because I had version mismatches. I tried re-adding it as well as the taur-plugin redirect, but that doesn't seem to be enough. Here are my dependencies:
[build-dependencies]
# tauri-build = {version = "2.0.0-beta", features = []}
tauri-build = {path = "/Users/stijn/Development/tauri/core/tauri-build", features = []}
[dependencies]
serde = {version = "1", features = ["derive"]}
serde_json = "1"
# tauri = { version = "2.0.0-beta", features = [] }
tauri = {path = "/Users/stijn/Development/tauri/core/tauri", features = []}
tauri-plugin-shell = "2.0.0-beta"
[patch.crates-io]
tauri-plugin = {path = "/Users/stijn/Development/tauri/core/tauri-plugin"}
Running cargo update
I still get a mismatch on versions. Do I need to reroute tauri-plugin-shell
to my local copy as well? Because I can't find that package in the repo.
stijn@Leviathan ~/D/t/src-tauri [101]> cargo update
Blocking waiting for file lock on package cache
Updating crates.io index
error: failed to select a version for `tauri`.
... required by package `tauri-plugin-shell v2.0.0-beta.0`
... which satisfies dependency `tauri-plugin-shell = "^2.0.0-beta"` of package `tauri-test v0.0.0 (/Users/stijn/Desktop/tauri-test/src-tauri)`
versions that meet the requirements `^2.0.0-beta.1` are: 2.0.0-beta.22, 2.0.0-beta.21, 2.0.0-beta.20, 2.0.0-beta.19, 2.0.0-beta.18, 2.0.0-beta.17, 2.0.0-beta.16, 2.0.0-beta.15, 2.0.0-beta.14, 2.0.0-beta.13, 2.0.0-beta.12, 2.0.0-beta.11, 2.0.0-beta.10, 2.0.0-beta.9, 2.0.0-beta.8, 2.0.0-beta.7, 2.0.0-beta.6, 2.0.0-beta.5, 2.0.0-beta.4, 2.0.0-beta.3, 2.0.0-beta.2, 2.0.0-beta.1
the package `tauri` links to the native library `Tauri`, but it conflicts with a previous package which links to `Tauri` as well:
package `tauri v2.0.0-beta.22 (/Users/stijn/Development/tauri/core/tauri)`
... which satisfies path dependency `tauri` of package `tauri-test v0.0.0 (/Users/stijn/Desktop/tauri-test/src-tauri)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "Tauri"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
failed to select a version for `tauri` which could resolve this conflict
from tauri.
tauri-plugin-shell
also depends on tauri-plugin
, but you have it points to another place in the Cargo.toml
You'll need to clone https://github.com/tauri-apps/plugins-workspace and modify the Cargo.toml
:
[workspace.dependencies]
tauri-plugin = { path = "/Users/stijn/Development/tauri/core/tauri-plugin" }
and also in your projcet's Cargo.toml
[dependencies]
tauri-plugin-shell = { path = "[path to plugin-workspace]/plugins-workspace/plugins/shell" }
from tauri.
you can just remove tauri-plugin-shell
, I was just demonstrating a fix for version mismatch if you want to use tauri-plugin-shell
.
Anyways, the problem in your original post is that your capability file has shell:allow-open
permission and since you removed tauri-plugin-shell
, you will need to remove that permission as well
from tauri.
Yes! I got it working and the app runs on my phone now with a locally sourced Tauri. :)
Thank you both for your patience. π Hope to continue the work on my PR now.
from tauri.
Related Issues (20)
- [bug] `plugin` command failing for mobile plugins HOT 3
- [bug] `--target` option in `tauri ios build` doesn't accept target triples
- [bug]
- println don't show in the terminal and how to turn off the ios info(too much) . HOT 2
- [bug] Android apk crash at startup caused by `WryActivity` can't find `create()` HOT 3
- [bug] nsis deep link doesn't work HOT 2
- [feat] Load server images and cache them locally permanently
- [bug] windows updater broken on beta22
- [bug] Unnecessary menu items and menu name..? HOT 2
- [bug] Really high memory usage while resizing a window in Linux (V1 and V2)
- [bug] build ios on macos m2 failed
- [bug][v2][windows] resize pointer doesn't show when `set_decorations(false)` HOT 1
- Strange build errors, but only if src-tauri/target/release folder already exists HOT 3
- [bug] Resource files are bundled twice in the final application, creating bloat HOT 2
- [bug] v2: Windows' Task View kills Tauri
- [bug] Image is not lazy loaded when having lazy in img loading attribute
- [bug] Custom menu items donβt work after updating app menu
- Electron provides a `new-window` event in the main thread, but TAURI does not.
- [bug] Cancelling drag & drop with the escape key does not fire cancellation
- [bug] Failed to pass an enum as argument in command HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tauri.