Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] i can't start demo #8956

Closed
leosun620 opened this issue Feb 23, 2024 · 11 comments
Closed

[bug] i can't start demo #8956

leosun620 opened this issue Feb 23, 2024 · 11 comments
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@leosun620
Copy link

Describe the bug

I follow the instructions as mentioned. And I start tauri by the most simple way-> pnpm create tauri-app. eveything is ok now.
but when i type "pnpm tauri dev". it always show fails.

Reproduction

pnpm tauri dev

Expected behavior

No response

Full tauri info output

> [email protected] tauri D:\clash\tauri-app
> tauri "info"


[✔] Environment
    - OS: Windows 10.0.18363 X64
    ✔ WebView2: 121.0.2277.128
    ✔ MSVC: Visual Studio ���ɹ��� 2022
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.19.1
    - pnpm: 8.15.3
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 1.6.0
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.7
    - @tauri-apps/api [NPM]: 1.5.3
    - @tauri-apps/cli [NPM]: 1.5.10

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: Vue.js
    - bundler: Vite

Stack trace

PS D:\clash\tauri-app> pnpm tauri dev

> [email protected] tauri D:\clash\tauri-app
> tauri "dev"

     Running BeforeDevCommand (`pnpm dev`)

> [email protected] dev D:\clash\tauri-app
> vite


  VITE v5.1.4  ready in 396 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: use --host to expose
        Info Watching D:\clash\tauri-app\src-tauri for changes...
   Compiling webview2-com v0.19.1
   Compiling tauri-app v0.0.0 (D:\clash\tauri-app\src-tauri)
error: failed to run custom build command for `tauri-app v0.0.0 (D:\clash\tauri-app\src-tauri)`

Caused by:
  process didn't exit successfully: `D:\clash\tauri-app\src-tauri\target\debug\build\tauri-app-ef151fbbc6da4f7a\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=TAURI_CONFIG
  cargo:rerun-if-changed=tauri.conf.json
  cargo:rustc-cfg=desktop
  cargo:rustc-cfg=dev
  package.metadata does not exist

  --- stderr
  thread 'main' panicked at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\embed-resource-2.4.1\src\windows_msvc.rs:37:14:
  Are you sure you have RC.EXE in your $PATH?: Os { code: 1392, kind: Uncategorized, message: "文件或目录损坏且无法读取。" }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
 ELIFECYCLE  Command failed with exit code 4294967295.
 ELIFECYCLE  Command failed with exit code 101.

Additional context

No response

@leosun620 leosun620 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Feb 23, 2024
@leosun620
Copy link
Author

output in details:

error: failed to run custom build command for `tauri-app v0.0.0 (D:\clash\tauri-app\src-tauri)`

Caused by:
  process didn't exit successfully: `D:\clash\tauri-app\src-tauri\target\debug\build\tauri-app-07c9c018c8984b5d\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=TAURI_CONFIG
  cargo:rerun-if-changed=tauri.conf.json
  cargo:rustc-cfg=desktop
  cargo:rustc-cfg=dev
  package.metadata does not exist

  --- stderr
  thread 'main' panicked at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\embed-resource-2.4.1\src\windows_msvc.rs:37:14:
  Are you sure you have RC.EXE in your $PATH?: Os { code: 1392, kind: Uncategorized, message: "文件或目录损坏且无法读取。" }
  stack backtrace:
     0:     0x7ff71d77dfc2 - std::sys_common::backtrace::_print::impl$0::fmt
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common\backtrace.rs:44
     1:     0x7ff71d79fced - core::fmt::rt::Argument::fmt
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\fmt\rt.rs:142
     2:     0x7ff71d79fced - core::fmt::write
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\fmt\mod.rs:1120
     3:     0x7ff71d779c21 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\io\mod.rs:1810
     4:     0x7ff71d77ddea - std::sys_common::backtrace::_print
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common\backtrace.rs:47
     5:     0x7ff71d77ddea - std::sys_common::backtrace::print
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common\backtrace.rs:34
     6:     0x7ff71d780299 - std::panicking::default_hook::closure$1
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:272
     7:     0x7ff71d77ff55 - std::panicking::default_hook
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:292
     8:     0x7ff71d7807c4 - std::panicking::rust_panic_with_hook
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:779
     9:     0x7ff71d780699 - std::panicking::begin_panic_handler::closure$0
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:657
    10:     0x7ff71d77e8c9 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common\backtrace.rs:171
    11:     0x7ff71d780362 - std::panicking::begin_panic_handler
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:645
    12:     0x7ff71d7aa727 - core::panicking::panic_fmt
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\panicking.rs:72
    13:     0x7ff71d7aacc3 - core::result::unwrap_failed
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\result.rs:1649
    14:     0x7ff71d3e8771 - enum2$<core::result::Result<std::process::ExitStatus,std::io::error::Error> >::expect<std::process::ExitStatus,std::io::error::Error>
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\result.rs:1030
    15:     0x7ff71d3ece88 - embed_resource::windows_msvc::ResourceCompiler::compile_resource<ref$<ref$<std::ffi::os_str::OsStr> >,ref$<slice2$<ref$<std::ffi::os_str::OsStr> > > >
                                 at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\embed-resource-2.4.1\src\windows_msvc.rs:31
    16:     0x7ff71d3e68e1 - embed_resource::compile_impl<ref$<ref$<std::ffi::os_str::OsStr> >,ref$<slice2$<ref$<std::ffi::os_str::OsStr> > > >
                                 at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\embed-resource-2.4.1\src\lib.rs:268
    17:     0x7ff71d3e6a97 - embed_resource::compile<std::path::PathBuf,ref$<ref$<std::ffi::os_str::OsStr> >,ref$<slice2$<ref$<std::ffi::os_str::OsStr> > > >
                                 at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\embed-resource-2.4.1\src\lib.rs:184
    18:     0x7ff71d3ec7e2 - tauri_winres::WindowsResource::compile
                                 at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tauri-winres-0.1.1\src\lib.rs:534
    19:     0x7ff71d1cda86 - tauri_build::try_build
                                 at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tauri-build-1.5.1\src\lib.rs:549
    20:     0x7ff71d1cb6fd - tauri_build::build
                                 at C:\Users\Administrator\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\tauri-build-1.5.1\src\lib.rs:376
    21:     0x7ff71d1b1139 - build_script_build::main
                                 at D:\clash\tauri-app\src-tauri\build.rs:2
    22:     0x7ff71d1b102b - core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\ops\function.rs:250
    23:     0x7ff71d1b116e - core::hint::black_box
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\hint.rs:286
    24:     0x7ff71d1b116e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\sys_common\backtrace.rs:155
    25:     0x7ff71d1b1111 - std::rt::lang_start::closure$0<tuple$<> >
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\rt.rs:166
    26:     0x7ff71d773ff2 - std::rt::lang_start_internal::closure$2
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\rt.rs:148
    27:     0x7ff71d773ff2 - std::panicking::try::do_call
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:552
    28:     0x7ff71d773ff2 - std::panicking::try
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:516
    29:     0x7ff71d773ff2 - std::panic::catch_unwind
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panic.rs:142
    30:     0x7ff71d773ff2 - std::rt::lang_start_internal
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\rt.rs:148
    31:     0x7ff71d1b10ea - std::rt::lang_start<tuple$<> >
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\rt.rs:165
    32:     0x7ff71d1b1159 - main
    33:     0x7ff71d7a8d80 - invoke_main
                                 at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    34:     0x7ff71d7a8d80 - __scrt_common_main_seh
                                 at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    35:     0x7fffbb607bd4 - BaseThreadInitThunk
    36:     0x7fffbc5eced1 - RtlUserThreadStart
warning: build failed, waiting for other jobs to finish...
 ELIFECYCLE  Command failed with exit code 4294967295.
 ELIFECYCLE  Command failed with exit code 101.

@FabianLars
Copy link
Member

Can you double check that you have a windows 10 or 11 SDK installed in visual studio installer? It will be under "Optional Components".
Also, did you restart your system after you installed the visual studio things? Sometimes that helps with path issues.

@leosun620
Copy link
Author

i have installed windows10 and windows 11 sdk. and try to reinstall them several times. as soon as finishing of installing, i restart my pc as instructions. but it is still not work for me.

@leosun620
Copy link
Author

this problem bother me recently, my mac can lauch up successfully but windows cant. thank you every much for spending your time to answer.
@FabianLars

@FabianLars
Copy link
Member

Hmm, can you open Developer PowerShell for Visual Studio 2022 (type this into the windows search) and check what rc.exe /? outputs?

@leosun620
Copy link
Author

@FabianLars
i have set the rc.exe to path environments.
PixPin_2024-02-26_08-20-21
you can see the pic above.

@leosun620
Copy link
Author

PixPin_2024-02-26_08-26-32

@leosun620
Copy link
Author

image

@FabianLars
Copy link
Member

hmmm, maybe this is an instance of nabijaczleweli/rust-embed-resource#20 ? I've never seen this issue before so i don't know how to proceed here to be honest🤔

@leosun620
Copy link
Author

i haved solved this problem by reinstall the windows SDK

@changyongyong
Copy link

i haved solved this problem by reinstall the windows SDK

which version are you using?
It is fails after i am reinstall the sdk with latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants