plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

[http] Failing to Install http to Tauri

Open aryamurray opened this issue 2 years ago • 1 comments

Hello all, I'm fairly new to the Tauri Ecosystem (and rust in general) so maybe this is just a skill issue on my end. I'm trying to install the http plugin for tauri and have tried to install via git and through cargo directly. Seems to be a package issue so if there's a simple fix I'd be eternally grateful.

Versions

[dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "1.6.3", features = ["api-all"] }

Error when adding via Git in Cargo.toml

tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }

error: failed to select a version for `http`.
    ... required by package `tauri v2.0.0-beta.17`
    ... which satisfies dependency `tauri = "^2.0.0-beta.17"` of package `tauri-plugin-http v2.0.0-beta.7 (https://github.com/tauri-apps/plugins-workspace?branch=v2#22410881)`
    ... which satisfies git dependency `tauri-plugin-http` of package `app v0.1.0 (C:\Users\Arya\Documents\Code\soundcloud-desktop\src-tauri)`
versions that meet the requirements `^1.1` are: 1.1.0

all possible versions conflict with previously selected packages.

  previously selected package `http v1.0.0`
    ... which satisfies dependency `http = "^1"` of package `tauri-plugin-http v2.0.0-beta.7 (https://github.com/tauri-apps/plugins-workspace?branch=v2#22410881)`
    ... which satisfies git dependency `tauri-plugin-http` of package `app v0.1.0 (C:\Users\Arya\Documents\Code\soundcloud-desktop\src-tauri)`

failed to select a version for `http` which could resolve this conflict

Similarily with the crate directly

tauri-plugin-http = "2.0.0-beta"

error: failed to select a version for `webkit2gtk-sys`.     
    ... required by package `webkit2gtk v2.0.1`
    ... which satisfies dependency `webkit2gtk = "=2.0.1"` of package `tauri v2.0.0-beta.1`
    ... which satisfies dependency `tauri = "^2.0.0-beta.1"` of package `tauri-plugin-http v2.0.0-beta.0`
    ... which satisfies dependency `tauri-plugin-http = "^2.0.0-beta"` of package `app v0.1.0 (C:\Users\Arya\Documents\Code\soundcloud-desktop\src-tauri)`
versions that meet the requirements `^2.0.1` are: 2.0.1

the package `webkit2gtk-sys` links to the native library `web_kit2`, but it conflicts with a previous package which links to `web_kit2` as well:
package `webkit2gtk-sys v0.18.0`
    ... which satisfies dependency `ffi = "^0.18"` of package `webkit2gtk v0.18.2`
    ... which satisfies dependency `webkit2gtk = "^0.18.2"` of package `tauri v1.6.3`
    ... which satisfies dependency `tauri = "^1.6.3"` of package `app v0.1.0 (C:\Users\Arya\Documents\Code\soundcloud-desktop\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 = "web_kit2"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `webkit2gtk-sys` which could resolve this conflict

aryamurray avatar May 15 '24 03:05 aryamurray

The http plugin (and most other plugins) only work with tauri v2. For a list of plugins for v1, check out the v1 branch of this repo.

In v1 the http plugin is part of tauri directly (the http module).

FabianLars avatar May 15 '24 08:05 FabianLars