Repository navigation
fix(runtime): tell users to restart when an update removes bundled runtimes - #63
Merged
Merged
Conversation
…ntimes Hosts can update or uninstall Mobile Dev while its server runs, deleting the version folder the server reads serve-emu and Baguette from. Users then saw a developer message about vendoring, and the panel retried the failure on every reconnect. The server now records its bundle file's identity when it loads. A missing runtime tells the user to restart when the server's files were removed or replaced, or to reinstall when the installation lacked the runtime from the start, and the panel stops retrying it. Every error event from a server whose files are gone carries install_integrity, and missing-runtime errors also carry bundled_runtime. Store migration failures now report which step failed and why, instead of one generic error. Closes #48
Collaborator
Author
|
@codex review this |
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.
Closes #48.
Why
Hosts can update or uninstall Mobile Dev while its server is still running. The update deletes the version folder that the old server reads serve-emu and Baguette from, so the next Android stream or simulator open fails.
The Sentry users match up:
The packages themselves were complete. Users saw a developer message ("Run npm run vendor:serve-emu…"), and the panel retried on every reconnect.
What changes
packages/core/src/install-integrity.tsrecords the inode and modification time of the server's bundle file when it loads. Later it can tell whether those files areintact,removedorreplaced.MissingRuntimeError:retryable: falsefor missing runtimes, as it already did for unavailable devices. The three duplicated checks became oneretryableFailure().install_integrity, however the event was captured. Missing-runtime errors also carrybundled_runtime, withinstall_integrity: incompletewhen the install never had the runtime.installLatestno longer exists. Its replacement,migrateToStore, reported the same single generic error. It now tagsplugin_update_stepandplugin_update_failure, and the user-facing messages are unchanged.docs/telemetry.mddocuments the new tags.Not in this PR
dist/, the way the Android CPU collector keeps its binaries in memory. Butdist/is about 131 MB, and this would change how every host launches the server, so it belongs in its own PR.install_integrity, so Sentry can show how often this happens.removedandreplacedcould count as expected outcomes, with onlyincompletereported as an issue.Testing
npm test: 877 of 880 passed, 1 skipped. Two TraceSift tests failed whilenpm run buildran at the same time;tracesift-client.test.tspasses on its own (14/14).npm run typecheck:telemetrypasses. A fulltscreports the same errors asmain.install-integrity.test.tsbundles the module as a realserver.mjs, then deletes or replaces that file.android.test.tscallsmobile_android_stream_sessionthrough the realServeEmustart path and checks the message andretryable: false.npm run build, runningdist/server.mjsfrom a copy:mobile_open_simulatorsay: "Mobile Dev was updated or removed while it was running and cannot find its simulator backend. Restart the app running Mobile Dev to load the installed version."baguette/made it say: "This Mobile Dev installation is missing its simulator backend. Reinstall Mobile Dev, then restart the app running it."