fix(windows): say what to do when the Store tray app cannot be spawned - #1521
Open
ozymandiashh wants to merge 1 commit into
Open
ozymandiashh wants to merge 1 commit into
ozymandiashh wants to merge 1 commit into
Conversation
A Store-installed desktop app puts the tray exe under WindowsApps, and launching it by path from a console reports EPERM. The install then died with "Menubar install failed: spawn EPERM" even though nothing about the install had failed. The launch hook now answers for its own spawn: the Store route points at the Start menu entry the package does allow, the msi routes report the launch error without unwinding the install's own outcome, and the --quit signal logs a spawn failure without aborting, beside its taskkill fallback. Fixes getagentseal#1520.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1520.
What happened
With the desktop app installed from the Microsoft Store,
codeburn menubarfound the Store-packaged tray exe underC:\Program Files\WindowsApps\...and spawned it directly. Windows denies that from a console outside the package's app container, so the spawn failed with EPERM — and becauselaunchWindowsAppwas fire-and-forget (console.erroron the error event, return immediately), the run died in the CLI's catch-all as a crypticMenubar install failed: spawn EPERM, while the Store route had already printed its "nothing to download" narration as if the launch were about to work.What changed
launchWindowsAppnow answers for its own spawn: it returns the error message on a failed spawn (errorevent) and resolvesnullonce the process is up (spawnevent, thenunref). On a failed spawn Node never emitsspawn, so the two cannot both fire — verified with a probe against the realuv_spawnfailure path (ENOENT/EACCES, same path as Windows EPERM).awaitLaunchhelper normalizes the launch hook's result — sync-void test hooks from before the change still read as success, an empty string counts as success, a throwing hook is caught and becomes the message.Start CodeBurn Menubar from the Start menu instead; the Store copy cannot be launched from a console.— instead of the generic install failure. The Start-menu tile is the activation the package actually allows..msiroutes (already-installed launch-only, and post-install) report the launch error with a clarifying suffix —(the install itself succeeded; start CodeBurn Menubar from the Start menu if it did not appear)/(nothing was reinstalled; ...)— so a launch that could not happen does not read as an install that did not.--quitsignal instopRunningMenubarlogs a spawn failure instead of dropping it, and still does not abort: the polling loop and its taskkill fallback decide that, unchanged.The Store publication lag the reporter also hit (Store still serving 0.9.24) is not addressed here — that is a Store-side rollout question, and the installer's version resolution is unaffected by this change.
Testing
install itself succeededwhen the launch after a real msi install fails.tests/menubar-installer-windows.test.tsand 56 intests/menubar-installer.test.tspass;tsc --noEmitclean.--quitspawn failure, clarifying suffixes on the msi routes).