sumithemmadi / truecallerjs

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

Unable to login, with both file and otp #14

Closed maleeqB closed 1 year ago

maleeqB commented 1 year ago

When I tried to login with file

$ truecallerjs login ./my-truecaller-data-1671312322082.json

I receive the error:

TypeError: Cannot read properties of undefined (reading 'installations')
    at start_truecallerjs (/usr/lib/node_modules/truecallerjs/bin/index.js:425:42)
    at Object.<anonymous> (/usr/lib/node_modules/truecallerjs/bin/index.js:612:1)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47

When I tried otp method, I have same problem with issue n7

sumithemmadi commented 1 year ago

might be you have edited this ./my-truecaller-data-1671312322082.json send me contents of file by replacing all your details with XXXX

maleeqB commented 1 year ago

This is the content of the json file:

{ "userId":xxx, "ip": "xxxx", "userCountryCode": "FR", "applicationName": "Truecaller Web", "oauthId": "xxxx", "provider": "google", "createdAt": 1670079259981, "updatedAt": 1671312322082}

sumithemmadi commented 1 year ago

That is not a valid json file

maleeqB commented 1 year ago

Not a valid truecaller file or not a valid json file?

If the latter is the case, then how is that?

That's what I downloaded from my truecaller dashboard, and that's literally a valid JSON

I only added XXXX in place of details

sumithemmadi commented 1 year ago

sorry , not a valid truecaller json file

follow below steps to download correct file

https://github.com/sumithemmadi/truecallerjs#login

maleeqB commented 1 year ago

Ok thanks