node-http2 icon indicating copy to clipboard operation
node-http2 copied to clipboard

AssertionError: false == true

Open dinfyru opened this issue 7 years ago • 19 comments

node -v 6.9.2 [email protected]

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

dinfyru avatar Dec 23 '16 07:12 dinfyru

Getting the same issue: Node v6.7.0 [email protected]

assert.js:85
  throw new assert.AssertionError({
  ^
AssertionError: false == true
    at Connection._send (/Users/dchen/Workbench/poc.http2-client-server/node_modules/http2/lib/protocol/connection.js:326:9)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)

My server:

const server = http2.createServer({
  key: fs.readFileSync(path.join(__dirname, '/server.key')),
  cert: fs.readFileSync(path.join(__dirname, '/server.crt')),
}, onRequest);

My client:

const options = {
    hostname: config.get("http2.hostname"),
    port: config.get("http2.port"),
    path: '/twolargeframes',
    method: 'GET',
    key: fs.readFileSync('./server.key'),
    ca: fs.readFileSync('./server.crt'),
};
http2.request(options)

mutaphore avatar Jan 01 '17 18:01 mutaphore

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)

mattisx avatar Jan 10 '17 09:01 mattisx

+1

taina0407 avatar Feb 05 '17 11:02 taina0407

+1

sbeff avatar Feb 05 '17 11:02 sbeff

+1

IsaiahJTurner avatar Feb 06 '17 00:02 IsaiahJTurner

+1

davidbnk avatar Feb 08 '17 00:02 davidbnk

+1

mihai-iorga avatar Feb 09 '17 11:02 mihai-iorga

@molnarg Pls.

zliebersbach avatar Feb 12 '17 10:02 zliebersbach

+1

mihai-iorga avatar Feb 15 '17 07:02 mihai-iorga

+1

axmav avatar Feb 19 '17 18:02 axmav

+1

divydeep avatar Feb 19 '17 23:02 divydeep

+1

virgafox avatar Feb 20 '17 18:02 virgafox

@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;

thughes avatar Feb 22 '17 17:02 thughes

+1

AppleTechy avatar Mar 02 '17 00:03 AppleTechy

+1

bbcelly avatar Mar 06 '17 19:03 bbcelly

+1

raviten avatar Apr 04 '17 13:04 raviten

+1

Arpita avatar Apr 14 '17 17:04 Arpita

+1

5nyper avatar May 02 '17 03:05 5nyper

same problem.

Nick-Hu1993 avatar Apr 04 '18 06:04 Nick-Hu1993