Skip to content

The stream has been destroyed - ERR_HTTP2_INVALID_STREAM #1494

@ziimakc

Description

@ziimakc

If you will push F5 in browser few times fast, you will get this error:

fastify errorHandler
    err: {
      "type": "NodeError",
      "message": "The stream has been destroyed",
      "stack":
          Error [ERR_HTTP2_INVALID_STREAM]: The stream has been destroyed
              at Http2ServerResponse.writeHead (internal/http2/compat.js:567:13)
              at onSendEnd (D:\apps\node_modules\fastify\lib\reply.js:308:7)
              at onSendHook (D:\apps\node_modules\fastify\lib\reply.js:261:5)
              at preserializeHookEnd (D:\apps\node_modules\fastify\lib\reply.js:247:3)
              at preserializeHook (D:\apps\node_modules\fastify\lib\reply.js:234:5)
              at _Reply.Reply.send (D:\apps\node_modules\fastify\lib\reply.js:133:5)
              at Object.handler (D:\apps\backend\api\with_session\reader.js:14:11)
              at processTicksAndRejections (internal/process/next_tick.js:81:5)
    }

Expected behavior

There should be no logged errors.

Your Environment

  • node version: 11.9.0
  • fastify version: >=2.0.0
  • os: Windows

Is there a way to skip this error?

Metadata

Metadata

Assignees

Labels

bugConfirmed bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions