Skip to content

express-session fails on Node.js 26 #1173

Closed
expressjs/session
#1148

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.

  3. MikeMcC399 commented on Oct 18, 2026

    @MikeMcC399
    ContributorAuthor

    Updated tests results show that citgm now passes for Node.js 26 on macos and ubuntu.
    Testing is done using HEAD, so no new release was needed.

    Node.js npm macos ubuntu windows
    22.23.3 10.9.9 PASS PASS FAIL
    24.21.0 11.19.0 PASS PASS FAIL
    26.12.0 11.20.0 PASS PASS FAIL
  4. MikeMcC399 commented on Oct 18, 2026

    @MikeMcC399
    ContributorAuthor

    Testing fails on Windows, as described in #1095

    error:                     | > express-session@1.19.0 test
    error:                     | > ./test/support/gencert.sh && mocha --require test/support/env --check-leaks --no-exit --reporter spec test/
    error:                     |
    error:                     |
    error:                     | '.' is not recognized as an internal or external command,
    error:                     | operable program or batch file.

    The repo is not currently compatible with testing on Windows, and so win32 should be skipped in citgm.

  5. MikeMcC399 commented on Oct 18, 2026

    @MikeMcC399
    ContributorAuthor

    Closing, since Node.js 26 is now fixed for express-session

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