new v0.6.1 app: failed to select a version for the requirement `dioxus-liveview = "^0.6.1"
Problem
A new created dioxus v0.6.1 fullstack app can not find the needed version for dioxus-liveview.
Steps To Reproduce
โฏ dx --version
dioxus 0.6.1 (was built without git repository)
โฏ dx new engine-test4
โ ๐คท Which sub-template should be expanded? ยท Bare-Bones
โ ๐คท Do you want to use Dioxus Fullstack? ยท true
โ ๐คท Do you want to use Dioxus Router? ยท false
โ ๐คท Do you want to use Tailwind CSS? ยท false
โ ๐คท Which platform do you want DX to serve by default? ยท Web
11.262s INFO Generated project at /home/lukas/git/engine-test4
`cd` to your project and run `dx serve` to start developing.
If using Tailwind, make sure to run the Tailwind CLI.
More information is available in the generated `README.md`.
Build cool things! โ๏ธ
โฏ cd engine-test4/
โฏ dx serve --platform web
14:23:23 [dev] -----------------------------------------------------------------
Serving your Dioxus app: engine-test4 ๐
โข Press `ctrl+c` to exit the server
โข Press `r` to rebuild the app
โข Press `o` to open the app
โข Press `v` to toggle verbose logging
โข Press `/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------
14:23:23 [dev] Installing [email protected]...
14:23:24 [dev] [email protected] was successfully installed from GitHub.
14:23:25 [cargo] error: failed to select a version for the requirement `dioxus-liveview = "^0.6.1"`
14:23:25 [cargo] candidate versions found which didn't match: 0.6.0, 0.6.0-rc.0, 0.6.0-alpha.5, ...
14:23:25 [cargo] location searched: crates.io index
14:23:25 [cargo] required by package `dioxus v0.6.1`
14:23:25 [cargo] ... which satisfies dependency `dioxus = "^0.6.0"` (locked to 0.6.1) of package `engine-test4 v0.1.0 (/home/lukas/git/engine-test4)`
14:23:25 [cargo] if you are looking for the prerelease package it needs to be specified explicitly
14:23:25 [cargo] dioxus-liveview = { version = "0.6.0-rc.0" }
14:23:25 [dev] Cargo build failed - no output location. Toggle tracing mode (press `t`) for more information.
14:23:25 [dev] Build failed: Other(Build did not return an executable)
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ /:more โฎ
โ App: โโโโโโโโโโโโโโโโโโโโโโโโโโ โ Platform: Web + fullstack โ
โ Server: โโโโโโโโโโโโโโโโโโโโโโโโโโ โ App features: ["web"] โ
โ Status: Failed Serving at: http://127.0.0.1:8080 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ dx serve --platform web --verbose
14:26:40 [dev] Loading crate
14:26:40 [dev] Found package NodeIndex(46)
14:26:40 [dev] Could not find explicit feature for platform server, passing `fallback` instead
14:26:40 [dev] Verifying tooling...
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/Cargo.toml"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/Dioxus.toml"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/README.md"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/assets"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/src"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4"
14:26:40 [dev] -----------------------------------------------------------------
Serving your Dioxus app: engine-test4 ๐
โข Press `ctrl+c` to exit the server
โข Press `r` to rebuild the app
โข Press `o` to open the app
โข Press `v` to toggle verbose logging
โข Press `/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------
14:26:40 [dev] Running build command...
14:26:40 [dev] Building app...
14:26:40 [dev] Initialized Root dir: "/home/lukas/git/engine-test4/target/dx/engine-test4/debug/web/public"
14:26:40 [dev] Initialized Exe dir: "/home/lukas/git/engine-test4/target/dx/engine-test4/debug/web/public/wasm"
14:26:40 [dev] Initialized Asset dir: "/home/lukas/git/engine-test4/target/dx/engine-test4/debug/web/public/assets"
14:26:40 [dev] Executing cargo...
14:26:40 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "engine-test4"]
14:26:40 [dev] Building server...
14:26:40 [dev] Building app...
14:26:40 [dev] Executing cargo...
14:26:40 [dev] cargo args: ["--profile", "server-dev", "--verbose", "--features", "dioxus/server", "--bin", "engine-test4"]
14:26:41 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "engine-test4"]
14:26:41 [dev] cargo args: ["--profile", "server-dev", "--verbose", "--features", "dioxus/server", "--bin", "engine-test4"]
14:26:41 [cargo] error: failed to select a version for the requirement `dioxus-liveview = "^0.6.1"`
14:26:41 [cargo] candidate versions found which didn't match: 0.6.0, 0.6.0-rc.0, 0.6.0-alpha.5, ...
14:26:41 [cargo] location searched: crates.io index
14:26:41 [cargo] required by package `dioxus v0.6.1`
14:26:41 [cargo] ... which satisfies dependency `dioxus = "^0.6.0"` (locked to 0.6.1) of package `engine-test4 v0.1.0 (/home/lukas/git/engine-test4)`
14:26:41 [cargo] if you are looking for the prerelease package it needs to be specified explicitly
14:26:41 [cargo] dioxus-liveview = { version = "0.6.0-rc.0" }
14:26:41 [dev] Cargo build failed - no output location. Toggle tracing mode (press `t`) for more information.
14:26:41 [dev] Setting builder to failed state
14:26:41 [dev] Build failed: Other(Build did not return an executable)
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ /:more โฎ
โ App: โโโโโโโโโโโโโโโโโโโโโโโโโโ โ Platform: Web + fullstack โ
โ Server: โโโโโโโโโโโโโโโโโโโโโโโโโโ โ App features: ["web"] โ
โ Status: Failed Serving at: http://127.0.0.1:8080 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Expected behavior
Screenshots
Environment:
- Dioxus version: v0.6.1
- Rust version: rustc 1.83.0 (90b35a623 2024-11-26)
- OS info: arch linux
- App platform: fullstack
Questionnaire
The 0.6.1 version of dioxus liveview has been published, so this might be a caching issue. Running cargo update fixes the error for me. After running cargo update in a different project, I don't see the error when creating a new project with dioxus 0.6.1
I have the same problem, both on Fedora 41 and macOS 15.2. Unfortunately, running cargo update did not fix the issue for me. I can still reproduce the issue following the steps described above by @LuckyTurtleDev .
Same here on MacOS. Happens to me also when I install 0.6.0.
What solved this for me was erasing the cargo registry, in my case it's at ~/.cargo/registry, so just erased (well started with renaming) the folder.
Credits go to @DogeDark who replied on Discord.
Hmmm, https://crates.io/crates/dioxus-liveview is live....
This is most likely related to caching being "sticky" - especially since the Liveview codebase didn't change between 0.6.0 and 0.6.1.
I believe cargo gets confused on some platforms with mtime and maybe special git setups.
If the codebase didn't change cargo might not be actually registering it as a new version.
If the codebase didn't change cargo might not be actually registering it as a new version.
I don't fully understand this issue but maybe you want to change it then even if nothing changes, just to avoid such issues.
cargo update did not work for me either (Fedora 41), but adding the dependency to my project via Cargo.toml did work. Of course that is not very practical. So this might be a real caching bug in cargo?
Anyway, removing the whole registry directory ~/.cargo/registry as suggested did work. I hope we don't have to do this on every dioxus release now ๐
I also had the same issue and worked only after I removed the directory /.cargo/registry.
is this a issue that is caused by cargo or by cargo metadata? I would expect that if cargo did not find the right version local, it would update its crates.io index.
looks like a caching or config issue, and not related to dioxus-liveview.
I did not want to delete .cargo/registry so I chose to directly import dioxus-liveview = "0.6.1". Then I had to also import dioxus-isrg = "0.6.1" and dioxus-ssr = "0.6.1" and it finally compiled.
After that I could delete the extra imports and import only dioxus and it works fine.
Seeing as this is likely a issue with cargo, I'm going to close this. In the future, we won't release updates to crates that didn't change between versions since that might be triggering the caching bug.
This is indeed a bug in cargo.
https://github.com/rust-lang/cargo/blob/51346addcc23a4a965b5c016251eb52b789e866c/src/cargo/core/compiler/fingerprint/mod.rs#L332
Unfortunately the tool we use to publish with (cargo workspaces) has a bug where it doesn't updated workspace dependencies making upgrades to workspaces quite tedious. I need to go fix that.