node-http2: AssertionError: false == true

node -v 6.9.2 http2@3.3.6

Debug: internal, implementation, error
    AssertionError: false == true
    at Connection._send (/var/www/revizor-game.ru/node_modules/http2/lib/protocol/connection.js:326:9)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

My server.js

$lib.s = new Hapi.Server();
var listener = http2.createServer({
    key: fs.readFileSync('/var/www/revizor-game.ru.key', 'utf8'),
    cert: fs.readFileSync('/var/www/ca.crt', 'utf8'),
    pfx: fs.readFileSync('/var/www/pfx.pfx')
});

$lib.s.connection({
    listener: listener,
    host: 'revizor-game.ru',
    port: 443,
    tls: true
});

and boot.js (clustering) - http://pastebin.com/YzGsJVUk

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Reactions: 5
  • Comments: 19

Commits related to this issue

Most upvoted comments

Getting this as well with node-apn:

Node version: 6.9.1

AssertionError: false == true
at Connection._send (.../node_modules/http2/lib/protocol/connection.js:343:9)

@nwgh Also have seen this assert when running node-http2 with node-apn: https://github.com/molnarg/node-http2/blob/master/lib/protocol/connection.js#L326

Looking at the call to this.push where moreNeeded is set, I’m not sure that the assert makes sense as written:

var moreNeeded = this.push(frame);

Here’s the code for push: https://github.com/molnarg/node-http2/blob/master/lib/protocol/flow.js#L277

In the case where this._push(frame) returns null (i.e., the frame is too large for the window and split or the window size is <=0), moreNeeded will be set to null. Then this._queue.push(frame) is called, but moreNeeded is still null. Thus, any time the window is <=0 or the frame is split we’ll hit this assert.

  var moreNeeded = null;
  if (this._queue.length === 0) {
    moreNeeded = this._push(frame);
  }

  if (moreNeeded === null) {
    this._queue.push(frame);
  }

  return moreNeeded;