sumithemmadi / truecallerjs

TruecallerJS: This is a library for retrieving phone number details using the Truecaller API.
http://truecaller.js.org/
MIT License
507 stars 105 forks source link

error with login #31

Closed mohaned2210 closed 1 year ago

mohaned2210 commented 1 year ago

when I put my number it appear the following: file:///usr/local/lib/node_modules/truecallerjs/node_modules/axios/lib/core/AxiosError.js:89 AxiosError.call(axiosError, error.message, code, config, request, response); ^ AxiosError: read ECONNRESET at AxiosError.from (file:///usr/local/lib/node_modules/truecallerjs/node_modules/axios/lib/core/AxiosError.js:89:14) at RedirectableRequest.handleRequestError (file:///usr/local/lib/node_modules/truecallerjs/node_modules/axios/lib/adapters/http.js:591:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers. (/usr/local/lib/node_modules/truecallerjs/node_modules/follow-redirects/index.js:14:24) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:496:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {

Node.js v18.13.0

sumithemmadi commented 1 year ago

The error message you provided suggests that there is an issue with the connection. The specific error "read ECONNRESET" typically indicates that the connection was terminated unexpectedly by the server or the network.

Here are a few things you can try to resolve the issue:

  1. Check your internet connection: Make sure you have a stable internet connection and there are no network issues that might be causing the connection reset.

  2. Update TruecallerJS and its dependencies: Ensure that you are using the latest version of TruecallerJS and any related dependencies. You can try updating them by running the following command in your project directory:

    npm update truecallerjs
  3. Retry the request: Sometimes the connection reset error can occur due to temporary server issues. You can retry the request after a short delay to see if it resolves the problem.

  4. Verify your input: Double-check that you are providing valid input, such as a valid phone number, in the correct format expected by the TruecallerJS library.

If none of the above steps resolve the issue, try updating nodejs version.

MouhyiHacker commented 4 months ago

Not fixx