JamesMc86 / G-CLI

A proxy mechanism allow LabVIEW programs to easily write out to the command line.
BSD 2-Clause "Simplified" License
71 stars 19 forks source link

Timed out waiting for app to connect to g-cli #171

Open justiceb opened 3 months ago

justiceb commented 3 months ago

Love G-CLI! It's been great!

I'm bumping into a funky issue though. Every once in awhile (10% of the time or so), I get the error message: "Timed out waiting for app to connect to g-cli"

I'm using this on a GitHub Runner, on a virtual machine. No docker. Single runner instance.

I am even seeing this behavior when calling the built-in "ClearCache" method. Here is an example log output:

`shell: cmd command: g-cli --lv-ver 2021 --timeout 10000 --arch 64 --kill-timeout 10000 --verbose ClearCache

02:14:27.157 [DEBUG] G CLI Started - Verbose Mode 02:14:27.157 [DEBUG] Version 3.0.1 02:14:27.157 [DEBUG] G CLI Arguments: "g-cli" "--lv-ver" "2021" "--timeout" "10000" "--arch" "64" "--kill-timeout" "10000" "--verbose" "ClearCache" 02:14:27.157 [DEBUG] Arguments passed to LabVIEW: "" 02:14:27.158 [DEBUG] No extension in path. Assume it is a .vi 02:14:27.158 [DEBUG] Detected LabVIEW versions: 2021 SP1, 64bit (C:\Program Files\National Instruments\LabVIEW 2021)

02:14:27.158 [DEBUG] Looks like VI "ClearCache.vi" doesn't exist - Checking in vi.lib/G CLI Tools instead. 02:14:28.177 [DEBUG] Launching: C:\Program Files\National Instruments\LabVIEW 2021\LabVIEW.exe "C:\Program Files\National Instruments\LabVIEW 2021\vi.lib\G CLI Tools\ClearCache.vi -unattended -- -p:60581" 02:14:28.180 [DEBUG] Process launched with PID 6048 Error: No connection established with application.

Caused by: Timed out waiting for app to connect to g-cli`

I will try to dig and figure out what the issue might be

JamesMc86 commented 3 months ago

Hi @justiceb,

Thanks for the kind words!

If this is consistent, then nine times out of ten, it is something like a license dialog blocking LabVIEW. Try either viewing the GUI as it runs on the runner or launching LabVIEW manually and checking if anything is blocking the launch.