coreybutler/nvm-windows · error

error: failed to obtain update data: %v

Error message

error: failed to obtain update data: %v

What it means

GUI update path (upgrade entry with zenity dialogs): checkForUpdate(UPDATE_URL) failed, so the remote release metadata could not be fetched. The error is reported both as a desktop notification ('Update Error') and on the status channel; note the goroutine does not return/exit after sending, so the flow continues with a zero-value Update.

Source

Thrown at src/upgrade/upgrade.go:234

	// Wait for the prior subroutine to initialize before starting the next dependent thread
	time.Sleep(300 * time.Millisecond)

	// Run the update
	go func() {
		exe, _ := os.Executable()
		winIco := filepath.Join(filepath.Dir(exe), "nvm.ico")
		ico := filepath.Join(filepath.Dir(exe), "download.ico")

		var err error
		u, err = checkForUpdate(UPDATE_URL)
		if err != nil {
			display(Notification{
				Title:   "Update Error",
				Message: err.Error(),
				Icon:    "error",
			})

			status <- Status{Err: fmt.Errorf("error: failed to obtain update data: %v\n", err)}
		}

		var perr error
		dlg, perr = zenity.Progress(
			zenity.Title(fmt.Sprintf("Installing NVM for Windows v%s", u.Version)),
			zenity.Icon(ico),
			zenity.WindowIcon(winIco),
			zenity.AutoClose(),
			zenity.NoCancel(),
			zenity.Pulsate())

		if perr != nil {
			fmt.Println("Failed to create progress dialog")
		}

		go func() {
			for {
				select {

View on GitHub (pinned to 5b18223ca1)

Solutions

  1. Check network connectivity to the update URL host (curl the UPDATE_URL) and retry
  2. Configure proxy/SSL: set HTTP_PROXY/HTTPS_PROXY or fix the corporate root CA store
  3. If offline by design, disable/skip the update check or install the nvm upgrade manually from the releases page
  4. Retry later if GitHub is having an incident
Defensive patterns

Strategy: retry

Prevention

When it happens

Trigger: Any network/DNS failure, proxy interception, or GitHub unreachability while `nvm install`/update check fetches UPDATE_URL; also an invalid response body that fails to unmarshal into the Update struct.

Common situations: Corporate proxies with self-signed certificates, offline machine, firewall blocking github.com, or a transient GitHub outage during `nvm` update checks.

Related errors


AI-assisted analysis of coreybutler/nvm-windows@5b18223ca1 (2026-08-15). Data as JSON: /api/errors/99d2cfd98b3cdd4c. Report an issue: GitHub.