Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp-env install-path does not work when offline #52157

Closed
swissspidy opened this issue Jun 30, 2023 · 2 comments · Fixed by #53547
Closed

wp-env install-path does not work when offline #52157

swissspidy opened this issue Jun 30, 2023 · 2 comments · Fixed by #53547
Labels
[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended

Comments

@swissspidy
Copy link
Member

Description

When internet is turned off, you'll get an error trying connect to api.wordpress.org.

All I wanted was getting the install path.

Step-by-step reproduction instructions

  1. Turn off internet access
  2. Run wp-env install-path
  3. Get error message

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@swissspidy swissspidy added the [Tool] Env /packages/env label Jun 30, 2023
@t-hamano
Copy link
Contributor

t-hamano commented Jul 1, 2023

I was able to reproduce the problem and will leave an error log.

$ npm run wp-env install-path

> [email protected] wp-env /home/username/projects/gutenberg
> wp-env "install-path"

✖ getaddrinfo EAI_AGAIN api.wordpress.org
RequestError: getaddrinfo EAI_AGAIN api.wordpress.org
    at ClientRequest.<anonymous> (/home/username/projects/gutenberg/node_modules/got/dist/source/core/index.js:970:111)
    at Object.onceWrapper (events.js:520:26)
    at ClientRequest.emit (events.js:412:35)
    at ClientRequest.origin.emit (/home/username/projects/gutenberg/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
    at TLSSocket.socketErrorListener (_http_client.js:475:9)
    at TLSSocket.emit (events.js:400:28)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
  code: 'EAI_AGAIN',
  timings: {
    start: 1688210948625,
    socket: 1688210948625,
    lookup: 1688210958635,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1688210958636,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 10010,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 10011
    }
  }
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] wp-env: `wp-env "install-path"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] wp-env script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2023-07-01T11_29_18_659Z-debug.log

@jordesign jordesign added the [Type] Bug An existing feature does not function as intended label Jul 18, 2023
@swissspidy
Copy link
Member Author

Closing in favor of #53433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants