Skip to content

Tests fail on node v19 #2

Closed
Closed
@hildjj

Description

@hildjj

Symptom:

  Uncaught exception in test/index.ava.js

  TypeError: Cannot read properties of null (reading 'finishShutdown')

this is from https://github.com/nodejs/node/blob/d579bc16b3c7e587d6027f8ea7a187781d448e4f/lib/internal/js_stream_socket.js#L160:

 finishShutdown(handle, errCode) {
    // The shutdown request might already have been cancelled.
    if (this[kCurrentShutdownRequest] === null)
      return;
    const req = this[kCurrentShutdownRequest];
    this[kCurrentShutdownRequest] = null;
    handle.finishShutdown(req, errCode); // `handle` is null
  }

I think this means that we're shutting down the socket twice, but I'd argue that node should catch that and deal with it by firing an error or something, rather than crashing.

I've tried removing

this.serverSocket.push(null)
, which fixes this issue, but breaks other tests.

My current approach is to try to understand the actual flow well enough to create a small repro for the node team, then file a bug there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions