Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(h2): TypeError: Cannot read properties of null (reading 'servername') in _resume when H2 stream completes#4847

Open
hxinhan wants to merge 1 commit intonodejs:mainfrom
hxinhan:main
Open

fix(h2): TypeError: Cannot read properties of null (reading 'servername') in _resume when H2 stream completes#4847
hxinhan wants to merge 1 commit intonodejs:mainfrom
hxinhan:main

Conversation

@hxinhan
Copy link

@hxinhan hxinhan commented Mar 1, 2026

This relates to...

#4846

The fix adds null check for request to avoid the following crash

TypeError: Cannot read properties of null (reading 'servername')
    at _resume (/opt/sye/node_modules/undici/lib/dispatcher/client.js:610:79)
    at resume (/opt/sye/node_modules/undici/lib/dispatcher/client.js:561:3)
    at Client.<computed> (/opt/sye/node_modules/undici/lib/dispatcher/client.js:285:31)
    at ClientHttp2Stream.<anonymous> (/opt/sye/node_modules/undici/lib/dispatcher/client-h2.js:720:22)
    at Object.onceWrapper (node:events:638:28)
    at ClientHttp2Stream.emit (node:events:536:35)
    at endReadableNT (node:internal/streams/readable:1698:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Member

mcollina commented Mar 2, 2026

Linting is failing, can you fix it?

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.14%. Comparing base (85cde5d) to head (2370697).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4847   +/-   ##
=======================================
  Coverage   93.14%   93.14%           
=======================================
  Files         109      109           
  Lines       34239    34243    +4     
=======================================
+ Hits        31891    31895    +4     
  Misses       2348     2348           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint seems failing

@hxinhan
Copy link
Author

hxinhan commented Mar 2, 2026

Attempted to fix linting issue

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants