Open alex-tianhuang opened 1 month ago
Same problem here.
Environment:
Same problem here.
Environment:
dx serve --platform fullstack
👑 Build done.
| 💼 Waiting to start building the project... thread 'main' panicked at /home/siki/.cargo/registry/src/index.crates.io-6f17d22bba15001f/manganis-cli-support-0.2.4/src/manifest.rs:51:51:
called `Result::unwrap()` on an `Err` value: Parse("parse error: invalid Cargo.lock format version: `4`\n")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Same boat here...
Dioxus 0.5.6 Rust 1.84.0-nightly OS: Win11
thread 'main' panicked at C:\Users\OMISTAJA.cargo\registry\src\index.crates.io-6f17d22bba15001f\manganis-cli-support-0.2.4\src\manifest.rs:51:51:
called Result::unwrap()
on an Err
value: Parse("parse error: invalid Cargo.lock format version: 4
\n")
stack backtrace:
0: 0x7ff6e62a0cb1 - git_index_checksum
1: 0x7ff6e62ca77a - git_index_checksum
2: 0x7ff6e62998a7 - git_index_checksum
3: 0x7ff6e62a0af5 - git_index_checksum
4: 0x7ff6e62a2c57 - git_index_checksum
5: 0x7ff6e62a2a37 - git_index_checksum
6: 0x7ff6e62a32e3 - git_index_checksum
7: 0x7ff6e62a3169 - git_index_checksum
8: 0x7ff6e62a176f - git_index_checksum
9: 0x7ff6e62a2d6e - git_index_checksum
10: 0x7ff6e6528e71 - git_midx_writer_new
11: 0x7ff6e65292a0 - git_midx_writer_new
12: 0x7ff6e4dd2c46 - git_index_checksum
13: 0x7ff6e3f40e82 - git_filter_source_repo
14: 0x7ff6e3e9159a - git_filter_source_repo
15: 0x7ff6e3e1c4ff - git_filter_source_repo
16: 0x7ff6e3d5df6e - git_filter_source_repo
17: 0x7ff6e3ce261b - git_filter_source_repo
18: 0x7ff6e3dc06da - git_filter_source_repo
19: 0x7ff6e3cc36f2 - git_filter_source_repo
20: 0x7ff6e3c58a06 -
I'm having the same issue. I got the build to work by manually changing the Cargo.lock version to 3.
Running BeforeDevCommand (dx serve --port 1420
)
Warn Waiting for your frontend dev server to start on http://localhost:1420/...
👑 Build done.
thread 'main' panicked at C:\Users\mine.cargo\registry\src\index.crates.io-6f17d22bba15001f\manganis-cli-support-0.2.4\src\manifest.rs:51:51:
called Result::unwrap()
on an Err
value: Parse("parse error: invalid Cargo.lock format version: 4
\n")
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Error The "beforeDevCommand" terminated with a non-zero status code.
I did a little digging and this issue might be fixed in the 0.6 alpha CLI. If you can't use the 0.6 alpha version of Dioxus due to bugs or other reasons, you can see if what @luis-prates said works, and manually set the lock version to 3
.
cargo install dioxus-cli@0.6.0-alpha.4
and
dioxus = { version = "0.6.0-alpha.4", features = ["myplatformhere"] }
some
thread 'main' panicked at /Users/peguo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/manganis-cli-support-0.2.4/src/manifest.rs:51:51:
called Result::unwrap()
on an Err
value: Parse("parse error: invalid Cargo.lock format version: 4
\n")
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Today, I updated Rust to the new release ver. 0.83 and now I'm facing this issue for the first time on this sample:
❯ ./run_dev.sh
👑 Build done. thread 'main' panicked at /home/dxps/.cargo/registry/src/index.crates.io-6f17d22bba15001f/manganis-cli-support-0.2.4/src/manifest.rs:51:51:
called `Result::unwrap()` on an `Err` value: Parse("parse error: invalid Cargo.lock format version: `4`\n")
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: <manganis_common::manifest::AssetManifest as manganis_cli_support::manifest::AssetManifestExt>::load_from_path
4: dioxus_cli::assets::asset_manifest
5: dioxus_cli::builder::build_web
6: dioxus_cli::server::web::serve::{{closure}}
7: dioxus_cli::cli::serve::Serve::serve::{{closure}}
8: dx::main::{{closure}}
9: tokio::runtime::park::CachedParkThread::block_on
10: tokio::runtime::runtime::Runtime::block_on
11: dx::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
❯
Did the cleanup (removed Cargo.lock
, ran dx clean
and cargo clean
), same result.
Downgraded to Rust 0.82, did the cleanup again and all runs again (Cargo.lock
being generated with version 3).
Problem
When starting a new dioxus project using dioxus-cli compiled on nightly, the build fails as the Cargo.lock version (=4) is newer than expected. Additionally, using dioxus-cli compiled from stable with any project that has this new Cargo.lock version (I'm trying to use it for a project which requires nightly)
Steps To Reproduce
Expected behavior
Dioxus serves the webpage
Screenshots Here are all the steps needed to reproduce the bug:
Here is the final failing build command with some traceback:
Here is a Cargo.lock generated by dx new (nightly compiled dioxus-cli):
Environment: