If I browse for an EXE (custom app or any exe that is resolved by browsing manually) that EXE never triggers Insomnia to keep the PC awake.
I was able to get the app running in VS Code to debug, but I do not claim to be familiar with Electron development, and my naive hacks just to see what was going on are not appropriate for a PR. That said, I've narrowed down the issue.
When selecting an EXE in ipcMain.handle('browse-exe', async () => {...}, the full path to the exe is stored, and subsequently never ends up matching anything in the tasklist results because the tasklist call contains exe names, not full paths.
I'm not sure what, if any, downstream effects this would have, but if I change this:
return { name, exe: exePath, icon };
to this:
return { name, exe: name + '.exe', icon }
The active indicator changes color to reflect that there is a match in tasklist.
I don't know if anything else depends on the full path, and am not setup/familiar to do debugging and testing in depth, but hopefully this will make it easy for you to implement a real fix.
Thanks.
Screenshots
Before
After

If I browse for an EXE (custom app or any exe that is resolved by browsing manually) that EXE never triggers Insomnia to keep the PC awake.
I was able to get the app running in VS Code to debug, but I do not claim to be familiar with Electron development, and my naive hacks just to see what was going on are not appropriate for a PR. That said, I've narrowed down the issue.
When selecting an EXE in
ipcMain.handle('browse-exe', async () => {...}, the full path to the exe is stored, and subsequently never ends up matching anything in thetasklistresults because thetasklistcall contains exe names, not full paths.I'm not sure what, if any, downstream effects this would have, but if I change this:
to this:
The active indicator changes color to reflect that there is a match in
tasklist.I don't know if anything else depends on the full path, and am not setup/familiar to do debugging and testing in depth, but hopefully this will make it easy for you to implement a real fix.
Thanks.
Screenshots
Before
After