affaan-m/ECC · error · Error

Catalog show requires an install component ID

Error message

Catalog show requires an install component ID

What it means

_validate_import_url() performs a forward DNS resolution (socket.getaddrinfo) on the hostname before opening any connection. If DNS resolution fails with socket.gaierror, the import is rejected immediately with the unresolvable hostname, rather than letting urllib.request.urlopen produce a less actionable error later. This is a fail-fast validation step.

Source

Thrown at scripts/catalog.js:168

      return;
    }

    if (options.command === 'components') {
      const components = listInstallComponents({
        family: options.family,
        target: options.target,
      });
      if (options.json) {
        console.log(JSON.stringify({ components }, null, 2));
      } else {
        printComponents(components);
      }
      return;
    }

    if (options.command === 'show') {
      if (!options.componentId) {
        throw new Error('Catalog show requires an install component ID');
      }
      const component = getInstallComponent(options.componentId);
      if (options.json) {
        console.log(JSON.stringify(component, null, 2));
      } else {
        printComponent(component);
      }
      return;
    }

    throw new Error(`Unknown catalog command: ${options.command}`);
  } catch (error) {
    console.error(`Error: ${error.message}`);
    process.exit(1);
  }
}

main();

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Correct the hostname and confirm it resolves: run `nslookup <host>` or `getaddrinfo` from the same environment.
  2. Connect to the required VPN or internal network if the host is internal-only.
  3. For offline environments, download the instinct file on a connected machine and import it via its local path instead.
Defensive patterns

Strategy: validation

Validate before calling

# Pre-resolve the host to give a clearer error before importing.
import socket
try:
    socket.getaddrinfo(host, 443, type=socket.SOCK_STREAM)
except socket.gaierror:
    raise SystemExit(f'host {host} does not resolve — check DNS/network/VPN')

Type guard

import socket

def host_resolves(host) -> bool:
    try:
        socket.getaddrinfo(host, 443, type=socket.SOCK_STREAM)
        return True
    except socket.gaierror:
        return False

Try / catch

try:
    content = _fetch_import_url(source)
except ValueError as e:
    if 'could not be resolved' in str(e):
        log.error('DNS resolution failed — are you offline or on the wrong VPN?')
    raise

Prevention

When it happens

Trigger: Typo in the domain name; the host does not exist in DNS; running in an air-gapped/offline environment; an internal hostname that only resolves behind a VPN that is not connected; an expired/delegated domain.

Common situations: CI runner without network/DNS; corporate environment where the host is only resolvable via internal DNS; mistyped domain; DNS server outage.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/df7ddf5e020ecacb. Report an issue: GitHub.