Skip to content

Hangs resolving external references with NodeJS >= 12.17.0 #422

New issue

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

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

Already on GitHub? # to your account

Open
mgabeler-lee-6rs opened this issue Jun 15, 2020 · 3 comments
Open

Hangs resolving external references with NodeJS >= 12.17.0 #422

mgabeler-lee-6rs opened this issue Jun 15, 2020 · 3 comments

Comments

@mgabeler-lee-6rs
Copy link

Detailed description

When running with NodeJS 12.17.0 or higher, speccy (esp. speccy lint) hangs when attempting to resolve external resources that come over HTTP/2.

Context

This renders speccy unusable by my team in our efforts to track NodeJS LTS releases.

I believe this is caused by hisco/http2-client#26 (comment) -- not strictly speccy's fault, but speccy is dramatically affected.

Possible implementation

Not sure if speccy folks could help fix this issue in the underlying libraries, or adjust to a different HTTP/2 client library

Your environment

  • Node Version: 12.x (via nodenv)
  • Operating system and version: Linux (Debian) and macOS (various recent releases)

Demo file: note that the fact that the referenced URL is a 404 doesn't matter, because the nature of this bug is such that speccy and its dependencies never see the response anyways. It does matter that example.com serves HTTP/2.

openapi: 3.0.2
components:
  x:
    $ref: 'https://example.com/invalid.yaml'

Install node 12.17.0 or higher and just run npx speccy lint --verbose demo.yaml, or to see the full trace details, NODE_OPTIONS=--trace-tls NODE_DEBUG='*' npx speccy lint --verbose demo.yaml

@mgabeler-lee-6rs
Copy link
Author

Addendum, root cause may be related to grantila/fetch-h2#104 as well

@MikeRalphson
Copy link
Contributor

  1. Speccy is unmaintained
  2. Appears to be fixed in node 14.3.x so I would expect a back port to 12.x
  3. See http2 tests fail on node 14.1.0 Mermade/oas-kit#223

@mgabeler-lee-6rs
Copy link
Author

nodejs/node#34859 should fix this for 12.x

MoritzStueber added a commit to UdSAES/simaas-api that referenced this issue Apr 3, 2021
See wework/speccy#422; upgrading to Node 14 
solves this. Reverts cb1ac17.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants