launcher icon indicating copy to clipboard operation
launcher copied to clipboard

launcher should not be running after executing remote uninstall request

Open RebeccaMahany opened this issue 8 months ago • 5 comments

When testing v1.18.3, @James-Pickett and I both noticed that after remotely uninstalling launcher, the launcher service would start back up again.

@James-Pickett suggested the issue is that launcher exits before the Windows Service Manager fully receives the update that the launcher service should be in "manual" start mode, so the Service Manager restarts launcher -- i.e., we have a race between setting start mode to manual and calling os.Exit. We should update disableAutoStart on Windows to confirm with the Service Manager that the start mode has updated to "manual" before returning.

We don't think this bug is new to this release, so it won't prevent v1.18.3 from going out.

RebeccaMahany avatar Apr 02 '25 20:04 RebeccaMahany

Tested this out today, and even with an additional verification (backoff for 30sec querying new config and confirming start type), I still see this issue. Additionally, I see that the start type is correctly set to manual in the service manager as well.

RebeccaMahany avatar May 30 '25 20:05 RebeccaMahany

mmmmm. In a secretless (or multitenant) world, I think the remote uninstall should unenroll but leave launcher running. I'm not sure we'll still want a remote uninstall. What do you think?

directionless avatar Jun 01 '25 02:06 directionless

I guess I'm not sure what we'd want launcher in that state for -- to be able to switch between e.g. sandbox and prod tenants?

Do people use remote uninstall presently? Wondering if we'd want a separate remote unenroll action instead.

RebeccaMahany avatar Jun 02 '25 12:06 RebeccaMahany

mmm, that's a good question.

I can tell you that when we originally build this, it was meant as a "reset for the next enrollment" but since secretless didn't exist, it was a disable. The intent is from the perspective of K2 or the admin. This device is no longer part of this tenant, please reset for the next

It feels somewhat wrong to uninstall.

directionless avatar Jun 02 '25 13:06 directionless

When a duplicate device is identified, k2 sends down an uninstall request to the "older" device. Is it correct for that device to uninstall launcher, or to unenroll?

RebeccaMahany avatar Jun 10 '25 13:06 RebeccaMahany