Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Update removing service #231

Open
alexeightsix opened this issue Feb 5, 2019 · 9 comments
Open

Windows Update removing service #231

alexeightsix opened this issue Feb 5, 2019 · 9 comments

Comments

@alexeightsix
Copy link

Whenever there's a automated Windows Update (Windows 10) the service that was installed will no longer be installed. Is there a way to prevent this from happening?

@coreybutler
Copy link
Owner

I've never heard of WUS uninstalling user-installed processes, nor do I see how it would touch node-windows at all. I'd need to see more evidence that node-windows is actually related to this (i.e. I'm not even sure if this is something that can be handled or where to start troubleshooting).

@jszczypk
Copy link

I can confirm the problem with disappearing services. Most services are not installed on machines that I control, but I have also linked it to Windows Update.
I have one machine that had that problem last weekend and I have access to logs - I will try to search through the logs for some clues.

@jszczypk
Copy link

jszczypk commented Feb 25, 2020

On the second thought it might be more of https://github.com/kohsuke/winsw/ business.

winsw/winsw#272

@daviditsygin
Copy link

daviditsygin commented Jul 15, 2021

I'm encountering this issue now. I have a machine which was running an installed service consistently through reboots but this morning after it automatically installed 20H2, the service is missing in the Services list.

Running the install function again emits the "alreadyinstalled" event so I'm unable to reinstall or restart the service.

Installing the same service under a different name works for the time being.

@coreybutler
Copy link
Owner

If an attempt to reinstall triggers the alreadyinstalled event, it means the service exists. I'm not sure why Windows wouldn't display this in the list of services, but it may be as simple as running the start() method.

@daviditsygin
Copy link

I didn't have a chance to try that before uninstalling/re-installing the service, but the service also did not start at boot-up after a few attempts which is what prompted me to check the list.

@coreybutler
Copy link
Owner

@daviditsygin I'd double check any logging to assure the Windows update didn't cause the app to break. If node-windows detects too many restarts (i.e. launches, fails immediately), then it will gradually back off and eventually stop attempting to restart the service. So, if there was an error in the app caused by the update, it could look like it's not starting, even if it is starting/stopping/backing off rapidly. It's a rare circumstance, but I can't think of anything else that would cause this behavior.

@alexeightsix
Copy link
Author

alexeightsix commented Jul 15, 2021

We had to disable windows updates completely on all our workstations for the time being as it would uninstall the service that would launch our node app at boot. Unfortunately I don't have any logs but it was definitely due to updates.

@echoleyo
Copy link

echoleyo commented May 12, 2022

I'm encountering this issue now. I have a machine which was running an installed service consistently through reboots but this morning after it automatically installed 20H2, the service is missing in the Services list.

Running the install function again emits the "alreadyinstalled" event so I'm unable to reinstall or restart the service.

Installing the same service under a different name works for the time being.

I had the same issue recently after Windows Upgrade to 20H2, all services still there, but were unable to restart.

Cannot start service from the command line or debugger. A winwows Service must first be 
installed(using installutil.exe) and then started with the ServerExplorer, Windows Services 
Administrative tool or the NET START command.

myService.err from daemon

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '@author.io/args'
Require stack:
- C:\Users\echoleyo\AppData\Roaming\npm\node_modules\node-windows\lib\wrapper.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\echoleyo\AppData\Roaming\npm\node_modules\node-windows\lib\wrapper.js:3:12)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\echoleyo\\AppData\\Roaming\\npm\\node_modules\\node-windows\\lib\\wrapper.js'
  ]
}

details are in this thread #314 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants