spacedriveapp / spacedrive

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.
https://spacedrive.com
GNU Affero General Public License v3.0
31.1k stars 915 forks source link

ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @sd/desktop@1.0.0 dev: `tauri dev` #494

Closed lvzhenbo closed 1 year ago

lvzhenbo commented 1 year ago

Describe the bug

PS C:\Users\29422\Desktop\spacedrive> pnpm desktop dev

> @sd/root@0.0.0 desktop C:\Users\29422\Desktop\spacedrive
> pnpm --filter @sd/desktop -- "dev"

> @sd/desktop@1.0.0 dev C:\Users\29422\Desktop\spacedrive\apps\desktop
> tauri dev

     Running BeforeDevCommand (`pnpm exec vite --clearScreen=false --mode development`)

  VITE v3.2.5  ready in 1873 ms

  ➜  Local:   http://localhost:8001/
  ➜  Network: use --host to expose
warning: C:\Users\29422\Desktop\spacedrive\apps\mobile\rust\Cargo.toml: unused manifest key: target.cfg(not(target_os = "ios")).features
        Info Watching C:\Users\29422\Desktop\spacedrive\core for changes...
        Info Watching C:\Users\29422\Desktop\spacedrive\crates/* for changes...
        Info Watching C:\Users\29422\Desktop\spacedrive\crates/sync/example/api for changes...
        Info Watching C:\Users\29422\Desktop\spacedrive\apps/desktop/src-tauri for changes...
        Info Watching C:\Users\29422\Desktop\spacedrive\apps/mobile/rust for changes...
        Info Watching C:\Users\29422\Desktop\spacedrive\apps/server for changes...
    Finished dev [unoptimized + debuginfo] target(s) in 3.57s
C:\Users\29422\Desktop\spacedrive\apps\desktop:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @sd/desktop@1.0.0 dev: `tauri dev`
Exit status 3221225781
 ELIFECYCLE  Command failed with exit code 1.

Reproduction

run pnpm desktop dev

Expected behavior

No response

Platform and versions

PS C:\Users\29422\Desktop\spacedrive> pnpm --version && cargo --version && rustc --version
7.20.0
cargo 1.65.0 (4bc8f24d3 2022-10-20)
rustc 1.65.0 (897e37553 2022-11-02)

OS: win 10 22h2

Stack trace

No response

Additional context

No response

oscartbeaumont commented 1 year ago

I am not sure what's going on here because it's not really throwing out much of an error. The exit status 3221225781 may be related to this but I'm not sure.

What happens in your run cargo run -p server in the Spacedrive repository? Does it startup correctly or fail to compile/run?

Does running something like pnpm desktop dev -- --verbose show more of an error?

lvzhenbo commented 1 year ago

Yes, an error occurred after running the command cargo run -p server

PS C:\Users\29422\Desktop\spacedrive> cargo run -p server
warning: C:\Users\29422\Desktop\spacedrive\apps\mobile\rust\Cargo.toml: unused manifest key: target.cfg(not(target_os = "ios")).features
   Compiling winapi v0.3.9
   Compiling serde_json v1.0.86
   Compiling tokio v1.21.2
   Compiling tracing v0.1.37
   Compiling memchr v2.5.0
   Compiling tower-layer v0.3.2
   Compiling tracing-futures v0.2.5
   Compiling sha-1 v0.10.0
   Compiling nom v7.1.1
   Compiling lsp-types v0.91.1
   Compiling cookie v0.16.1
   Compiling time-macros v0.2.4
   Compiling http-range-header v0.3.0
   Compiling regex-syntax v0.6.27
   Compiling time v0.3.15
   Compiling socket2 v0.4.7
   Compiling time v0.1.44
   Compiling iana-time-zone v0.1.51
   Compiling chrono v0.4.22
   Compiling atty v0.2.14
   Compiling colored v2.0.0
   Compiling diagnostics v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling schema-ast v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling prisma-value v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling parser-database v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling hostname v0.3.1
   Compiling cuid v1.2.0
   Compiling psl-core v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling nu-ansi-term v0.46.0
   Compiling builtin-psl-connectors v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling dml v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling tracing-subscriber v0.3.16
   Compiling rusqlite v0.25.4
   Compiling psl v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling mobc v0.7.3 (https://github.com/prisma/mobc?tag=1.0.6#80462c48)
   Compiling hyper v0.14.20
   Compiling prisma-models v0.0.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling quaint v0.2.0-alpha.13 (https://github.com/prisma/quaint?rev=6df49f14efe99696e577ffb9902c83b09bec8de2#6df49f14)
   Compiling tower v0.4.13
   Compiling parking_lot_core v0.8.5
   Compiling user-facing-errors v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling parking_lot v0.11.2
   Compiling tower-http v0.3.4
   Compiling tracing-error v0.2.0
   Compiling quanta v0.9.3
   Compiling regex v1.6.0
   Compiling axum-core v0.2.8
   Compiling tungstenite v0.17.3
   Compiling cexpr v0.6.0
   Compiling object v0.29.0
   Compiling sync_wrapper v0.1.1
   Compiling matchit v0.5.0
   Compiling bindgen v0.59.2
   Compiling axum v0.5.16
   Compiling specta-macros v0.0.4 (https://github.com/oscartbeaumont/rspc?rev=6243b5b6a1376940a40318340e5eaef22e4a2c22#6243b5b6)
   Compiling backtrace v0.3.66
   Compiling async-tungstenite v0.17.2
   Compiling introspection-connector v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling sha1 v0.10.5
   Compiling json-rpc-api-build v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling httpz v0.0.3 (https://github.com/oscartbeaumont/httpz.git?rev=1ddbd9ad594ac7ee3e5b167afe689d1ce1228519#1ddbd9ad)
   Compiling metrics-util v0.13.0
   Compiling specta v0.0.4 (https://github.com/oscartbeaumont/rspc?rev=6243b5b6a1376940a40318340e5eaef22e4a2c22#6243b5b6)
   Compiling sql-schema-describer v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling schema v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling datamodel-renderer v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling opentelemetry v0.17.0
   Compiling metrics-exporter-prometheus v0.10.0
   Compiling tracing-opentelemetry v0.17.4
   Compiling sql-introspection-connector v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling ffmpeg-sys-next v5.1.1
   Compiling migration-core v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling schema-builder v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling rspc v0.1.2 (https://github.com/oscartbeaumont/rspc?rev=6243b5b6a1376940a40318340e5eaef22e4a2c22#6243b5b6)
   Compiling migration-connector v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling metrics-util v0.12.1
   Compiling query-connector v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling sql-migration-connector v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling sql-query-connector v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling query-engine-metrics v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling remove_dir_all v0.5.3
   Compiling rand v0.4.6
   Compiling jsonrpc-core v17.1.0
   Compiling tempdir v0.3.7
   Compiling dmmf v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling ffmpeg-next v5.1.1
   Compiling ntapi v0.4.0
   Compiling sd-core v0.1.0 (C:\Users\29422\Desktop\spacedrive\core)
   Compiling normi v0.0.1 (https://github.com/oscartbeaumont/rspc?rev=6243b5b6a1376940a40318340e5eaef22e4a2c22#6243b5b6)
   Compiling sd-crypto v0.0.0 (C:\Users\29422\Desktop\spacedrive\crates\crypto)
   Compiling sysinfo v0.26.4
   Compiling sd-file-ext v0.0.0 (C:\Users\29422\Desktop\spacedrive\crates\file-ext)
   Compiling sd-ffmpeg v0.1.0 (C:\Users\29422\Desktop\spacedrive\crates\ffmpeg)
   Compiling query-core v0.1.0 (https://github.com/Brendonovich/prisma-engines?rev=43fcfd1b5c0be59e414fb03cf7b7712e1661b6d0#43fcfd1b)
   Compiling ctrlc v3.2.3
   Compiling prisma-client-rust v0.6.3 (https://github.com/Brendonovich/prisma-client-rust.git?rev=1e30449d2981cbe0bb9252511493474eb35b2696#1e30449d)
   Compiling sd-sync v0.1.0 (C:\Users\29422\Desktop\spacedrive\crates\sync)
   Compiling server v0.1.0 (C:\Users\29422\Desktop\spacedrive\apps\server)
    Finished dev [unoptimized + debuginfo] target(s) in 3m 25s
     Running `target\debug\server.exe`
error: process didn't exit successfully: `target\debug\server.exe` (exit code: 0xc0000135, STATUS_DLL_NOT_FOUND)
lvzhenbo commented 1 year ago

I looked at the link you provided and I'm not sure if that's the reason, because my other rust programs are running fine and this is what I installed image

utkubakir commented 1 year ago

@lvzhenbo Does this issue still persist with the clean repo and cleaned application folder?

lvzhenbo commented 1 year ago

NO.....I can't even run . \.github\scripts\setup-system.ps1 now image

lvzhenbo commented 1 year ago

I am Windows 11

HeavenVolkoff commented 1 year ago

Oh, that is odd. Could you run this command: (Get-CimInstance Win32_operatingsystem).OSArchitecture and send the output?

Edit: Could you also send the output of the command above after running [System.Threading.Thread]::CurrentThread.CurrentCulture = [System.Globalization.CultureInfo]::InvariantCulture in the same Powershell session?

lvzhenbo commented 1 year ago

image

HeavenVolkoff commented 1 year ago

OK. So the return of OSArchitecture is localized, this means that the check in the setup-system.ps1 will fail on most non-Latin locations. Looking through GitHub, this issue is somewhat common: https://github.com/obsproject/obs-studio/issues/6229 https://github.com/belowaverage-org/SuperGrate/issues/45

I will change the check to something like the solution used for obs: https://github.com/obsproject/obs-studio/pull/6236/files

This should at least fix the problem of the script refusing to run.

HeavenVolkoff commented 1 year ago

@lvzhenbo Could you test again with the current main? The setup script shouldn't reject your environment anymore.

lvzhenbo commented 1 year ago

@lvzhenbo Could you test again with the current main? The setup script shouldn't reject your environment anymore.

Can this installation script detect the corresponding environment, I found that it led to a duplicate installation, I have already installed the corresponding environment through Visual Studio and Rustup

HeavenVolkoff commented 1 year ago

Can this installation script detect the corresponding environment, I found that it led to a duplicate installation, I have already installed the corresponding environment through Visual Studio and Rustup

It should be able to. The script uses winget to call both the official Visual Studio Build Tools installer to install the C++ build tools, and also to call the Rustup installer and install the default msvc stable toolchain. So, as long as you installed Rust and the build tools with the default installers, winget should detect that and just move on. If you are experiencing a duplicated installation, could you please open a new issue describing how you previously set up your environment and what is getting duplicated so that we can reproduce it.

What about the original issue ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL? Was it solved with a clean build using the current main?

lvzhenbo commented 1 year ago

Sometimes it is quite helpless, I found that the rust version is too high after installing the environment manually according to the script image

HeavenVolkoff commented 1 year ago

You can update your rust toolchain with the command: rustup update

lvzhenbo commented 1 year ago

You can update your rust toolchain with the command: rustup update.

No, it is not too low, it is too high, and it is related to sd-core v0.1.0. Sorry, my English is not good to understand the wrong meaning

lvzhenbo commented 1 year ago

The problem described in this issue is gone, but I have encountered other problems image

HeavenVolkoff commented 1 year ago

This problem occurs because ffmpeg-sys-next is unable to find the necessary ffmpeg DLLs to build. This is something the setup script configures here: https://github.com/spacedriveapp/spacedrive/blob/2fe523d9e9e978a590944be9663d936cbbf81c5f/.github/scripts/setup-system.ps1#L289-L349

You mentioned that you manually configured your environment. Did you set up the ffmpeg DLLs? To do this, you need to download the 6.0.1 release here, and then create an environment variable called FFMPEG_DIR that points to the directory inside the extracted release. Additionally, you will also need to set up protoc, which is another requirement for one of our dependencies. The setup script should take care of all of this for you.