tareqimbasher / NetPad

A cross-platform C# editor and playground.
MIT License
1.12k stars 60 forks source link

A JavaScript error occurred in the main process #159

Closed peter-nguyen-contemi closed 3 months ago

peter-nguyen-contemi commented 6 months ago

Hi, NetPad 0.6.1-win-x64 suddenly stops starting today on my Windows 11 machine. Could you please investigate what went wrong and how I can make it work again. Below are all information that I think are helpful for troubleshooting. Thank you.

[Window Title] Error

[Main Instruction] A JavaScript error occurred in the main process

[Content] Uncaught Exception: Error: listen EACCES: permission denied ::1:57931 at Server.setupListenHandle [as _listen2] (node:net:1468:21) at listenInCluster (node:net:1533:12) at GetAddrInfoReqWrap.doListen [as callback] (node:net:1682:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:8)

[OK]

image

dotnet --list-sdks
8.0.101 [C:\Program Files\dotnet\sdk]

dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

OS version: Edition Windows 11 Pro Version 23H2 Installed on ‎9/‎14/‎2023 OS build 22631.3085 Experience Windows Feature Experience Pack 1000.22684.1000.0

tareqimbasher commented 5 months ago

Thank you for reporting this. As a test can you try installing .NET 6 SDK and see if it launches without an error?

alexanderluettig commented 5 months ago

Hey, Im getting the same error image Also tried to update node but that didnt work either

martinzima commented 3 months ago

I started getting this error today too, I'm not able to run NetPad anymore. Tried upgrading to latest NetPad version and reinstalling it with no help. FWIW, I'm running Windows 10.

alexanderluettig commented 3 months ago

Hey, Im getting the same error image Also tried to update node but that didnt work either

updating to netpad 0.7 fixed it for me

alexanderluettig commented 3 months ago

Hey, Im getting the same error image Also tried to update node but that didnt work either

updating to netpad 0.7 fixed it for me

Its broken again :D

tareqimbasher commented 3 months ago

I assume downgrading to 0.6.1 doesn't help? Could you try going over your network interfaces and seeing if disabling any of them fixes the issue? See: #111

tareqimbasher commented 3 months ago

Also linking this SO answer if it helps: https://stackoverflow.com/questions/59428844/listen-eacces-permission-denied-in-windows

I haven't been able to replicate the error which makes it really hard to figure out a cause and solution.

alexanderluettig commented 3 months ago

I assume downgrading to 0.6.1 doesn't help? Could you try going over your network interfaces and seeing if disabling any of them fixes the issue? See: #111

Ok. I tried disabling some of my network interfaces and it seems that this is the problem: image Disabling my wireless interface fixed it for me. And even after renabling it Netpad will start normally now.

Weird :D

tareqimbasher commented 3 months ago

Great! Thanks for reporting back. Seems to be some network interfaces are keeping ports busy or inaccessible somehow on Windows.

@peter-nguyen-contemi @martinzima 👆

tareqimbasher commented 3 months ago

Closing as environment issue. I added an entry to Troubleshooting page