Fabric icon indicating copy to clipboard operation
Fabric copied to clipboard

[Bug]: WSL UNC paths are not supported in fabric --gui

Open EMREOYUN opened this issue 1 year ago • 3 comments

What happened?

Install fabric as usual in WSL and try running fabric --gui

Version check

  • [X] Yes I was.

Relevant log output

username@machinename:~$ fabric --gui
Running 'npm install'... This might take a few minutes.

up to date, audited 161 packages in 1s

26 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
'npm install' completed successfully. Starting the Electron app with 'npm start'...

> [email protected] start
> electron .

'\\wsl.localhost\Debian\home\username\.local\pipx\venvs\fabric\lib\python3.11\site-packages\installer\client\gui'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
'electron' is not recognized as an internal or external command,
operable program or batch file.
An error occurred while executing NPM commands: Command '['npm', 'start']' returned non-zero exit status 1.

Relevant screenshots (optional)

No response

EMREOYUN avatar Jun 09 '24 15:06 EMREOYUN

This is probably because you are running npm from windows and not within WSL. If you type 'which npm' in the cli, it should return a linux directory in the format '/home/[username]/...' and not a windows directory. Install node via nvm in WSL and your electron app will run. Drag&Drop doesn't work though :-(

AlainPaumen avatar Jun 13 '24 10:06 AlainPaumen

/pipx/venvs/fabric/lib/python3.11/site-packages/installer/client/gui/node_modules/electron/dist/electron: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory An error occurred while executing NPM commands: Command '['npm', 'start']' returned non-zero exit status 127.

It still does not work. However, UNC path problem is gone.

EMREOYUN avatar Jun 15 '24 18:06 EMREOYUN

it's not WSL related. I'm on linux, in a kali distrobox container and I got:

deck@fabric:/home/deck/Fabric$ fabric --gui Running 'npm install'... This might take a few minutes.

up to date, audited 161 packages in 715ms

26 packages are looking for funding run npm fund for details

found 0 vulnerabilities 'npm install' completed successfully. Starting the Electron app with 'npm start'...

[email protected] start electron .

/home/deck/.dbx/fabric/.local/share/pipx/venvs/fabric/lib/python3.11/site-packages/installer/client/gui/node_modules/electron/dist/electron: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory An error occurred while executing NPM commands: Command '['npm', 'start']' returned non-zero exit status 127.

libnss3 had not been caught by any dependency and needed to be installed manually.

sudo apt install libnss3 on my debian derived distro. ymmv

AO12612 avatar Jun 27 '24 18:06 AO12612