alipay / alipay/alipay-sdk-nodejs-all

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

未关闭
#146 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
460
派生
73
PR 合并指标
30 天内没有已合并 PR

描述

Node: v20.14.0

└─┬ alipay-sdk@4.11.0
└── urllib@3.25.1

```
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 ()
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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。