Open vaquilina-work opened 1 year ago
Hi, @vaquilina-work
I'm facing a similar issue where launching the 'gitkraken' command in the terminal does not result in anything happening. I have installed 'gedit' to check if the 'g' in 'wslg' is working properly. However, I couldn't find any logs related to 'gitkraken' to investigate why the application is not launching. Have you found a solution to make 'gitkraken' work with repositories located in WSL? In m'y case i am trying to open it as root an not à standard user it is also your case ?
Thanks in advance for your response.
Best regards,
Rafael
Hi, @xrafhue
In my case, it turned out that Windows Update was quietly updating the driver for my integrated graphics (Intel UHD 630). As far as I'm aware, wslg only works with specifed vGPU drivers (as per https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps).
Disallowing Windows Update from including driver updates and rolling back the driver solved the issue for me.
For future reference: I've found that when troubleshooting GPU issues with Electron based programs (e.g. GitKraken/Slack/Discord), it is sometimes helpful to disable hardware acceleration using the --disable-gpu
command line option.
For example, on my Ubuntu desktop I had prioritised the integrated graphics using the prime profiles in the NVIDIA X settings program. The time GitKraken stopped working I eventually figured out it was getting confused with the GPU acceleration. I tried editing /usr/share/applications/gitkraken.desktop
to change the Exec
line to Exec=/usr/share/gitkraken/gitkraken --disable-gpu %U
. After refreshing the desktop database with sudo update-desktop-database
I could run GitKraken again.
Of course, in a similar vein, if you knew the full path to the executable you could try launching it from a terminal instead of the .desktop
file so you can see the error messages directly to gleam the problem. You might need to vary the instructions slightly for your distribution (i.e. This anecdote was relevant to native Ubuntu so WSLg will be a little different) but it can help narrow down the issue.
I've got the exact same issue (and errors). The problem is not wslg because gedit and other wslg applications work perfectly fine. I've also tried reinstalling the application and removing the .gitkraken folder.
@RickBruyninckx Can you try this please? It worked for me and since then gitkraken is working fine again.
Hi, @xrafhue
In my case, it turned out that Windows Update was quietly updating the driver for my integrated graphics (Intel UHD 630). As far as I'm aware, wslg only works with specifed vGPU drivers (as per https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps).
Disallowing Windows Update from including driver updates and rolling back the driver solved the issue for me.
Removing gitkraken folder from home/config and running gitkraken --disable-gpu as user helped, also there must be no custom export for DISPLAY.
I was also facing this problem with WSL2. By rolling back my Intel Drivers to 30.0.101.1338
fixed the issue for me. I can open GitKraken from the WSL2 terminal just as before. Thanks, @vaquilina-work
... Of course, in a similar vein, if you knew the full path to the executable you could try launching it from a terminal instead of the
.desktop
file so you can see the error messages directly to gleam the problem. You might need to vary the instructions slightly for your distribution (i.e. This anecdote was relevant to native Ubuntu so WSLg will be a little different) but it can help narrow down the issue.
I followed this line of troubleshooting and got the error:
/usr/share/gitkraken# ./gitkraken
[1214/142210.519989:FATAL:electron_main_delegate.cc(293)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Trace/breakpoint trap
so I launch it like
/usr/share/gitkraken# ./gitkraken --no-sandbox
it runs, throwing the following errors:
[817:1214/142221.755376:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
(node:789) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `gitkraken --trace-deprecation ...` to show where the warning was created)
state: unavailable
Error: Path must be a valid path to a file or a directory.
at buildNSFW (/usr/share/gitkraken/resources/app.asar/node_modules/nsfw/js/src/index.js:74:11)
The above error occurred in task call
(node:789) UnhandledPromiseRejectionWarning: Error: Path must be a valid path to a file or a directory.
at buildNSFW (/usr/share/gitkraken/resources/app.asar/node_modules/nsfw/js/src/index.js:74:11)
(node:789) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:789) UnhandledPromiseRejectionWarning: Error: bad request
at buildError (/usr/share/gitkraken/resources/app.asar/src/main/static/main.bundle.js:2:1465798)
at IncomingMessage.<anonymous> (/usr/share/gitkraken/resources/app.asar/src/main/static/main.bundle.js:2:1466782)
at IncomingMessage.emit (node:events:513:28)
at IncomingMessage.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1358:12)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
(node:789) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
state: checking
state: unavailable
and looking like this
--disable-gpu
does not resolve this issue=, so gitkraken remains mostly unusable for me on WSL2.
After a restart, this works for me! Thanks for the tips, everyone. Not sure why a reboot was needed to make it stick. In the end I had to edit /usr/share/applications/gitkraken.desktop
to change the Exec line to Exec=/usr/share/gitkraken/gitkraken --no-sandbox %U & disown
and refreshing the desktop database with sudo update-desktop-database
edit: aaand it's broken again
The problem that I've notice it's that when I try to start GitKraken with a default user everything is ok, but if I try to start GitGraken with the root user the problem appears. (with the root user I have to add --no-sandbox)
If you want to lunch GitKraken from root user you have to modify the file in /usr/share/gitkraken/resources/bin/gitkraken.sh like below:
"ELECTRON_RUN_AS_NODE=1 "$GITKRAKEN" "$CLI" "--no-sandbox" "$@""
Windows build number:
10.0.19045.0
Your Distribution version:
22.04
Your WSL versions:
WSL version: 1.2.0.0 Kernel version: 5.15.90.1 WSLg version: 1.0.51 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.2788
Steps to reproduce:
gitkraken
from terminalC:\Users\vince\AppData\Local\Microsoft\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe\wslg.exe -d Ubuntu-22.04 --cd "~" -- /usr/share/gitkraken/gitkraken
)WSL logs:
weston.log pulseaudio.log stderr.log versions.txt
WSL dumps:
No response
Expected behavior:
Expected GitKraken to launch from wslg as normal, as it did when I installed it initially.
Actual behavior:
Gitkraken fails to start in any noticeable way, and does not print an error.
dmesg
output (from three separate attempts):