nextron icon indicating copy to clipboard operation
nextron copied to clipboard

Fails to launch on WSL2 - Windows 11 port 8888 is already in use

Open DanielAtCosmicDNA opened this issue 1 year ago • 2 comments

When running yarn && yarn dev just after creating the default project with npx create-nextron-app my-app --example basic-lang-javascript within Debian on WSL2:

[nextron] Run renderer process: next -p 8888 renderer
Port 8888 is already in use.
Done in 1.21s.

When I look for traces of usage with fuser command none is found in Debian. But when I look for usage in Powershell with the following command:

Get-Process -Id (Get-NetTCPConnection -LocalPort 8888).OwningProcess

the following is found:

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     25     1.96       8.69       0.03   12248   1 wslrelay

I am not sure why wslrelay is installed in my system and which process was responsible to install it. But the fact is that it is occupying this port and blocking nextron default launch.

To workaround I used nextron --renderer-port 8889

This is not directly an issue with nextron but a related issue. Any ideas of why wslrelay was ever installed on this port?

DanielAtCosmicDNA avatar Feb 21 '24 13:02 DanielAtCosmicDNA

@DanielAtCosmicDNA sorry for the late reply, it might be another app that you are running in that port. I'm suspecting a proxy server running on it. because wslrelay is acting like a reverse proxy server (windows and wsl-> fake linux)

bm777 avatar Feb 23 '24 04:02 bm777

imagine running fake linux

BrycensRanch avatar Mar 07 '24 14:03 BrycensRanch