Skip to content

fix: prevent init hang after "Setup complete" (skip bvm update-check + bump Node to 22.22) - #20

Merged
nachoaldamav merged 2 commits into
mainfrom
fix/bvm-hang-skip-update-check
Aug 2, 2026
Merged

fix: prevent init hang after "Setup complete" (skip bvm update-check + bump Node to 22.22)#20
nachoaldamav merged 2 commits into
mainfrom
fix/bvm-hang-skip-update-check

Conversation

@nachoaldamav

Copy link
Copy Markdown
Contributor

Problem

init@v3 hangs indefinitely right after bvm prints:

Setup complete. Open a new terminal to start using Bit.

It never reaches bit install — and skip-deps-install: true doesn't help, because the hang is before that step. Reported by a user whose workflow was unchanged since May; oldest hung run sat for 2.5h.

Root cause

The action ran (scripts/init.ts):

await exec("bvm", ["install", bitEngineVersion, "--use-system-node"]);

After install, bvm (by default) does two things that run after "Setup complete":

  1. Update checkgetBvmRemoteVersion(), a network call to see if a newer bvm exists (if (!args.skipUpdateCheck) in bvm's commands/install/install.ts).
  2. PATH edit — appends bvm's dir to shell profile/PATH files.

On a runner with restricted network egress, the update-check request never returns, so the step hangs forever. Clean GitHub-hosted runners have open egress, so the check returns and they pass — which is why this reproduces only in some environments.

Separately, the action pinned Node 22.14, below Bit's current floor — every run logged Bit CLI requires at least Node.js 22.22.0!.

Fix

  • scripts/init.ts: pass --skip-update-check and --skip-update-path to bvm install. Neither is needed in CI — the action already sets PATH itself, and update notifications are irrelevant in a pipeline.
  • action.yml: bump pinned Node 22.1422.22.
  • dist/index.js rebuilt (ncc).

Validation

Manually dispatched Test Bit Init on this branch (temporarily pointing at the local action with test-data pinned to engine 1.13.58): run 30743985379green (1m35s). Log shows:

bvm install 1.13.58 --use-system-node --skip-update-check --skip-update-path
node: v22.22.3        # 22.22 warning gone

A user independently confirmed the same flags fix the hang on their (restricted) runner. The hang can't be reproduced on clean ubuntu-latest (open egress), so CI here is a regression check that the happy path still works with the added flags.

Release note

@v3 consumers only pick this up once the v3 tag is moved to the merge commit.

The init action ran `bvm install <engine> --use-system-node` without
`--skip-update-check` or `--skip-update-path`. After printing "Setup
complete", bvm performs a network call to check for a newer bvm
(getBvmRemoteVersion) and edits shell profile/PATH files. On runners with
restricted network egress the update check blocks indefinitely, so the
step hangs after "Setup complete" and never reaches `bit install` — even
with skip-deps-install: true.

Pass both flags to bvm install. Neither is needed in CI: the action sets
PATH itself, and update notifications are irrelevant in a pipeline.

Also bump the pinned Node from 22.14 to 22.22 to satisfy Bit's current
minimum ("Bit CLI requires at least Node.js 22.22.0"), which the old pin
triggered as a warning on every run.
@nachoaldamav
nachoaldamav force-pushed the fix/bvm-hang-skip-update-check branch from cbf4904 to 614f396 Compare August 2, 2026 11:23
@nachoaldamav
nachoaldamav merged commit 5a18276 into main Aug 2, 2026
@nachoaldamav
nachoaldamav deleted the fix/bvm-hang-skip-update-check branch August 2, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant