dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

`dx bundle` panics for Desktop on Windows

Open willcrichton opened this issue 1 year ago • 3 comments

Problem

Running dx bundle on a Dioxus app targeting the desktop panics on Windows with this error:

$ dx bundle 
[...]
build desktop done
Adding assets from dist to bundle
thread 'main' panicked at C:\Users\will\.cargo\registry\src\index.crates.io-6f17d22bba15001f\dioxus-cli-0.5.7\src\cli\bundle.rs:173:18:
called `Result::unwrap()` on an `Err` value: StripPrefixError(())
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps To Reproduce

Be on Windows 11. Install dioxus-cli version 0.5.7. Then run:

dx new foobar --subtemplate Desktop -o styling=Vanilla -o router=false
cd foobar
dx bundle

Environment:

  • Dioxus version: 0.5.7
  • Rust version: stable (1.80.0)
  • OS info: Windows
  • App platform: desktop

willcrichton avatar Sep 06 '24 19:09 willcrichton

Hmm looks like this is the line panicking in the latest git https://github.com/DioxusLabs/dioxus/blob/7210d333cdcd6e1499926dc184b6a244db376baf/packages/cli/src/cli/bundle.rs#L173

matthunz avatar Sep 07 '24 16:09 matthunz

// Tauri bundle will add a __root__ prefix if the input path is absolute even though the output path is relative?

Maybe Tauri doesn't prefix on Windows? I'll check more

matthunz avatar Sep 07 '24 16:09 matthunz

I roll back to dioxus-cli 0.5.6, but it also panics.

dioxus-cli 0.5.4 works 😄

photino avatar Sep 09 '24 09:09 photino

Does this still occur on 0.6.2? I have gotten my bundling to work.

I'm wondering if this issue is maybe the asset naming/location or something with Windows' paths.

DogeDark avatar Feb 03 '25 20:02 DogeDark