Skip to content

Local network reports "already running" after host sleep, but PocketIC is defunct and gateway is unreachable. #577

Description

@o8o8a
   ## Problem

   After the macOS host sleeps and wakes, a local `icp-cli` network running inside an OrbStack Linux machine becomes unusable.
  I know that after "icp network stop," then "icp network start -d" it will be okay, but this will result in the loss of all data generated after the last deploy.  and i can't let my laptop always on.

   `icp-cli-network-launcher` is still running, so `icp network
 start -d` reports:

   ```text
   Error: network 'local' is already running

But the actual gateway is unreachable:

  curl http://127.0.0.1:8000/api/v2/status
  # connection refused

Process state shows:

  icp-cli-network-launcher ... --gateway-port 8000 ...
  [pocket-ic] <defunct>

Then icp deploy fails with:

  direct update call failed: An error happened during
communication with the replica:
  error sending request for url
(http://127.0.0.1:8000/api/v4/canister/.../call)

Environment

  • icp-cli: icp 0.2.7
  • Host: macOS
  • Runtime: OrbStack Linux machine
  • Network: local native managed network
  • Gateway: 127.0.0.1:8000

Steps to reproduce

  icp network start -d
  icp deploy
  # put macOS host to sleep
  # wake host
  icp deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions