-
Notifications
You must be signed in to change notification settings - Fork 196
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
SPDY fails in node >= 11.1.0 #350
Comments
We've upgraded spdy to work with node LTS version (6,8,10). This is due to a recent stream change in node 11.1. Handle thing will need to be updated spdy-http2/handle-thing#6. I did some quick updates to onread to see if I could resolve the problem for the handle-thing 2.0.0 release, but there are other internal stream changes that will need to be taken into account. Read is leveraging the internal stream state, so we'll need to make sure handle thing is managing that as needed. |
I appreciate Your change, warm welcome and thank You so much! |
Dear Jacob,
Many-many thanks for Your update. I appreciate Your hard work, quick reply,
I wish You the best!
Have a nice night!
Best regards,
Bela
Jacob Heun <[email protected]> ezt írta (időpont: 2018. nov. 8., Cs,
11:05):
… We've upgraded spdy to work with node LTS version (6,8,10). This is due to
a recent stream change in node 11.1. Handle thing will need to be updated
spdy-http2/handle-thing#6
<spdy-http2/handle-thing#6>.
I did some quick updates to onread to see if I could resolve the problem
for the handle-thing 2.0.0 release, but there are other internal stream
changes that will need to be taken into account. Read is leveraging the
internal stream state, so we'll need to make sure handle thing is managing
that as needed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvj70Ak5SI8gSJrYwJ33ojYqSM3cYUks5utAH7gaJpZM4YNQkE>
.
|
hello, thanks! |
Hi,
You are correct! Apologize, I closed this issue without deep check of
compatibility with Node 11.1.0 version, my mistake, sorry for that.
I see, further fixes are required. In order to eliminate the current error
message, I have changed two lines in handle.js (version 2.0.0) file:
1. line #88: self.onread(uv.UV_EOF, Buffer.alloc(0)) TO self.onread(
Buffer.alloc(0))
2. line #94: self.onread(uv.UV_ECONNRESET, Buffer.alloc(0)) TO self.
onread(Buffer.alloc(0))
I don't know how to reopen this issue, may open a new one? What do You
think?
Best regards,
Bela
patrikx3 <[email protected]> ezt írta (időpont: 2018. nov. 10., Szo,
10:07):
… hello,
how are ya? i am not understanding why this bug is closed, when it is not
resolved,? we always using the current node version. could you please tell
me what is going on? are we waiting for an upstream package to be fixed?
thanks!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvj_56upWFFVV6YngyIlzn7JqhdhOVks5utpdqgaJpZM4YNQkE>
.
|
Dear Jacob,
You are correct! Apologize, I closed this issue without deep check of
compatibility with Node 11.1.0 version, my mistake, sorry for that.
I see, further fixes are required. In order to eliminate the current error
message, I have changed two lines in handle.js (version 2.0.0) file:
1. line #88: self.onread(uv.UV_EOF, Buffer.alloc(0)) TO self.onread(
Buffer.alloc(0))
2. line #94: self.onread(uv.UV_ECONNRESET, Buffer.alloc(0)) TO self.
onread(Buffer.alloc(0))
I don't know how to reopen this issue, may open a new one? What do You
think?
Best regards,
Bela
Jacob Heun <[email protected]> ezt írta (időpont: 2018. nov. 8., Cs,
11:05):
… We've upgraded spdy to work with node LTS version (6,8,10). This is due to
a recent stream change in node 11.1. Handle thing will need to be updated
spdy-http2/handle-thing#6
<spdy-http2/handle-thing#6>.
I did some quick updates to onread to see if I could resolve the problem
for the handle-thing 2.0.0 release, but there are other internal stream
changes that will need to be taken into account. Read is leveraging the
internal stream state, so we'll need to make sure handle thing is managing
that as needed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvj70Ak5SI8gSJrYwJ33ojYqSM3cYUks5utAH7gaJpZM4YNQkE>
.
|
Yes, this is still an issue with handle-thing and is being tracked here: spdy-http2/handle-thing#6. The most recent update I did was to get everything working on LTS first. Reopening this. |
Thanks again! Do You reopening or me to do it somehow?
Jacob Heun <[email protected]> ezt írta (időpont: 2018. nov. 11., V,
14:20):
… Yes, this is still an issue with handle-thing and is being tracked here:
spdy-http2/handle-thing#6
<spdy-http2/handle-thing#6>. The most recent
update I did was to get everything working on LTS first.
Reopening this.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvjysztwVcfdbCawV45PPjvcXElipQks5uuCQggaJpZM4YNQkE>
.
|
I've reopened the issue. I'm not sure when I will have time to fix >=11.1.0 support, but I am happy to review any PRs submitted if someone beats me to it! |
:-) I don not want to beat You, never ever :-)
I'm thankful for Your help!
Jacob Heun <[email protected]> ezt írta (időpont: 2018. nov. 11., V,
14:38):
… I've reopened the issue. I'm not sure when I will have time to fix
>=11.1.0 support, but I am happy to review any PRs submitted if someone
beats me to it!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvj5-VwzxTtxNUl89Qa-6i-ULRxJyzks5uuCg8gaJpZM4YNQkE>
.
|
@bhevesi so are you gonna create a PR to fix this bug or should I do it? Just have to change these 2 lines? |
Not necessary, Jacob Heun knows it and working on fix the issue. Thanks a
lot!
patrikx3 <[email protected]> ezt írta (időpont: 2018. nov. 11., V,
14:51):
… @bhevesi <https://github.com/bhevesi> so are you gonna create a PR to fix
this bug or should I do it? Just have to change these 2 lines?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvj0NV6U5_NJZJZLQ7W83lJt-zZcdIks5uuCtHgaJpZM4YNQkE>
.
|
jacobheun says he is not sure when he gonna fix this. |
Couple of minutes ago I changed a few mails with him. The issue has been
reopened. Jacob knows my changes to eliminate this issue. So I hope the
final solution is not so far.
Is it OK for You?
patrikx3 <[email protected]> ezt írta (időpont: 2018. nov. 11., V,
15:02):
… jacobheun says he is not sure when he gonna fix this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvj6rdEE3riXqFtQIw3aa9tTF_Ylwyks5uuC4RgaJpZM4YNQkE>
.
|
Ok, i hang on then. Thanks |
I would like to thanks for You!
patrikx3 <[email protected]> ezt írta (időpont: 2018. nov. 11., V,
15:09):
… Ok, i hang on then. Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNvjyCLXIboysTRPaKFcq9tdMCowqtjks5uuC-sgaJpZM4YNQkE>
.
|
Sorry if there's confusion here, bu @p3x-robot is correct, I am not sure when I will get to this. There is more that needs to change aside from those 2 lines. We'll need to do some node version checking, and fix other issues. If I do start working on this, I will post an update here. |
@jacobheun so what does we have to do eg:
|
I'm not certain on the full changes needed, I didn't have enough time to dive into it, but just changing those lines still fails tests on node 11.1. |
so basically the 2 lines make it to work and then tests failed only, right? since the guy said if we change the 2 lines it works, and then only the tests should be fixed is that correct? |
No, the tests should not need to be touched. There is more code that needs to be updated in order to get the tests passing in both the handle-thing and node-spdy repos. |
so you have no idea when it can be fixed in the current release nodejs? |
In order to understand what needs to be fixed in I would start at those changes and then work to replicate the needed changes in I haven't had time to dive into the node changes, which is why I'm not certain of the full extent of changes needed. |
Ok, but I checked the code and it is exactly the 2 lines changed. The signature of those functions changed. The signature is 1 parameter now and all we need to do is to check the Node version and if it is SEMVER CHECK >= NodeJs V11.1.0, then the parameter is different. |
@jacobheun given spdy is using heavy internal functions which is bad, can't we just use the native http2 as it is in the latest nodejs since v10? |
I agree with @addaleax, if you can upgrade your applications to use http2 that's the way to go. The SPDY protocol has been deprecated in favor of http2. It doesn't make much sense to rework this module to improve long term maintainability with http2 out, and http3 likely happening sometime next year. Personally I'd rather see ongoing efforts here focused on maintenance/support for node (6-10) and a migration guide to http2 for node 11+. |
i solved it with pure http and used nginx as the proxy using http2, i think the fastest http2 solution (nodejs http2 is quite slow) |
@jacobheun Thank you very much. |
I was facing the same issue. For a quick solution . I just downgraded node. |
This solves the following issue: spdy-http2/node-spdy#350
@p3x-robot do you have sample code to in nginx to enable |
@tomalex0 sorry, i do not use http2 push, i use socket.io ... |
Seems to not working under node versions over 11.1.0 because of spdy bug: spdy-http2/node-spdy#350 Tested to work on node v10.16.3 Previous commits should work too (under node versions prior to 11.1.0). Code were ported from a working project and there is no reason for it to fail. This commit only improves error handling and completes documentation.
The necessary change has been reviewed and merged in the upstream The next step is to use the new handle-thing |
This issue comes from oct/2018 and we are in midle of 2020. Please don't wait and merge handle-thing 201 into spdy. A lot of users will be glad. |
after bumping |
It didn't work for me, even with a deeper number. I have an old project and I didn't want to delete What I did: I went in |
when you perform these steps, does if you dont want to remove the entire also, what is your version of |
If by "these steps" you mean the steps I described, then the answer is Yes.
I don't have
I manually updated it.
No.
No need as my workaround did the trick.
It's currently 6.14.4, but this project is 2 or 3 years old, so I don't know which version I used at that time to install It's all good now anyway! Thanks. |
It looks like this issue was closed by a95ca58. But looking at the package.json diff, it's still using |
The package.json has In the commit you linked, this can be seen in diff in the package-lock.json here: What package manager are you using? I've tested and it's working fine with both Edit: Here's a screenshot to the package-lock.json diff since github doesn't like to auto-expand to large diffs: |
Hi,
Couple of short investigation, why SPDY drop error message
//-------------------------------------------------------------------------------------------------------
buffer.js:72
class FastBuffer extends Uint8Array {}
^
RangeError: Invalid typed array length: -104
at new Uint8Array ()
at new FastBuffer (buffer.js:72:1)
at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:121:17)
at Immediate. (/home/bhevesi/node_modules/handle-thing/lib/handle.js:128:16)
at processImmediate (timers.js:632:19)
//-------------------------------------------------------------------------------------------------------
using new version (11) of node.js.
I found that node internal/stream_base_commons.js has been changed in new version but the SPDY dependency ("handle-thing": "^1.2.5") is not properly call it in /lib/handles.js file.
In Node, function onStreamRead(arrayBuffer) called from handles.js via self.onread(uv.UV_EOF, new Buffer(0)) and self.onread(uv.UV_ECONNRESET, new Buffer(0)). So the given two parameters (instead of one) generates error.
In order to eliminate these errors, I had some changes in /lib/handles.js file:
Replaced "self.onread(uv.UV_EOF, new Buffer(0))" to self.onread(new Buffer(0)) and self.onread(uv.UV_ECONNRESET, new Buffer(0)) to self.onread(new Buffer(0))
Looks errors are disappears but more deep investigation required or/and live maintenance of "handle-thing": "^1.2.5" module
Best regards:
Bela
The text was updated successfully, but these errors were encountered: