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

Cannot run a new app on Windows #2871

Closed
SyntaxRules opened this issue Nov 10, 2021 · 29 comments · Fixed by #2893
Closed

Cannot run a new app on Windows #2871

SyntaxRules opened this issue Nov 10, 2021 · 29 comments · Fixed by #2893
Labels
platform: Windows scope: core Core packages of Tauri status: needs more info Issue needs more information, discussion or reproducible example type: bug

Comments

@SyntaxRules
Copy link
Contributor

SyntaxRules commented Nov 10, 2021

Describe the bug

A clear and concise description of what the bug is. This is probably the same thing happening in #2867

To Reproduce

Steps to reproduce the behavior: TLDR; follow the tauri website

  1. Run yarn create tauri-app
  2. cd tauri-app (or whatever you called it)
  3. Run yarn tauri info
  4. Run yarn tauri dev <- errors
  5. Try it again... fails again

Expected behavior

Tauri app compiles & runs

Platform and Versions (required):

tauri-app> yarn tauri info
yarn run v1.22.17
$ tauri info
 app:spawn Running "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe tauri info" +0ms


Operating System - Windows, version 10.0.19042 X64
Webview2 - 95.0.1020.44

Node.js environment
  Node.js - 16.13.0
  @tauri-apps/cli - 1.0.0-beta.10
  @tauri-apps/api - 1.0.0-beta.8

Global packages
  npm - 8.1.2
  yarn - 1.22.17

Rust environment
  rustc - 1.56.1
  cargo - 1.56.0

App directory structure
/.vscode
/node_modules
/public
/src
/src-tauri

App
  tauri.rs - 1.0.0-beta.8 (no lockfile)
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - ../public
  devPath - http://localhost:5000
  framework - Svelte
  bundler - Rollup

Done in 10.38s.

Additional context

Fresh install

Stack Trace

> yarn tauri dev
yarn run v1.22.17
$ tauri dev
 app:spawn Running "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe tauri dev" +0ms

[tauri:dev] Running `npm run dev`

> tauri-app@1.0.0 dev
> rollup -c -w

    Updating crates.io index
rollup v2.59.0
bundles src/main.ts → public\build\bundle.js...
LiveReload enabled
created public\build\bundle.js in 1.4s

[2021-11-10 12:04:44] waiting for changes...

> tauri-app@1.0.0 start
> sirv public --no-clear "--dev"


  Your application is ready~! 🚀

  ➡ Port 5000 is taken; using 61291 instead

  - Local:      http://localhost:61291
  - Network:    Add `--host` to expose

────────────────── LOGS ──────────────────

   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.32
   Compiling unicode-xid v0.2.2
  
   ...snip...

   Compiling tauri-utils v1.0.0-beta.3
   Compiling tauri-build v1.0.0-beta.4
   Compiling tauri-codegen v1.0.0-beta.4
   Compiling tauri-runtime v0.2.1
   Compiling tauri-runtime-wry v0.2.1
   Compiling app v0.1.0 (C:\...\tauri-app\src-tauri)
   Compiling tauri-macros v1.0.0-beta.5
error: failed to run custom build command for `app v0.1.0 (C:\...\tauri-app\src-tauri)`

Caused by:
  process didn't exit successfully: `C:\...\tauri-app\src-tauri\target\debug\build\app-2b5a73ef3a83e3f7\build-script-build` (exit code: 101)
  --- stdout
  package.metadata does not exist
  Selected RC path: 'bin\x64\rc.exe'

  --- stderr
  thread 'main' panicked at 'error found during tauri-build: failed to compile `icons/icon.ico` into a Windows Resource file during tauri-build', C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88:5
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
     1: std::panicking::begin_panic_fmt
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:460
     2: tauri_build::build
               at C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88
     3: build_script_build::main
               at .\src\build.rs:2
     4: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\core\src\ops\function.rs:227
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed

Try 2:

> yarn tauri dev
yarn run v1.22.17
$ tauri dev
 app:spawn Running "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe tauri dev" +0ms

[tauri:dev] Running `npm run dev`

> tauri-app@1.0.0 dev
> rollup -c -w

   Compiling app v0.1.0 (C:\...\tauri-app\src-tauri)
error: failed to run custom build command for `app v0.1.0 (C:\...\tauri-app\src-tauri)`

Caused by:
  process didn't exit successfully: `C:\...\tauri-app\src-tauri\target\debug\build\app-2b5a73ef3a83e3f7\build-script-build` (exit code: 101)
  --- stdout
  package.metadata does not exist
  Selected RC path: 'bin\x64\rc.exe'

  --- stderr
  thread 'main' panicked at 'error found during tauri-build: failed to compile `icons/icon.ico` into a Windows Resource file during tauri-build', C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88:5
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
     1: std::panicking::begin_panic_fmt
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:460
     2: tauri_build::build
               at C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88
     3: build_script_build::main
               at .\src\build.rs:2
     4: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\library\core\src\ops\function.rs:227
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
rollup v2.59.0
bundles src/main.ts → public\build\bundle.js...
LiveReload enabled
created public\build\bundle.js in 1.3s

[2021-11-10 12:18:23] waiting for changes...

> tauri-app@1.0.0 start
> sirv public --no-clear "--dev"


  Your application is ready~! 🚀

  ➡ Port 5000 is taken; using 54591 instead

  - Local:      http://localhost:54591
  - Network:    Add `--host` to expose

────────────────── LOGS ──────────────────
@nothingismagick
Copy link
Sponsor Member

This part is the interesting bit @amrbashir :

  thread 'main' panicked at 'error found during tauri-build: failed to compile `icons/icon.ico` into a 
Windows Resource file during tauri-build', 
C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88:5

Thanks for the stacktrace @SyntaxRules

@nothingismagick
Copy link
Sponsor Member

Can you verify that src-tauri/icons/icon.ico exists @SyntaxRules ?

@SyntaxRules
Copy link
Contributor Author

@nothingismagick Yup it is there!
image

@nothingismagick
Copy link
Sponsor Member

Just so we leave no stone unturned:

does yarn tauri build have the same segfault?

@SyntaxRules
Copy link
Contributor Author

Yup same error when running yarn tauri build

> yarn tauri build
yarn run v1.22.17
$ tauri build
 app:spawn Running "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe tauri build" +0ms

[tauri:build] Running `npm run build`

> tauri-app@1.0.0 build
> rollup -c


src/main.ts → public/build/bundle.js...
(!) Plugin typescript: @rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.
created public/build/bundle.js in 1.7s
   Compiling proc-macro2 v1.0.32
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.81
   Compiling cfg-if v1.0.0
   Compiling winapi v0.3.9
...snip...
   Compiling tauri-utils v1.0.0-beta.3
   Compiling tauri-build v1.0.0-beta.4
   Compiling tauri-codegen v1.0.0-beta.4
   Compiling tauri-runtime v0.2.1
   Compiling app v0.1.0 (C:\...\tauri-app\src-tauri)
   Compiling tauri-runtime-wry v0.2.1
   Compiling tauri-macros v1.0.0-beta.5
error: failed to run custom build command for `app v0.1.0 (C:\...\tauri-app\src-tauri)`

Caused by:
  process didn't exit successfully: `C:\...\tauri-app\src-tauri\target\release\build\app-91150f68a14c26e7\build-script-build` (exit code: 101)
  --- stdout
  package.metadata does not exist
  Selected RC path: 'bin\x64\rc.exe'

  --- stderr
  thread 'main' panicked at 'error found during tauri-build: failed to compile `icons/icon.ico` into a Windows Resource file during tauri-build', C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88:5
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
     1: std::panicking::begin_panic_fmt
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:460
     2: tauri_build::build
     3: <() as std::process::Termination>::report
     4: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: failed to build app

Caused by:
    Result of `cargo build` operation was unsuccessful: exit code: 101

 app:spawn Command "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe" failed with exit code: 1 +0ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@amrbashir
Copy link
Member

This is a weird error tbh, Can you try replacing src-tauri/icons/icon.ico with any other ico ?

@SyntaxRules
Copy link
Contributor Author

@amrbashir Here are a couple more data points for you.

First, renaming an icon and editing tauri.conf.json produces a different error.
What that looks like:
image

The stacktrace:

> yarn tauri build
yarn run v1.22.17
$ tauri build
 app:spawn Running "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe tauri build" +0ms

[tauri:build] Running `npm run build`

> tauri-app@1.0.0 build
> rollup -c


src/main.ts → public/build/bundle.js...
(!) Plugin typescript: @rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.
created public/build/bundle.js in 1.5s
   Compiling app v0.1.0 (C:\...\tauri-app\src-tauri)
error: failed to run custom build command for `app v0.1.0 (C:\...\tauri-app\src-tauri)`

Caused by:
  process didn't exit successfully: `C:\...\tauri-app\src-tauri\target\release\build\app-91150f68a14c26e7\build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at 'error found during tauri-build: `icons/icon.ico` not found; required for generating a Windows Resource file during tauri-build', C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88:5
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
     1: std::panicking::begin_panic_fmt
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:460
     2: tauri_build::build
     3: <() as std::process::Termination>::report
     4: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Error: failed to build app

Caused by:
    Result of `cargo build` operation was unsuccessful: exit code: 101

 app:spawn Command "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe" failed with exit code: 1 +0ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@SyntaxRules
Copy link
Contributor Author

Second, if I replace the icon with one of my own I get the same error as before. Note this icon has to be named icon.ico because of the comment above.

What that looks like:
image

The stack trace:

> yarn tauri build
yarn run v1.22.17
$ tauri build
 app:spawn Running "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe tauri build" +0ms

[tauri:build] Running `npm run build`

> tauri-app@1.0.0 build
> rollup -c


src/main.ts → public/build/bundle.js...
(!) Plugin typescript: @rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.
created public/build/bundle.js in 1.5s
   Compiling app v0.1.0 (C:\...\tauri-app\src-tauri)
error: failed to run custom build command for `app v0.1.0 (C:\...\tauri-app\src-tauri)`

Caused by:
  process didn't exit successfully: `C:\...\tauri-app\src-tauri\target\release\build\app-91150f68a14c26e7\build-script-build` (exit code: 101)
  --- stdout
  package.metadata does not exist
  Selected RC path: 'bin\x64\rc.exe'

  --- stderr
  thread 'main' panicked at 'error found during tauri-build: failed to compile `icons/icon.ico` into a Windows Resource file during tauri-build', C:\...\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-build-1.0.0-beta.4\src\lib.rs:88:5
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:517
     1: std::panicking::begin_panic_fmt
               at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35\/library\std\src\panicking.rs:460
     2: tauri_build::build
     3: <() as std::process::Termination>::report
     4: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Error: failed to build app

Caused by:
    Result of `cargo build` operation was unsuccessful: exit code: 101

 app:spawn Command "C:\...\tauri-app\node_modules\@tauri-apps\cli\bin\tauri-cli.exe" failed with exit code: 1 +0ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@amrbashir
Copy link
Member

Thanks for the info, we will try to investigate this.

@amrbashir amrbashir added platform: Windows status: needs more info Issue needs more information, discussion or reproducible example scope: core Core packages of Tauri labels Nov 11, 2021
@lucasfernog
Copy link
Member

Seems like you don't have the Windows SDK installed. Your output shows Selected RC path: 'bin\x64\rc.exe', mine is Selected RC path: 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe'.

@SyntaxRules
Copy link
Contributor Author

@lucasfernog Thank you for clarifying this in the docs, however this doesn't seem to be the cause of this issue. I have the windows 10 SDK installed (version 10.0.19041.0) and rc.exe is on my system in the same location (C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64). The bug still persists.

@SyntaxRules
Copy link
Contributor Author

I'm digging deeper, It looks like the issue pops up in the use of the winres crate. So this isn't necessarily a tauri issue. I can trigger a similar error with:

#[cfg(windows)]
use winres;

#[cfg(windows)]
fn main() {
    print!("Pulling in icon...");
    let mut res = winres::WindowsResource::new();
    res.set_icon("test.ico");
    res.compile().unwrap();
    println!("Success");
}

#[cfg(unix)]
fn main() {
}

Let me look further into the winres crate and see if I can figure out what is going on there.

@SyntaxRules
Copy link
Contributor Author

Root cause

The error is produced by an incorrect RC path (like @lucasfernog suggested). The winres crate returns a default path, bin\x64\rc.exe when it cannot determine a real location. In my case, a real location could not be determined because company IT security has restricted registry viewing. Said differently winres cannot read my registry key HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots so it defaults to bin/x64/rc.exe. This is not the correct path.

The Solution

If I edit how I'm calling winres to below, then things start working:

  let mut res = winres::WindowsResource::new();
  res.set_toolkit_path("C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64/");

I verified this by running a hard-coded version of tauri-build that had this path in it.

The two fixes i propose are:

  1. winres probably needs a warning if the path isn't found and it is using defaults
  2. tauri-build needs a new config parameter to allow me to pass in the right rc path.

I'll get to work on these PRs right away.

@lucasfernog
Copy link
Member

Nice job @SyntaxRules

@Cielquan
Copy link

Cielquan commented Nov 24, 2021

I have the exact same issue.

Is a new beta release planned soon?

EDIT: Just saw the "Feature Freeze" issue. my bad.

Cielquan added a commit to Cielquan/RUlaub that referenced this issue Nov 24, 2021
see tauri-apps/tauri#2871

the hard codes path to the win sdk can be overwritten via feature flags
- win_sdk_ver to overwrite version only
- win_sdk_path to overwrite whole path
win_sdk_ver takes precedence
Cielquan added a commit to Cielquan/RUlaub that referenced this issue Nov 25, 2021
see tauri-apps/tauri#2871

the hard codes path to the win sdk can be overwritten via feature flags
- win_sdk_ver to overwrite version only
- win_sdk_path to overwrite whole path
win_sdk_ver takes precedence
@Bextract
Copy link

I experienced this issue as well because i was using the wrong toolchain. Switching the rust toolchain from x86_64-pc-windows-gnu to x86_64-pc-windows-msvc solved it for me.

@miguelgargallo
Copy link

In my case, here is how I solve it!
No webpage was found for the web address: tauri web app windows error

@TechStudent10

This comment was marked as outdated.

@lcpichette
Copy link

For me it was as simple as having renamed my script.

npm run tauri dev was giving the error Error failed to get cargo metadata: No such file or directory (os error 2), but this was because I had renamed dev to dev:website, thinking I would need to have two separate commands for the website and the app. In reality Tauri just piggybacks off the website dev script. I ended up renaming dev:website script back to dev and it resolved the issue.

Silly small issue, but figured this comment could save some people a bit of a headache since this thread is one of the first results on Google for the same error I had.

@nikhil-swamix
Copy link

image
hello, i think i found a potential clue for the same issue as being discussed in thread,
Hint: Source code and windows executables like windres are in different drives.
im not rust expert(on way to become one),
so please validate this hint, as i have no definitive way
of testing it out bcs im trying to build a tauri app first time, but faced with this error.

@miguelgargallo
Copy link

miguelgargallo commented Oct 1, 2023 via email

@exislow
Copy link

exislow commented Oct 9, 2023

image hello, i think i found a potential clue for the same issue as being discussed in thread, Hint: Source code and windows executables like windres are in different drives. im not rust expert(on way to become one), so please validate this hint, as i have no definitive way of testing it out bcs im trying to build a tauri app first time, but faced with this error.

I have the same issue...

@FabianLars
Copy link
Member

can you post the output of rustup show and npm run tauri info and the exact command you run that triggers this please. Sounds like a misconfigured toolchain or missing system dependencies.

@exislow
Copy link

exislow commented Oct 11, 2023

PS C:\data-gui> rustup show

rustup home:  C:\.rustup

stable-x86_64-pc-windows-msvc (default)
rustc 1.73.0 (cc66ad468 2023-10-03)


PS C:\data-gui> npm run tauri info

> data-gui@0.0.0 tauri
> tauri info

[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 117.0.2045.60
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.72.0 (5680fa18f 2023-08-23)
    ✔ Cargo: 1.72.0 (103a7ff2e 2023-08-15)
    - node: 20.8.0
    - yarn: 1.22.19
    - npm: 10.1.0

[-] Packages
    - tauri [RUST]: 1.5.1
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.4
    - tao [RUST]: 0.16.4
    - tauri-cli [RUST]: not installed!
    - @tauri-apps/api [NPM]: 1.5.0
    - @tauri-apps/cli [NPM]: 1.5.2

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



PS C:\data-gui> yarn tauri dev
yarn run v1.22.19
$ tauri dev
     Running BeforeDevCommand (`yarn dev`)
$ vite

  VITE v4.4.11  ready in 4431 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: use --host to expose  
        Warn Waiting for your frontend dev server to start on http://localhost:1420/...
        Info Watching C:\data-gui\src-tauri for changes...
    Blocking waiting for file lock on package cache

   Compiling tauri-runtime v0.14.1

   Compiling wry v0.24.4

   Compiling data-gui v0.0.0 (C:\data-gui\src-tauri)

error: failed to run custom build command for `data-gui v0.0.0 (C:\data-gui\src-tauri)`



Caused by:

  process didn't exit successfully: `C:\data-gui\src-tauri\target\debug\build\data-gui-0628a3d1102c55b8\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 'Couldn't to execute windres to compile "C:\data-gui\src-tauri\target\debug\build\data-gui-438dbf4e2fa80abf\out\resource.rc" into "C:\data-gui\src-tauri\target\debug\build\data-gui-438dbf4e2fa80abf\out/libresource.a": program not found', C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\embed-resource-2.4.0\src\windows_not_msvc.rs:49:23

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...

error Command failed with exit code 101.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Do I really have a config issue? Looks good to me, no?!

@FabianLars
Copy link
Member

Yeah your config looks alright. What's confusing is that the resource compiler thinks you're compiling for the gnu target with the msvc toolchain.
Do you maybe have a .cargo/config.toml file somewhere overwriting the build target?

Also, rustup show and tauri info show different rust versions. Did you upgrade them inbetween or do you indeed have 2 installs where 1 could be interfering here 🤔

@exislow
Copy link

exislow commented Oct 16, 2023

I only have one rust installation. Actually the full path have should been redacted but I have missed the last part (obviously). Just corrected it. Let's assume the installation is under c:\ :-) c:\.cargo\ has no config.toml.

This is how my project looks like. There is no .cargo/config.toml present

image

Any other ideas?

@exislow
Copy link

exislow commented Oct 31, 2023

@FabianLars maybe?

@FabianLars
Copy link
Member

@exislow I have to stick with what i said. That error can realistically only happen when you compile with/for the gnu toolchain, or if cargo/rust thinks you do.
The code branch is controlled via cfg here: https://github.com/nabijaczleweli/rust-embed-resource/blob/master/src/lib.rs#L126...

@mendrik
Copy link

mendrik commented Nov 8, 2023

I have the same issue, installed everything by the book today and get the following output:

C:\Desk\mendrik\gridmail [master +14 ~0 -0 !]> rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\andre\.rustup

stable-x86_64-pc-windows-msvc (default)
rustc 1.73.0 (cc66ad468 2023-10-03)
C:\Desk\mendrik\gridmail [master +14 ~0 -0 !]>  npm run tauri info

> gridmail@0.0.0 tauri
> tauri info


[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 119.0.2151.44
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.73.0 (cc66ad468 2023-10-03)
    ✔ cargo: 1.73.0 (9c4383fb5 2023-08-26)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 21.1.0
    - pnpm: 8.10.2
    - npm: 10.2.0

[-] Packages
    - tauri [RUST]: 1.5.2
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.4
    - tao [RUST]: 0.16.5
    - @tauri-apps/api [NPM]: 1.5.1
    - @tauri-apps/cli [NPM]: 1.5.6

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

I did however select Preact not React, but I doubt that has any impact.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows scope: core Core packages of Tauri status: needs more info Issue needs more information, discussion or reproducible example type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.