question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`preLoginFlow()`: POST .../msisdn_header_bootstrap/ - 302 Found

See original GitHub issue

Bug Report

Form

Requirements

  • I’ve searched the Issues
  • I’ve read the basic concepts
  • I’m using the latest version
  • I’ve debugged my code using the DEBUG variable.

Platform

  • I’m using Node.js version 15.8.0

Description

When I run my app, the login method (see below) is executed. Unfortunately, this fails with the error POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found.
To find the problematic part in my code, I attached catch statements to the respective method calls. As it turned out, it is the method preLoginFlow() that throws the said error.

Code

async function login(username, password) {
    try {
        await ig.simulate.preLoginFlow();
        await ig.account.login(username, password);
        process.nextTick(() => ig.simulate.postLoginFlow());
        return true;
    } catch (error) {
        console.error('login =>', error.message);
        return false;
    }
}

Error and Output

> DEBUG='ig:*' node server.js

{"level": "info", "timestamp": "2021-04-23T06:25:21.796Z", "message": "Api running on port 3001"}
  ig:request Requesting POST /api/v1/attribution/log_attribution/ +0ms
  ig:request Requesting POST /api/v1/launcher/sync/ +2s
  ig:request Requesting POST /api/v1/accounts/read_msisdn_header/ +317ms
  ig:state Could not find ds_user_id +0ms
  ig:request Requesting POST /api/v1/qe/sync/ +458ms
  ig:request Requesting POST /api/v1/accounts/msisdn_header_bootstrap/ +461ms
  ig:request Request POST /api/v1/accounts/msisdn_header_bootstrap/ failed:  +433ms
login => POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found; 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
EwtJacquiercommented, Aug 11, 2021

Hey! On my side, I’ve removed the preloginflow code (it’s not obrigatory)

2reactions
MevlanaErtugrulAcikgozcommented, Aug 11, 2021

What can I do about this problem? @Nerixyz

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code working on my machine but not in hosting - Stack Overflow
preLoginFlow() await ig.account.login(USERNAME, PASSWORD) // log ... POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found; at Request.
Read more >
instagram-private-api - Bountysource
Instagram has released this new feature where you can tag a business partner in your post and it shows up as a partnership...
Read more >
How To Fix the HTTP 302 Error (5 Methods) - Kinsta
In this post, we'll tell you everything you need to know about HTTP 302 errors. Then we'll share five troubleshooting tips to help...
Read more >
302 Found - Evert Pot
302 Found is another misunderstood status code. ... Web frameworks will actually now default to 302 for redirects after a POST request.
Read more >
rest api - Salesforce Integration with Square - 302 Found Error
Just posting the follow up as to what the issue was. We were able to solve this via @identigral's comment of setting up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found