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

[pnpm tauri dev] Using tauri dev exits with code 101 #3

Closed
pickaxe828 opened this issue Jun 20, 2023 · 13 comments
Closed

[pnpm tauri dev] Using tauri dev exits with code 101 #3

pickaxe828 opened this issue Jun 20, 2023 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@pickaxe828
Copy link

When using pnpm tauri dev, a panic is thrown and the app was closed.

> pnpm tauri dev

> [email protected] tauri D:\Joshua\Code\Web\FileExplorer
> tauri "dev"

     Running BeforeDevCommand (`yarn dev`)
yarn run v1.22.19
$ vite

  VITE v4.3.9  ready in 3398 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: use --host to expose
        Info Watching D:\Joshua\Code\Web\FileExplorer\src-tauri for changes...
   Compiling file-explorer v0.0.0 (D:\Joshua\Code\Web\FileExplorer\src-tauri)
warning: unused import: `rayon::prelude`
 --> src\file_explorer\search.rs:6:5
  |
6 | use rayon::prelude::*;
  |     ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: variable does not need to be mutable
  --> src\file_explorer\search.rs:39:21
   |
39 |                 let mut score;
   |                     ----^^^^^
   |                     |
   |                     help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

warning: `file-explorer` (bin "file-explorer") generated 2 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 1m 05s
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("EOF while parsing a value", line: 1, column: 0)', src\file_explorer\mod.rs:74:62
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[0620/204033.047:ERROR:window_impl.cc(119)] Failed to unregister class Chrome_WidgetWin_0. Error = 0
🚀 A new version of Tauri CLI is available! [2.0.0-alpha.10]
 ELIFECYCLE  Command failed with exit code 101.
PS D:\Joshua\Code\Web\FileExplorer> pnpm update @tauri-apps/cli @tauri-apps/api --latest
Already up to date
Progress: resolved 193, reused 162, downloaded 0, added 0, done
Done in 7.3s
PS D:\Joshua\Code\Web\FileExplorer> pnpm tauri dev

> [email protected] tauri D:\Joshua\Code\Web\FileExplorer
> tauri "dev"

     Running BeforeDevCommand (`yarn dev`)
yarn run v1.22.19
$ vite

  VITE v4.3.9  ready in 1251 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: use --host to expose
        Info Watching D:\Joshua\Code\Web\FileExplorer\src-tauri for changes...
warning: unused import: `rayon::prelude`
 --> src\file_explorer\search.rs:6:5
  |
6 | use rayon::prelude::*;
  |     ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: variable does not need to be mutable
  --> src\file_explorer\search.rs:39:21
   |
39 |                 let mut score;
   |                     ----^^^^^
   |                     |
   |                     help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

warning: `file-explorer` (bin "file-explorer") generated 2 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 1.52s
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("EOF while parsing a value", line: 1, column: 0)', src\file_explorer\mod.rs:74:62
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[0620/204440.510:ERROR:window_impl.cc(119)] Failed to unregister class Chrome_WidgetWin_0. Error = 0
🚀 A new version of Tauri CLI is available! [2.0.0-alpha.10]
 ELIFECYCLE  Command failed with exit code 101.
 ```
@conaticus
Copy link
Owner

Thanks for checking out the project. Did you manually create an empty disk_cache.json, if so serde won't be able to parse it, because it's empty.

@pintovillamar
Copy link

I have the same issue, and speaking about the disk_cache.json it creates itself but it's empty.
image

@conaticus conaticus added the bug Something isn't working label Jun 25, 2023
@conaticus conaticus self-assigned this Jun 25, 2023
@conaticus conaticus added invalid This doesn't seem right and removed bug Something isn't working labels Jun 25, 2023
@conaticus
Copy link
Owner

@pickaxe828 @pintovillamar are you both using Linux? This error has been known to occur on Linux as the program does not yet fully support Linux. Thanks.

@pickaxe828
Copy link
Author

pickaxe828 commented Jun 25, 2023

@pickaxe828 @pintovillamar are you both using Linux? This error has been known to occur on Linux as the program does not yet fully support Linux. Thanks.

I am on Windows 11, run with PowerShell, not through WSL.

@pintovillamar
Copy link

@pickaxe828 @pintovillamar are you both using Linux? This error has been known to occur on Linux as the program does not yet fully support Linux. Thanks.

I use Linux (btw Arch Linux)

@conaticus
Copy link
Owner

@RaphGL Do you know if this issue still occurs after adding Linux support and the rewrite?

@conaticus conaticus added bug Something isn't working and removed invalid This doesn't seem right labels Jun 27, 2023
@RaphGL
Copy link
Contributor

RaphGL commented Jun 27, 2023

@conaticus I've tried using pnpm and trying to replicate the bug and it doesn't happen on my end. So I'm assuming it's all good

@conaticus
Copy link
Owner

@conaticus I've tried using pnpm and trying to replicate the bug and it doesn't happen on my end. So I'm assuming it's all good

Yeah likely. I'll close it and we'll know it's a problem if it comes up again.

@FormalSnake
Copy link

I have this exact issue on macOS with yarn

@RaphGL
Copy link
Contributor

RaphGL commented Jun 28, 2023

@FormalSnake have you tested the latest commit? if it still fails can u show us the error and the stack trace?

@FormalSnake
Copy link

It is the latest commit.

Running BeforeDevCommand (yarn dev)
yarn run v1.22.19
warning ../../package.json: No license field
$ vite

VITE v4.3.9 ready in 507 ms

➜ Local: http://localhost:1420/
➜ Network: use --host to expose
Info Watching /Users/kyandesutter/development/FileExplorer/src-tauri for changes...
Compiling file-explorer v0.0.0 (/Users/kyandesutter/development/FileExplorer/src-tauri)
Finished dev [unoptimized + debuginfo] target(s) in 4.04s
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error("EOF while parsing a value", line: 1, column: 0)', src/filesystem.rs:176:63
stack backtrace:
0: rust_begin_unwind
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
1: core::panicking::panic_fmt
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
2: core::result::unwrap_failed
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1687:5
3: core::result::Result<T,E>::unwrap
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1089:23
4: file_explorer::filesystem::load_system_cache
at ./src/filesystem.rs:176:26
5: file_explorer::filesystem::get_volumes
at ./src/filesystem.rs:191:9
6: file_explorer::main::{{closure}}
at ./src/main.rs:30:25
7: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1987:9
8: tauri::manager::WindowManager::run_invoke_handler
at /Users/kyandesutter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.3.0/src/manager.rs:1089:5
9: tauri::window::Window::on_message
at /Users/kyandesutter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.3.0/src/window.rs:1465:11
10: tauri::manager::WindowManager::prepare_ipc_handler::{{closure}}
at /Users/kyandesutter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.3.0/src/manager.rs:780:19
11: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1987:9
12: tauri_runtime_wry::create_ipc_handler::{{closure}}
at /Users/kyandesutter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-runtime-wry-0.13.0/src/lib.rs:3249:5
13: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1987:9
14: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1987:9
15: wry::webview::wkwebview::InnerWebView::new::did_receive
at /Users/kyandesutter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wry-0.24.3/src/webview/wkwebview/mod.rs:104:11
16:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
fatal runtime error: failed to initiate panic, error 5

@pickaxe828
Copy link
Author

pickaxe828 commented Jun 29, 2023

@conaticus A potential way of fixing this is found.
I manually added an empty {} to the empty disk_cache.json and it launches without this error being invoked.
EDIT: But when searching, this error is invoked:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\file_explorer\search.rs:22:61
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[0629/203955.011:ERROR:window_impl.cc(119)] Failed to unregister class Chrome_WidgetWin_0. Error = 0
 ELIFECYCLE  Command failed with exit code 101.
 ```

@RaphGL
Copy link
Contributor

RaphGL commented Jun 29, 2023

@pickaxe828 searching requires u to have a cache.
by adding {} to the cache you're losing the ability to search.
We should probably continue this discussion on #26

But I think you're on an old commit, cause the file has been changed to system_cache.json and uses slightly different names for the disks/volumes.
Try recloning the project (the old dev branch was deleted I think so you probably won't get it otherwise) and rerun the project and see how it goes. Let me know what happens on the issue thread I linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants