Skip to content

Problem with shouldUpgradeCallback #60402

@martenrichter

Description

@martenrichter

Version

Node.js v22.21.0

Platform

ubuntu-latest CI runner on github.

Subsystem

http

What steps will reproduce the bug?

My CI jobs for a project are failing with:
Webkit 26.0 (playwright build v2191) downloaded to /home/runner/.cache/ms-playwright/webkit-2191
ℹ Browser "webkit" setup complete.

bidirectional streams
node:_http_server:1076
!!server.shouldUpgradeCallback(req);
^

TypeError: server.shouldUpgradeCallback is not a function
at parserOnIncoming (node:_http_server:1076:28)
at HTTPParser.parserOnHeadersComplete (node:_http_common:122:17)

Node.js v22.21.0
🌐WebSocket connection to 'wss://127.0.0.1:37325//bidirectional_client_initiated_echo' failed: Connection terminated unexpectedly
✘ Uncaught exception happened within the page. Run with --debug.

It seems, that the default handler is not set:

  `() => server.listenerCount('upgrade') > 0`.

It comes from this recently added PR:

#59824

How often does it reproduce? Is there a required condition?

Crashes always on my CI/CD. But I will dig deeper.

What is the expected behavior? Why is that the expected behavior?

That a default handler is there.

What do you see instead?

A crash.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions