tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
78.54k stars 2.33k forks source link

[bug] Build Crashed Computer and Requires Build Deletion #3695

Closed elibroftw closed 2 years ago

elibroftw commented 2 years ago

Describe the bug

I ran yarn rls which calls yarn tauri build and my computer crashed. I highly doubt it was a coincidence since my computer usually crashes if the power goes out, and my power did not go out. This is the second time something fishy happened. Earlier today, my taskbar disappeared after I was greeted with a black screen for a good 10 seconds. Another issue is that I have two monitors and Tauri (at least in dev mode) will crash if I don't move the window fast enough between the monitors.

Anyways, I ran build again and got:

  = note: LINK : fatal error LNK1207: incompatible PDB format in 'C:\Users\maste\Documents\GitHub\r2-t2\src-tauri\target\release\deps\tauri_macros-c8c8653046df9710.pdb'; delete and rebuild

error: could not compile `tauri-macros` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Error running CLI: failed to build app: Result of `cargo build` operation was unsuccessful: exit code: 101
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\Users\maste\Documents\GitHub\r2-t2>

If Tauri is going to tell me to delete the build files, it might as well delete them itself. No? I don't think people expect to keep their old build files when building do they?

Reproduction

  1. Run Windows 10
  2. Build a small ReactJS app that uses Mantine. So just build a Mantine example
  3. Have Firefox open with a couple tabs, YouTube running in the background
  4. Use VSCode's terminal to run yarn tauri build. conf.json is configured to run yarn build first

Expected behavior

It should work without crashing my computer and shouldn't need user intervention to delete build files. Builds should crash due to source code errors, not because a file wasn't expected to be a certain way.

Platform and versions

Windows 10, tauri-1.0.0-rc4

Stack trace

