Closed liuyan345 closed 1 year ago
I got the same issue
(node:25308) UnhandledPromiseRejectionWarning: Error: read ECONNRESET
at Function.AxiosError.from (C:\www\tiktok-signature\node_modules\axios\dist\node\axios.cjs:785:14)
at RedirectableRequest.handleRequestError (C:\www\tiktok-signature\node_modules\axios\dist\node\axios.cjs:2733:25)
at RedirectableRequest.emit (events.js:400:28)
at ClientRequest.eventHandlers.node --trace-warnings ...
to show where the warning was created)
(node:25308) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:25308) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I got the same issue
(node:25308) UnhandledPromiseRejectionWarning: Error: read ECONNRESET at Function.AxiosError.from (C:\www\tiktok-signature\node_modules\axios\dist\node\axios.cjs:785:14) at RedirectableRequest.handleRequestError (C:\www\tiktok-signature\node_modules\axios\dist\node\axios.cjs:2733:25) at RedirectableRequest.emit (events.js:400:28) at ClientRequest.eventHandlers. (C:\www\tiktok-signature\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (events.js:400:28) at TLSSocket.socketErrorListener (_http_client.js:475:9) at TLSSocket.emit (events.js:400:28) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) (Use
node --trace-warnings ...
to show where the warning was created) (node:25308) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:25308) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I guess the parameters are missing in headers
async function testApiReq({ userAgent, xTtParams }, url) { const options = { method: "GET", headers: { "user-agent": userAgent, "x-tt-params": xTtParams, // "Accept-Encoding": "gzip,deflate,compress" }, url: url, }; return axios(options); }
how to slove it?please
[www@iZj6c54tyfku56hcsa905bZ happytokAdmin]$ node tiktok-signature/examples/user-info.js
/data/www/happytokAdmin/tiktok-signature/node_modules/axios/dist/node/axios.cjs:785 AxiosError.call(axiosError, error.message, code, config, request, response); ^ AxiosError: read ETIMEDOUT at Function.AxiosError.from (/data/www/happytokAdmin/tiktok-signature/node_modules/axios/dist/node/axios.cjs:785:14) at RedirectableRequest.handleRequestError (/data/www/happytokAdmin/tiktok-signature/node_modules/axios/dist/node/axios.cjs:2733:25) at RedirectableRequest.emit (node:events:527:28) at ClientRequest.eventHandlers. (/data/www/happytokAdmin/tiktok-signature/node_modules/follow-redirects/index.js:14:24)
at ClientRequest.emit (node:events:527:28)
at TLSSocket.socketErrorListener (node:_http_client:454:9)
at TLSSocket.emit (node:events:527:28)
at emitErrorNT (node:internal/streams/destroy:164:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
syscall: 'read',
code: 'ETIMEDOUT',
errno: -110,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},