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.
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 101with no actionable detail.There are two separate problems:
-d): stderr is written to.icp/cache/networks/local/network-launcher/stderr.logbut the path is never shown to the user./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 whenLauncherExitedPrematurelyfires, 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.