GWSL-Source
GWSL-Source copied to clipboard
SystemExit Exception
If in windows I click the Exit button I got the following exception:
2022-06-27 12:37:05,512 - __main__ - ERROR - Exception occurred in main loop
Traceback (most recent call last):
File "main.py", line 615, in main
SystemExit
2022-06-27 12:37:11,727 - __main__ - ERROR - Exception occurred - Cannot Start Service. Make sure the settings file is not corrupted.
Traceback (most recent call last):
File "main.py", line 615, in main
SystemExit
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 697, in <module>
File "main.py", line 621, in main
SystemExit
GWSL version 1.4.0 from Microsoft store
the issue could be here?
https://github.com/Opticos/GWSL-Source/blob/20e53a825a7ef9b3233f253681caa820bdb3add9/manager.py#L1222-L1227
Seeing the same issue: GWSL 1.4.0 from MS Store Edition Windows 10 Enterprise Version 21H2 Installed on 28/09/2021 OS build 19044.1826 Experience Windows Feature Experience Pack 120.2212.4180.0
App closed because the X server service fails. Running 'GWSL_vcxsrv.exe' from the terminal gives the following:
$ ./GWSL_vcxsrv.exe
Welcome to the VcXsrv X Server
Vendor: The VcXsrv Project
Release: 1.20.9.0
OS: Windows NT 6.2 build 9200 (64-bit)
Contact: [email protected]
LoadPreferences: C:\Users\Tokarz.SIT\.XWinrc not found
LoadPreferences: Loading C:\Users\Tokarz.SIT\AppData\Roaming\GWSL\VCXSRV\system.XWinrc
Segmentation fault
Hmm. Is this only on exit @jrtokarz ?
@Pololot64 no, this is on starting GWSL
After the 1.4.5 update, it stopped working for me with this same issue,
Installed through the windows store version GWSL 1.4.5 WSL 2 Windows 11 21H2 (Build:22000.1455)
Dashboard log is empty
service log
2023-01-30 14:45:05,964 - __main__ - ERROR - Exception occurred in main loop
Traceback (most recent call last):
File "main.py", line 675, in main
SystemExit
2023-01-30 14:45:06,434 - __main__ - ERROR - Exception occurred - Cannot Start Service. Make sure the settings file is not corrupted.
Traceback (most recent call last):
File "main.py", line 675, in main
SystemExit
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 757, in <module>
File "main.py", line 681, in main
SystemExit
happy to provide with any other info
After the 1.4.5 update, it stopped working for me with this same issue,
Installed through the windows store version GWSL 1.4.5 WSL 2 Windows 11 21H2 (Build:22000.1455)
Dashboard log is empty
service log
2023-01-30 14:45:05,964 - __main__ - ERROR - Exception occurred in main loop Traceback (most recent call last): File "main.py", line 675, in main SystemExit 2023-01-30 14:45:06,434 - __main__ - ERROR - Exception occurred - Cannot Start Service. Make sure the settings file is not corrupted. Traceback (most recent call last): File "main.py", line 675, in main SystemExit During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 757, in <module> File "main.py", line 681, in main SystemExithappy to provide with any other info
Could you upload your settings file? (Make sure there is no personal info in it first)
is it the settings.json file stored in the same dir as logs ? (i.e at %AppData%/GWSL/), I suppose so
http://sprunge.us/ljh8C1
Wait. Is gwsl failing to run or are Linux apps failing to run?
It appears the gwsl is giving those errors when it starts, basically, when I run gwsl at the windows startup it appears in the tray but viewing its logs shows the above errors. Opening wsl and running GUI apps don't work either and don't add any errors to the log.
exiting the gwsl from the tray and relaunching it again appends same error in the log.
I do have enabled the wslg GUI in the .wslconfig file but the shell configuration by default exports the DISPLAY to point to GWSL, when I run Linux apps through a command like
DISPLAY=:0 xclock
they run successfully in wslg
Can you re-verify that gwsl is allowed through the firewall? That is likely the issue. (See the manual for details or click the button in GWSL Dashboard / about )
I rechecked the firewall settings, looks like I've allowed it, for good measure I allowed all gwsl and related apps both public and private access then exited and restarted gwsl. Still does not seem to work and produce same errors in the log.
Well one thing I know is that the issue is kind of "fake" because GWSL tends to spam that error message. It generally means nothing. I can fix it but since it does not affect functionality I don't have time at the moment.
So, just to clarify, GWSL is not crashing in any way?
It may also be wslg conflicting with it. I would recommend disabling it to check.
ok i'll try to reinstall gwsl and also try disabling the wslg and see if it works.
Disabled wslg, reinstalled Gwsl, restarted the system but still cant make it work unfortunately
I'll do some more thinking 🤔
Are you using a VPN anywhere or anything?
no, I am not using VPN.
only thing i remember that may have effect is updating gwsl from store, otherwise I had running it fine and had no other environmental change whatsoever
Now that wslg is disabled, what error do you get if you launch a GUI app directly from bash?
when i launch an gui app through bash it does nothing just get stuck, no window pops up nothing, exporting display to non existing port would error out so it means the connection with gwsl is there but just no window shows up by gwsl.
This is really strange. I know the xclock works so this makes it more strange. Maybe the new vcxsrv backend version has a bug. I doubt it but maybe
i tried with xclock it hunged, so left it and after some time exited with
Error: Can't open display: 172.28.176.1:0.0
Aha... this is good information. Can you ping that IP address from inside wsl? Also, is your distro wsl1 or wsl2?
its wsl2 and display was exported through the function auto inserted by GWSL in bashrc.
ping output
PING 172.27.176.1 (172.27.176.1) 56(84) bytes of data.
it then hangs
Aha. This is incredibly unrelated to the GWSL update then. I know you did it before but go into firewall settings and delete all rules related to GWSL. Something has likely gotten messed up.
ok so there were multiple entries in the firewall for GWSL VCXsrv windows server HIDPI so I removed all except one and now it worked
Awesome :)
so what was the issue? how did those entries came there in first place, was it due to update or just some coincidence?
Any way glad to have this finally sorted out and work. Thank you so much for the support here hope you have an awesome day. btw will those deleted fpulseaudio firewall entries auto populate itself through windows firewall requests when I use them?
What happens is that sometimes, after an update, Windows detects GWSL as a new program and asks you to allow it through again. That second prompt can be easy to miss. It causes 90% percent of problems.
Yes the rules will come back when you start GWSL the next time and give public access when it gives the prompts. Glad to help. Have a wonderful day too.