t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Device support shows generic network error when npm blocks install via min-release-age

Open listlessbird opened this issue 1 week ago • 0 comments

What happened

After updating to 0.1.12-nightly.20261122.5071, Settings → Devices failed with:

Device support failed during installing device support. Check the host connection and network access, then retry.

Retrying gave the same error. The actual cause was min-release-age=2 in ~/.npmrc, which made npm reject [email protected] because it was published less than two days earlier. None of npm's stderr is shown in the UI, so the message points at a network problem instead.

Diagnosis

#40095 (merged 2026-11-21) bumped the pinned hub to [email protected] (published 2026-11-20 13:22 UTC). DeviceToolchain.installTool (apps/server/src/device/DeviceToolchain.ts:128) runs npm install --prefix <staging> [email protected], which exits with ETARGET under min-release-age.

Respecting min-release-age matches #19855 (closed as working as designed). Unlike #19855, where npm's stderr reached the user, DeviceToolchainInstallError here is wrapped in a generic DeviceHostUnavailableError and the Settings → Devices banner tells the user to check their host connection and network access (the still-open part noted when closing #17431).

DeviceToolchainInstallError already has a dedicated message for npm_not_found (#28227). Handling ETARGET date-cutoff errors the same way (naming the release-age setting and cutoff date, or showing a safe npm install failure summary instead of generic network advice) would show what actually blocked the install.

Steps to reproduce

  1. Set min-release-age=2 in ~/.npmrc.
  2. Run a build whose pinned expo-device-hub version is under 2 days old (e.g., 0.1.12-nightly.20261122.5071 before 2026-11-22 13:23 UTC).
  3. Open Settings → Devices with "Use devices" enabled.
  4. Observe the generic network/install error with no mention of min-release-age or ETARGET.

Version

Desktop 0.1.12-nightly.20261122.5071 (local server same version, commit 047fb5b).

Environment

  • Linux x64 (kernel 7.0.0-43-generic)
  • Desktop app with a local server
  • Node v26.13.1, npm 11.12.1
  • ~/.npmrc: min-release-age=2

Evidence

From server.trace.ndjson (DeviceToolchain.installTool):

DeviceToolchainInstallError: Installing expo-device-hub failed while running npm install (exit code 1).
  [cause]: {"stderr":"npm error code ETARGET
npm error notarget No matching version found for [email protected] with a date before 20/11/2026, 10:56:49 am."}

The server converts that to DeviceHostUnavailableError: This machine is unavailable: Device support failed during installing device support., which is all the UI displays alongside the generic network advice.

Related issues

  • #17431: device hub install showing network advice on non-network npm install failures; closed after #17569 fixed the Settings Update popover, noting that the automatic-update banner still shows network advice and hides stderr details.
  • #28227: similar generic device install failure fixed specifically for npm_not_found.
  • #19855: same min-release-age ETARGET failure on exact ACP Registry pins (closed as working as designed; maintainer noted a clearer error naming the policy would fit).
  • #14249, discussion #15329 (resolved by #19580): provider updates respect release-age settings rather than bypassing them.

Fix applied or workaround

Wait until the pinned version is older than min-release-age, then click Retry. Temporarily removing min-release-age from ~/.npmrc, clicking Retry, and restoring it unblocked the install (couldn't find a per-package min-release-age-exclude option in npm 11.12.1).

Filed by

Claude Code (Claude Opus 5.5), revised with Gemini 4 Neon, via T3 Code triage.

listlessbird avatar Nov 22 '26 05:11 listlessbird