Compiling tauri-macros v1.0.0-rc.3
error: linking with `link.exe` failed: exit code: 1207
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX64\\x64\\link.exe" "/DEF:C:\\Users\\maste\\AppData\\Local\\Temp\\rustcDWvuVo\\lib.def" "/NOLOGO" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.0.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.1.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.10.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.11.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.12.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.13.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.14.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.15.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.2.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.3.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.4.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.5.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.6.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.7.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.8.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.tauri_macros.81fc559d-cgu.9.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.4jo7sejeipqkjdcl.rcgu.o" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.4z57s3ym8473ssib.rcgu.o" "/LIBPATH:C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps" "/LIBPATH:C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\build\\blake3-9cf748eda914fa0a\\out" "/LIBPATH:C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\build\\blake3-9cf748eda914fa0a\\out" "/LIBPATH:C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\build\\zstd-sys-0097701261b599cb\\out" "/LIBPATH:C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libtauri_codegen-b179c1233aad4e98.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libblake3-e88b42bd5d7c5393.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libconstant_time_eq-792c7d82f7d98fef.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\librayon-c2084b57f49d59b0.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\librayon_core-12dd70625620f6f4.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libnum_cpus-546115e6003a1fea.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcrossbeam_deque-b22fb86f7c9cb7fd.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcrossbeam_epoch-a42a8db68868ff04.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libmemoffset-72bdcee5effdf89d.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcrossbeam_channel-2be46d242d820d35.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcrossbeam_utils-18f171e86dde17e4.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libeither-bd44787eebc3ce29.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libarrayvec-1538da23fda7873c.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libarrayref-e7fcb147fade4c31.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libico-8cef2d38133dc38a.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libpng-255601496623a4f5.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libdeflate-bdfefa5716ac6125.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libinflate-f0478e4b00f9d5d9.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libadler32-05236f6449dd572d.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libnum_iter-8e75f28eb3037388.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libnum_integer-d7b2e41fd6599adf.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libnum_traits-8f6eff1a9aa8ada5.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libbase64-58620503954e92d4.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libregex-3315a20c5449957f.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libaho_corasick-3ef4ebb98717d6ec.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libmemchr-60d7d3b169d3d1f9.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libregex_syntax-681237cfae977c29.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libsha2-a83a53d629c60201.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcpufeatures-471737b09634d435.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libdigest-bef51c8e73a9d2b1.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libsubtle-a4682a0c7487acae.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libblock_buffer-6d96e63f93afac8f.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcrypto_common-a13d2900453c8189.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libgeneric_array-a74d94cadf5e5f84.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libtypenum-c025edb40fa1ac9b.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libtauri_utils-8764fe11053691f1.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libwalkdir-c96b00de2df529f4.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libsame_file-e9af9da5279fdc0f.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libwinapi_util-a69be4d0db15a924.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libglob-08e2496e0791fa2f.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libzstd-96317ccfcceea1b6.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libzstd_safe-fe5b3b48ab44d23e.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libzstd_sys-142793a2cad60475.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libkuchiki-453601117a5b86c2.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libselectors-19d450730c7706cb.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libthin_slice-21854f8404eb7882.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libservo_arc-f48380fafb4d8514.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libstable_deref_trait-9c44c6fdd00fd453.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libnodrop-1d2ffb906cdca981.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libfxhash-14b2da2e1a948226.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libbyteorder-3eed816f001f66a1.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libbitflags-456097ba4289784a.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcssparser-8ab3a337021cfc32.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libitoa-e070081d08c10f09.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libdtoa_short-8672cba15e1e0c2e.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libdtoa-c1da6e64a5143c72.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libhtml5ever-75dde2eb9092f79d.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\liblog-82be01592b7b1b36.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libmarkup5ever-b5f1c3f912dfd209.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libstring_cache-f2088301cb9e723c.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libprecomputed_hash-e06eb94c6c2fefb7.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libparking_lot-370a7ac12057b1d3.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libparking_lot_core-d4cd6096a771a827.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libwinapi-1e983a79d6c8e042.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libsmallvec-ab81b88a66acd8f1.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\liblock_api-eac403eaf01f7105.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libscopeguard-6616ea8b393ea098.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libinstant-62fb72060f9ad9a6.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libcfg_if-9f3c2713b79a4424.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\liblazy_static-0b837d5b7b681f16.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libphf-67ff84f40ae99e75.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libphf_shared-00cdef1900034757.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libtendril-ea75ce2eb4a4d357.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libutf8-3cb8194a54e5b9ae.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libfutf-9398d645d78faf8e.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libdebug_unreachable-af9a58c4a53c12c1.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libmac-11acf28042d47ec7.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libthiserror-531e52a650de1588.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libjson_patch-f93478d7ab4afbc9.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libtreediff-ba06225d4bf0be7f.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\liburl-7cdf7d523689a4b9.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libidna-253e36f6b8673b24.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libunicode_normalization-865e6d38d9ca916a.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libtinyvec-8c58a97e24a6ce6d.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libtinyvec_macros-8cfc0ce1339378ce.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libunicode_bidi-7521849c9423f664.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libform_urlencoded-baf45f8e0d9449c7.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libpercent_encoding-bf7310ca3016dbf5.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libmatches-d57053d6c835bd54.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libserde_with-aae15bbdee5667f5.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libserde_json-d1550fb227501ce9.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libryu-5b550301bc2e2505.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libitoa-6b22cfe0918aa1c8.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libserde-fd906ead600fe5c0.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libphf-b211d1a5fcf605fc.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libphf_shared-a6ae4fbb6844d4f7.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libsiphasher-44c959da2f7e8e7c.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libheck-73d48ab489de80cc.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libsyn-c52d39632a98470d.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libquote-f0dc76d11a93adfa.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libproc_macro2-35d69bdfed5a3927.rlib" "C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\libunicode_xid-1533423d9e865526.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libproc_macro-1f619df0559c61cc.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-f87c887dcbebcf7e.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-1fa243f7b8fbcf2e.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-d2a68ffd7d6cc9bc.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-2782cb7261e00d26.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-6d344c5ae5c98d1d.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-2a2853eff3f28cae.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-05b2534b6ba863f9.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-a2fd5bfe4190f6ed.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-65f001829f37d4a3.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-bb4e367f9c8cb3b1.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-cb5a4f54c7fe0156.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-fb53e48c93c8e8d8.rlib" "C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-284b570407e6ba82.rlib" "advapi32.lib" "bcrypt.lib" "cfgmgr32.lib" "credui.lib" "crypt32.lib" "cryptnet.lib" "fwpuclnt.lib" "gdi32.lib" "iphlpapi.lib" "kernel32.lib" "msimg32.lib" "ncrypt.lib" "ntdll.lib" "ole32.lib" "opengl32.lib" "secur32.lib" "shell32.lib" "shlwapi.lib" "synchronization.lib" "user32.lib" "winspool.lib" "ws2_32.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.dll" "/OPT:REF,NOICF" "/DLL" "/IMPLIB:C:\\Users\\maste\\Documents\\GitHub\\r2-t2\\src-tauri\\target\\release\\deps\\tauri_macros-c8c8653046df9710.dll.lib" "/DEBUG" "/NATVIS:C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\maste\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
  = note: LINK : fatal error LNK1207: incompatible PDB format in 'C:\Users\maste\Documents\GitHub\r2-t2\src-tauri\target\release\deps\tauri_macros-c8c8653046df9710.pdb'; delete and rebuild

error: could not compile `tauri-macros` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Error running CLI: failed to build app: Result of `cargo build` operation was unsuccessful: exit code: 101
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Additional context

Tauri Info ``` Operating System - Windows, version 10.0.19044 X64 Webview2 - 99.0.1150.39 Visual Studio Build Tools: - Visual Studio Community 2022 Node.js environment Node.js - 17.3.1 @tauri-apps/cli - 1.0.0-rc.6 @tauri-apps/api - 1.0.0-rc.2 Global packages npm - 8.3.0 pnpm - Not installed yarn - 1.22.11 Rust environment rustup - 1.24.3 rustc - 1.57.0 cargo - 1.57.0 toolchain - stable-x86_64-pc-windows-msvc App directory structure /.git /assets /build /dist /node_modules /public /pyi-specs /src /src-tauri /__pycache__ App tauri - 1.0.0-rc.4 tauri-build - 1.0.0-rc.4 tao - 0.6.4 wry - 0.13.3 build-type - bundle CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self' distDir - ../build devPath - http://127.0.0.1:3000/ framework - React Done in 7.74s. ```
elibroftw commented 2 years ago

I deleted the release target folder and this is what I got after building. image tauri build is completely broken. I have no idea if this is a ReactJS build fault, but this is a serious problem!

elibroftw commented 2 years ago

Can confirm this is a Tauri issue because npx serve -s build works fine.

JonasKruckenberg commented 2 years ago

Alright, again please paste the full output of tauri info that will include the OS and Tauri version by default.

That you are experiencing a broken build after your PC crashed mid-compilation doesn't surprise me. Run cargo clean or remove the target folder to remove all build artifacts. And yes, Rust wants you to keep your build artifacts between runs. This is called incremental compilation and it's the key to compile times that humans can actually endure.

Regarding your second post, all Tauri related code seems to have compiled just fine, otherwise you wouldn't get a window + webview at all. This seems like missing styles to me right? Have you checked the Sources or Network tab in the devtools for weird behavior?

lucasfernog commented 2 years ago

Addtionally, please file individual issues for each problem you find instead of listing them in a single one.

elibroftw commented 2 years ago
Tauri Info ``` Operating System - Windows, version 10.0.19044 X64 Webview2 - 99.0.1150.39 Visual Studio Build Tools: - Visual Studio Community 2022 Node.js environment Node.js - 17.3.1 @tauri-apps/cli - 1.0.0-rc.6 @tauri-apps/api - 1.0.0-rc.2 Global packages npm - 8.3.0 pnpm - Not installed yarn - 1.22.11 Rust environment rustup - 1.24.3 rustc - 1.57.0 cargo - 1.57.0 toolchain - stable-x86_64-pc-windows-msvc App directory structure /.git /assets /build /dist /node_modules /public /pyi-specs /src /src-tauri /__pycache__ App tauri - 1.0.0-rc.4 tauri-build - 1.0.0-rc.4 tao - 0.6.4 wry - 0.13.3 build-type - bundle CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self' distDir - ../build devPath - http://127.0.0.1:3000/ framework - React Done in 7.74s. ```
elibroftw commented 2 years ago

I know it's incremental compiling, I'm saying that if there is an issue with an older file, it should be deleted. You guys probably aren't responsible for it anyways.

As for the devtools, how can I check devtools if this is a release build?

FabianLars commented 2 years ago

You guys probably aren't responsible for it anyways.

Yep yep, that's it.

As for the devtools, how can I check devtools if this is a release build?

Either by creating a debug build (tauri build --debug -> output in /target/debug/) or by enabling the devtools flag on the tauri dependency in Cargo.toml

elibroftw commented 2 years ago

--debug doesn't allow me to open devtools with F12 or Ctrl + Shift + I or with right clicking. How do I enable the devtools flag on the dependency in cargo.toml?

FabianLars commented 2 years ago

--debug doesn't allow me to open devtools with F12 or Ctrl + Shift + I or with right clicking.

This is not really possible. Using tauri dev is pretty much the same as a debug build (in that regard), so if one works the other has to work too.

How do I enable the devtools flag on the dependency in cargo.toml?

Add it to the existing features array, something like this

tauri = {version = "1.0.0-rc.4", features = ["dialog-open", "devtools"] }
elibroftw commented 2 years ago

No errors in sources or network, but under console, I see this 4 times

Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-13143795633524851910'". Either the 'unsafe-inline' keyword, a hash ('sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='), or a nonce ('nonce-...') is required to enable inline execution.
FabianLars commented 2 years ago

Enabling CSP disallows inline styles (by default): https://tauri.app/docs/development/security/#secure-content-loading. In theory you'd need to add 'unsafe-inline' as the error says, but you really shouldn't do this (there's a reason it's called unsafe), also because we add nonces to the CSP config, unsafe-inline shouldn't have an effect, see parts of the discussion here: https://github.com/tauri-apps/tauri/issues/3583.

elibroftw commented 2 years ago

So what is the solution? I have 0 clue how to replace my inline styles because it is React, and 0 clue how to stop tauri from throwing a tantrum.

elibroftw commented 2 years ago

How can Tauri get hacked if it's supposed to be self contained? It's only possible if the users device is already compromised?

FabianLars commented 2 years ago

So what is the solution? I have 0 clue how to replace my inline styles because it is React

React does support CSS files too. Actually their docs recommend that too for performance reasons (kinda sad that they don't mention security stuff anywhere 🤔)

How can Tauri get hacked if it's supposed to be self contained? It's only possible if the users device is already compromised?

I suggest reading the security doc page, it hopefully answers your questions. For more i'll leave this question for the security experts (really not my field of expertise (yet?)).

elibroftw commented 2 years ago

Well I removed security entirely and that fixed it

FabianLars commented 2 years ago

That's indeed an interesting "fix" 👍

elibroftw commented 2 years ago

It does say in the docs "With the CSP protection enabled, using inline style attributes it not allowed." So according to CSP, its either all security or no security.

elibroftw commented 2 years ago

The typo is in the docs btw https://tauri.app/docs/development/security/#secure-content-loading

FabianLars commented 2 years ago

It does say in the docs [...]

Yes i know that. I'm just surprised every time a dev chooses the way of least friction no matter the security "cost".

The typo is in the docs btw

Thanks, we'll fix this.

elibroftw commented 2 years ago

Well, you aren't letting me know of a way to allow inline styles with CSP enables, and I chose React to reduce development time in the first place, but I'm starting to think it's causing more problems that necessary. It's not just Tauri. It's the entire dev tool system that causes havoc.

elibroftw commented 2 years ago

Like is unsafe-inline getting ignored or something?

elibroftw commented 2 years ago

Well it started working even with CSP. Might've changed a setting somewhere to make it work.