Failed to load resource: the server responded with a status of 504 (Gateway Timeout)

I’m getting the error listed in the title when trying to run my app locally. It started happening seemingly out of nowhere. has anyone experienced this when running a canister locally?

I’m also seeing this error in the console as well:

index.js:22 Error: Server returned an error:
  Code: 504 (Gateway Timeout)
  Body: Error occured while trying to proxy to: localhost:3000/api/v2/status

    at HttpAgent.status (index.js:249)
    at async HttpAgent.fetchRootKey (index.js:258)

and this one:

[HPM] Error occurred while trying to proxy request /api/v2/status from localhost:3000 to http://localhost:8000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /api/v2/status from localhost:3000 to http://localhost:8000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /api/v2/canister/u7xn3-ciaaa-aaaaa-aaa4a-cai/call from localhost:3000 to http://localhost:8000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)

I resolved this issue by changing my node version from v17.0.1 to v16.3.1

3 Likes