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

AssertionError: Frame too large! in Node 6.3.0 when sending more than 2^14 bytes at once #207

Closed
bjb568 opened this issue Jul 9, 2016 · 2 comments

Comments

@bjb568
Copy link

bjb568 commented Jul 9, 2016

Using Node 6.3.0, this works:

let str = 'a';
for (let i = 0; i < 14; i++) str += str;
res.end(str);

But making it res.end(str + 'a'); makes it throw:

assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: Frame too large!
    at Serializer._transform (/Users/me/afolder/myproject/node_modules/http2/lib/protocol/framer.js:46:3)
    at Serializer.Transform._read (_stream_transform.js:167:10)
    at Serializer.Transform._write (_stream_transform.js:155:12)
    at doWrite (_stream_writable.js:307:12)
    at writeOrBuffer (_stream_writable.js:293:5)
    at Serializer.Writable.write (_stream_writable.js:220:11)
    at Compressor.ondata (_stream_readable.js:556:20)
    at emitOne (events.js:96:13)
    at Compressor.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:177:18)

In Node 6.2.1 res.end(str + 'a'); works.

@bjb568 bjb568 changed the title AssertionError: Frame too large! in Node 6.3.0 when sending more than 2^16 bytes at once AssertionError: Frame too large! in Node 6.3.0 when sending more than 2^14 bytes at once Jul 9, 2016
@nwgh
Copy link
Collaborator

nwgh commented Aug 2, 2016

What happens if you do res.end(str + 'aa') with node 6.3.0? What about newer versions of node (6.3.1 is available, for instance)? Normally I would say this sounds like an off-by-one error in node-http2, but given it works on some versions of node and not on others, I'm more suspicious.

@nwgh nwgh added the needinfo label Aug 2, 2016
@nwgh nwgh modified the milestone: v3.3.5 Aug 2, 2016
@bjb568
Copy link
Author

bjb568 commented Aug 2, 2016

res.end(str + 'aa') or any other string with more than 2^14 characters breaks on both 6.3.0 and 6.3.1.

@nwgh nwgh closed this as completed in ba87b52 Sep 6, 2016
mcmanus pushed a commit to mcmanus/node-http2 that referenced this issue Apr 3, 2017
I'm honestly not sure why this EVER worked - we were never limiting DATA
frames to anything less than the flow control window. This fixes that to
take into account the (default) max allowed payload size.

Tested and works fine for me with node 6.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants