Repository navigation
fix(desktop): a slow start gets more time and a notice, not "couldn't start" - #909
Merged
Merged
Conversation
… start" On a first start the app waited 60 seconds for its backend, then killed it and showed "couldn't start", unless a database migration was visibly running. In the field that fired on Windows with the backend alive but slow (2 of 92 installs in 30 days): one start printed nothing for a minute, the next took 15 seconds to check its database, and the third came up fine. Killing it only made the user start the same slow work again. A backend still alive at the deadline now gets a "still starting" notice (Keep Waiting / Quit) and four more minutes. If that runs out too it is given up on as before, and the report names the whole wait. A migration found running at a deadline still keeps the wait going, and the two notices share one slot, so only one is ever up. Where the notice holds the app until answered (macOS), the longer wait starts once it has been, so time spent behind the box does not count. Nothing changes after the app has been ready once, or for a backend that crashes. The first start of each app session also reports how long it took (desktop.backend.started: startupMs, attempts, slowStart), under the same consent as the startup failure report. There was no measure of startup time, so the deadlines were guesses.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Problem
On a first start the desktop app waited 60 seconds for its backend, then killed it and showed "couldn't start", unless a database migration was visibly running. In the field that fired on Windows with the backend alive but slow: 2 of 92 installs in 30 days (5 of 540 starts), none on Mac. One start printed nothing for a minute, the next took 15 seconds to check its database and still was not ready at 60, and the third came up fine. Killing it only made the user start the same slow work again. There was also no measure of how long startup takes, so the deadline was a guess.
Fix
SLOW_START_EXTRA_WAIT). The readiness wait inrunBackendProcessnow takes one deadline after another:onReadinessTimeoutcan answer{ waitAgainFor }.desktop.backend.started(startupMsfrom a monotonic clock,attempts,slowStart) throughDesktopCrashReport, under the same consent asdesktop.backend.startup_failed.docs/telemetry.mdlists it.Nothing changes once the app has been ready (restarts stay quiet and unbounded) or for a backend that crashes (the three-attempt cap).
Known gap, not new: a migration found at a deadline waits with no limit. If that notice is dismissed and the backend then never answers, nothing is on screen.
Checks
vp fmt,vp lint,vp run typecheck, all desktop tests (385). New and changed tests inDesktopBackendManager.test.ts: a slow start that recovers and reports its time, one that never answers (notice, then failure after the full wait), one that dies under the notice, one that turns out to be migrating, and the macOS case where the box is answered late.