Skip to content

Cannot make a node-fetch request, TypeError: Cannot read property 'Symbol(requestOptions)' of undefined #36364

Closed
@seven-deuce

Description

@seven-deuce
  • Version: 14.15.1
  • Platform: MINGW64_NT-10.0-17763 DESKTOP-GJB54B0 3.0.7-338.x86_64 2019-04-30 21:52 UTC x86_64 Msys
  • Subsystem:

What steps will reproduce the bug?

Any call to foreign api, using a trusted library like "node-fetch", creates error and crash servers, on versions higher than 12.18
Here is the error:

_http_agent.js:444
      options = req[kRequestOptions];
                   ^

TypeError: Cannot read property 'Symbol(requestOptions)' of undefined
    at Agent.removeSocket (_http_agent.js:444:20)
    at TLSSocket.onClose (_http_agent.js:371:11)
    at TLSSocket.emit (events.js:327:22)
    at net.js:673:12
    at TCP.done (_tls_wrap.js:563:7)

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

All the time, not in version 12.18 or lower

What is the expected behavior?

a normal fetch, returning the result from any api, mostly a json

What do you see instead?

app crashes!

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions