Skip to content

icp network start silently discards launcher stderr on port conflict #597

@marc0olo

Description

@marc0olo

When the network launcher exits prematurely (e.g. port 8000 already in use by Docker), the error surfaced to the user is just exited prematurely with status 101 with no actionable detail.

There are two separate problems:

  • Background mode (-d): stderr is written to .icp/cache/networks/local/network-launcher/stderr.log but the path is never shown to the user.
  • Foreground non-verbose mode (default): stderr is piped to /dev/null — the error is completely lost, not even written to a file.

The fix is in crates/icp/src/network/managed/launcher.rs: always capture stderr to the log file (including in non-background mode), and when LauncherExitedPrematurely fires, read the file tail and include it in the error message.

Reported by a community member in dfinity/examples#1356, who worked around it with a documentation PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions