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

Fix support for node 11.1 and above #13

Merged
merged 2 commits into from
Mar 25, 2020
Merged

Conversation

Cellule
Copy link
Contributor

@Cellule Cellule commented Dec 10, 2019

Fixes #6

Took a stab at trying to fix onread support for node 11.1 and above.
Looked at https://github.com/nodejs/node/blob/v11.1.0/lib/internal/stream_base_commons.js#L111 to figure out how to pass nread
Confirmed on master https://github.com/nodejs/node/blob/master/lib/internal/stream_base_commons.js#L163 that the implement hasn't changed since then


This change is Reviewable

@mathieumg
Copy link

mathieumg commented Dec 10, 2019

Related: #7 and #12

@matthewmeyer
Copy link

Yay! can we get a release?

@ovasylenko
Copy link

Yeap. Looking forward to release

@leonardocartaxo
Copy link

Has this fix been released? I'm just ran into this error.

not on the last version 4.0.1

@leonardocartaxo
Copy link

We need this fix asp, please. We are struggling with this error for months.

@abhinavsingi
Copy link

When will this be released?
As per my understanding w/o this spdy is not supported on node@12 ?

@juliendoyon
Copy link

Is there any date scheduled to release this fix?

@aaclayton
Copy link

Please merge!

@pgowdy1
Copy link

pgowdy1 commented Mar 2, 2020

I just want to echo what aaclayton said. Please, please merge this fix.

@HelmerBarcos
Copy link

HelmerBarcos commented Mar 11, 2020

@daviddias @jacobheun What about this PR for adding http2 support to node 12 LTS ??

@Cellule
Copy link
Contributor Author

Cellule commented Mar 17, 2020

Since this doesn't seem to be getting merged anytime soon, I thought I'd share my patch
https://gist.github.com/Cellule/91c77e67b6edc640934a492fcba67239
You can install that patch using patch-package

Copy link
Collaborator

@indutny indutny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@indutny indutny merged commit dd2de6b into spdy-http2:master Mar 25, 2020
@indutny
Copy link
Collaborator

indutny commented Mar 25, 2020

Published as 2.0.1

@aphix
Copy link

aphix commented Mar 26, 2020

Published as 2.0.1

Many Thanks, @indutny!

@adityashukla74
Copy link

It still fails on node 12 in mid-Sept 2020.

@leonardocartaxo
Copy link

Works for me in node 14. Update to the last version and it should be working fine

@aphix
Copy link

aphix commented Sep 18, 2020

@adityashukla74 Make sure you've cleared node_modules and reinstalled, double check your package lock and ensure that handle-thing is >= 2.0.1 and it should work, however ensure you test it locally (by spamming refresh or something to create/kill some reqs before they can complete) before going to prod with newer versions of v12 due to this (unrelated) issue:

spdy-http2/node-spdy#369

Hopefully this patch to handle-thing will be merged soon to resolve it:

#16

@adityashukla74
Copy link

adityashukla74 commented Sep 21, 2020

@aphix I tried with Node v12.13.0 LTS.
Steps followed-
node_modules removed, npm cache clean, removed package-lock.json, mentioned "spdy": "^4.0.2", and "handle-thing": "^2.0.1", in package.json, reinstalled the packages and restarted build

webpack: Compiled successfully.
(node:59063) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use node --trace-deprecation ... to show where the warning was created)
internal/buffer.js:945
class FastBuffer extends Uint8Array {}
^

RangeError: Invalid typed array length: -4095
at new Uint8Array ()
at new FastBuffer (internal/buffer.js:945:1)
at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:185:19)
at Stream. (node_modules/webpack-dev-server/node_modules/handle-thing/lib/handle.js:120:12)
at Stream.emit (events.js:327:22)
at endReadableNT (node_modules/webpack-dev-server/node_modules/readable-stream/lib/_stream_readable.js:1010:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! web@2.65.1-0 start: ./scripts/server.sh "--https"
npm ERR! Exit status 1
npm ERR!
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Stopping proxy

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/adityashukla/.npm/_logs/2020-09-21T06_30_49_478Z-debug.log

@aphix
Copy link

aphix commented Sep 23, 2020

That's a different issue @adityashukla74 -- also I've looked further and that solution isn't viable in either case.

That sounds like this package using something not available to your webpack build and far outside the scope of this package.

I think you might be using a wrong tool for a job somewhere, good luck.

@aphix
Copy link

aphix commented Sep 23, 2020

that does look like the old error though... what are the outputs of node -v && npm -v , @adityashukla74?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

node 11.1.0 onStreamRead params have changed