Skip to content

express-session fails on Node.js 26 #1173

Description

@MikeMcC399

Situation

Running citgm express-session passes on Node.js 22 & 24, and fails on Node.js 26

  1) session()
       should create multiple sessions:
     Error: read ECONNRESET
      at TCP.onStreamRead (node:internal/stream_base_commons:221:20)
Item Status
npm package https://www.npmjs.com/package/express-session
npm status active
last published 1.19.0 Jan 22, 2026
weekly downloads 4,280,987
repo location https://github.com/expressjs/session
repo last update to default branch Aug 5, 2026
repo status active
repo CI status runs in Node.js up to 25 inclusive
lookup - skip -
lookup maintainer 1 ulisesGascon

Repo CI https://github.com/expressjs/session/blob/master/.github/workflows/ci.yml runs in Node.js <=25.

Cloning the repo and running local tests using Ubuntu 26.04.1 LTS and running under Node.js 22, 24 & 26 confirm the compatibility issues for Node.js 26.

Steps to reproduce

Run https://github.com/nodejs/citgm/actions/workflows/test-module.yml

Module to test: express-session
CITGM repository to checkout: nodejs/citgm
CITGM GitHub ref to checkout: main

Result

Fails in Node.js 26:

Node.js npm macos ubuntu windows
22.23.3 10.9.9 PASS PASS PASS
24.21.0 11.19.0 PASS PASS PASS
26.10.0 11.19.1 FAIL FAIL FAIL

References

citgm/lib/lookup.json

Lines 171 to 175 in 4d3d256

"express-session": {
"prefix": "v",
"maintainers": "ulisesGascon",
"head": true
},

cc: @UlisesGascon

Activity

  1. krzysdz commented on Oct 8, 2026

    @krzysdz

    Something in supertest closed the server after the first request. Upgrading supertest to 7.3.0 fixes this problem - probably forwardemail/supertest@71dc5fb and forwardemail/supertest#891 (this mentions Node.js 26).

    Simple reproducer (fails on Node.js 26 on Linux with supertest older than 7.3.0):

    const http = require("node:http");
    const request = require("supertest");
    
    const server = http.createServer();
    server.on("request", (req, res) => res.end("hi"))
    
    request(server).get('/').expect(200, (e) => console.error(e)); // null
    request(server).get('/').expect(200, (e) => console.error(e)); // Error: read ECONNRESET
  2. MikeMcC399 commented on Oct 8, 2026

    @MikeMcC399
    ContributorAuthor

    expressjs/session#1148 has been merged related to this issue. A new release of express-session would need to follow before there is any change to the outcome of running citgm express-session.

    express-session@1.19.0 is the failing release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions