breuerfelix / jinsta

javascript + instagram + algorithms
MIT License
60 stars 13 forks source link

Getting login_required after login #61

Closed imkimchi closed 4 years ago

imkimchi commented 4 years ago

I've tried jinsta -u username -p password -w ./jinsta_data and I get

? Enter sms / email code: 402138
info:    starting with timeline feed
(node:22695) UnhandledPromiseRejectionWarning: IgLoginRequiredError: GET /api/v1/fbsearch/suggested_searches/?type=users - 403 Forbidden; login_required
    at Request.handleResponseError (/home/imkimchi/.nvm/versions/node/v11.13.0/lib/node_modules/jinsta/node_modules/instagram-private-api/dist/core/request.js:93:24)
    at Request.send (/home/imkimchi/.nvm/versions/node/v11.13.0/lib/node_modules/jinsta/node_modules/instagram-private-api/dist/core/request.js:49:28)
(node:22695) 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(). (rejection id: 1)
(node:22695) [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.
(node:22695) UnhandledPromiseRejectionWarning: IgLoginRequiredError: POST /api/v1/feed/timeline/ - 403 Forbidden; login_required
    at Request.handleResponseError (/home/imkimchi/.nvm/versions/node/v11.13.0/lib/node_modules/jinsta/node_modules/instagram-private-api/dist/core/request.js:93:24)
    at Request.send (/home/imkimchi/.nvm/versions/node/v11.13.0/lib/node_modules/jinsta/node_modules/instagram-private-api/dist/core/request.js:49:28)
(node:22695) 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(). (rejection id: 2)

tried multiple times deleting cookies and stuffs but still not working! any ideas?

vinivst commented 4 years ago

Same here.

node index.js
info:    session expired, going for relogin
info:    starting with timeline feed
(node:10936) UnhandledPromiseRejectionWarning: IgLoginRequiredError: POST /api/v1/feed/timeline/ - 403 Forbidden; login_required
    at Request.handleResponseError (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\core\request.js:93:24)
    at Request.send (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\core\request.js:49:28)
    at async TimelineFeed.request (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\feeds\timeline.feed.js:59:26)
From previous event:
    at processImmediate (internal/timers.js:439:21)
From previous event:
    at Function.executeRequestsFlow (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\services\simulate.service.js:49:24)
    at SimulateService.postLoginFlow (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\services\simulate.service.js:59:32)
    at login (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\jinsta\dist\session.js:140:19)
    at runNextTicks (internal/process/task_queues.js:58:5)
    at processImmediate (internal/timers.js:412:9)
(node:10936) 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(). (rejection id: 1)
(node:10936) [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.
(node:10936) UnhandledPromiseRejectionWarning: IgLoginRequiredError: POST /api/v1/feed/timeline/ - 403 Forbidden; login_required
    at Request.handleResponseError (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\core\request.js:93:24)
    at Request.send (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\core\request.js:49:28)
    at async TimelineFeed.request (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\feeds\timeline.feed.js:59:26)
    at async TimelineFeed.items (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\instagram-private-api\dist\feeds\timeline.feed.js:74:26)
    at async mediaFeed (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\jinsta\dist\features\utils.js:24:19)
    at async timeline (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\jinsta\dist\features\timeline.js:31:10)
    at async run (C:\Users\viniciussantiago\Documents\jinstabot\node_modules\jinsta\dist\main.js:56:5)
(node:10936) 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(). (rejection id: 2)

------------- EDIT ----------

Ok, just got it to work, as @breuerfelix said in https://github.com/breuerfelix/jinsta/issues/29#issuecomment-544458213_ :

if the mentioned PR is merged, try the following:

run jinsta with jinsta -r -s my_seed -u bla -p bla if you use advanced config set config.reset = true and config.seed = 'my_seed' try if it works :) you have to use -r or config.reset only if you choose a new seed key because this means to reset the old session and generate a new one

if it does work out, try to get the value when you experience a block. if it is 30 for example, run the bot twice a day with a limit of 20 and increment this each day by 2 to 5 and see if you hit the limit again

try to reuse your old seed keys from time to time and increase their limit aswell, i would like to know if instagram saves the device id with the interaction limit

I just added to my code those following lines:

config.reset = true;
config.seed = '123456';

And now it's working. I'm using advanced mode to start.

Hope it helps.

imkimchi commented 4 years ago

yuup changing seed actually worked!

breuerfelix commented 4 years ago

i dont know why this really happened... but good to know that changing the seed is working :)