speccy
speccy copied to clipboard
Hangs resolving external references with NodeJS >= 12.17.0
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 https://github.com/hisco/http2-client/issues/26#issuecomment-644445967 -- 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
Addendum, root cause may be related to https://github.com/grantila/fetch-h2/issues/104 as well
- Speccy is unmaintained
- Appears to be fixed in node 14.3.x so I would expect a back port to 12.x
- See https://github.com/Mermade/oas-kit/issues/223
https://github.com/nodejs/node/pull/34859 should fix this for 12.x