pkg icon indicating copy to clipboard operation
pkg copied to clipboard

CMD window Flashing up on Windows 10 when calling endpoint of Express server in PKG exe

Open johnsq opened this issue 2 years ago • 2 comments

What version of pkg are you using?

5.5.2

What version of Node.js are you using?

16.0.0

What operating system are you using?

Windows 10

What CPU architecture are you using?

Intel

What Node versions, OSs and CPU architectures are you building for?

default

Describe the Bug

Hi, When testing our PKG created exe on a Dell laptop, we are consistently experiencing an issue and wanted to know if you are aware of it and hopefully learn how to avoid it.

As you will see in this 12 second video.. https://photos.app.goo.gl/4hh6ufWpudMdAfRV7 ..each time I send an http request from Postman (or anywhere) to the localhost Express server, running within the PKG exe, we see a flicker/flash of a window. This appears in sync with CMD icon that flashes up in the task bar. I have no issue with the latter as this is clearly how the application functions, but the window flashing up is something we wouldn't our users to be seeing when using the ui of our desktop application.

Any advise you have on this would be fully appreciated.

Thanks

Expected Behavior

We are using PKG to package a NodeJS Express server to runs an api for background tasks for a desktop application. Ideally your users would never see the mechanics of your background tasks on their screens.

To Reproduce

As in my linked video, run a PKG exe on a Windows 10 computer. Send an http get request to an endpoint in your localhost server (the one running in your PKG obviously), from Postman or similar. Also, a white background helps (an open Explorer window in my case) so to best see the flash/flicker or the offending window, as it only shows for a few milliseconds.

johnsq avatar Apr 26 '22 15:04 johnsq

Hi again, I have now tested this on a number of other Windows 10 machines and they all do this thing consistently. Unless anyone can advise me of a way for make PKG (on Windows) function invisibly, without doing this, then I cannot see how it can be used in a desktop environment or with a desktop application.

On macOS, PKG has proved to be a perfect way to run a background api server for a desktop application, but now, because of this Windows fail, I'm going to have work at a new solution for both platforms.. which is a shame.

johnsq avatar May 03 '22 12:05 johnsq

We are using PKG to package a NodeJS Express server to runs an api for background tasks for a desktop application. Ideally your users would never see the mechanics of your background tasks on their screens.

try https://github.com/s-h-a-d-o-w/create-nodew-exe

https://photos.app.goo.gl/4hh6ufWpudMdAfRV7

Win + Alt + R

odysseymemoirs avatar Jun 10 '22 22:06 odysseymemoirs

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Sep 09 '22 00:09 github-actions[bot]

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

github-actions[bot] avatar Sep 15 '22 00:09 github-actions[bot]