FreekBes / insta_reddit_bot

[UNMAINTAINED] A bot which pulls images from Reddit and uploads them to Instagram. Former source code of @me_irl_bot
GNU General Public License v3.0
26 stars 10 forks source link

Getting Response Error 302 - Won't login to instagram #25

Closed Smajkan closed 2 years ago

Smajkan commented 2 years ago

Hello, I am getting this error:

~/AzureFavorableStructures$ node bot.js
Initializing...
Temporary folder does not exist! Creating...
Temporary folder created.
posts.json missing! Creating...
posts.json cleared
PostsStatus initialized
Current time: 20:58
Signing in to Instagram...
Could not sign in to Instagram
IgResponseError: POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found; 
    at Request.handleResponseError (/home/runner/AzureFavorableStructures/node_modules/instagram-private-api/dist/core/request.js:125:16)
    at Request.send (/home/runner/AzureFavorableStructures/node_modules/instagram-private-api/dist/core/request.js:53:28)
    at async AccountRepository.msisdnHeaderBootstrap (/home/runner/AzureFavorableStructures/node_modules/instagram-private-api/dist/repositories/account.repository.js:251:26)
Logged in to Discord as **************

Does anyone know how to fix this?

FreekBes commented 2 years ago

Check the Instagram app or website, there's possibly a popup button you are required to click on due to a removed post or suspicious activity. Let me know if that's not the case!

Smajkan commented 2 years ago

Doesn't seem like that's an error. I was able to login successfully through the phone and the browser on instagram without any popup buttons or removed posts (this is first time I am running this bot btw.)

Smajkan commented 2 years ago

A little update on this is that it's running perfectly fine on Windows. Seems like it does have some problems with VPS?

FreekBes commented 2 years ago

Are you running it on the same network you normally log in from?

Smajkan commented 2 years ago

No, I don't and I assume that is reason why am I getting this error. Is there any way of fixing this? (Is it possible to connect from different network and login to Instagram using different network?)

FreekBes commented 2 years ago

Try stopping the bot, deleting the cookies.json file in the handlers folder, then change the seed in the settings.json file and restart the bot. This might fix your issue.

Smajkan commented 2 years ago

That was the first thing that I've done actually @FreekBes

FreekBes commented 2 years ago

Issue is described here. Seems to be a dependency issue. I suggest waiting a while before trying again (after clearing cookies as well), maybe that helps.