Skip to content

Error thrown from urllib breaks NodeJS when application making many http requests #146

@jusfeel

Description

@jusfeel

Node: v20.14.0

└─┬ [email protected]
└── [email protected]

apps/dddd/node_modules/urllib/dist/commonjs/diagnosticsChannel.js:51
        Object.defineProperty(err, symbols_js_1.default.kErrorSocket, {
               ^

TypeError: Cannot redefine property: Symbol(socket of error)
    at Function.defineProperty (<anonymous>)
    at node_net_1.Socket.destroy (/apps/dddd/node_modules/urllib/dist/commonjs/diagnosticsChannel.js:51:16)
    at connectErrorNT (node:net:1527:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v20.14.0
[nodemon] app crashed - waiting for file changes before starting...

It seems the urllib library is trying to add a non-configurable property(a Symbol property) that already exists while my server side application running other http requests.

After I disabled alipay-sdk, the error disappeared.

I am not sure if it's urllib or alipay-sdk to blame.

Apologies if it's urllib problem.

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