You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your issue will be closed if you violate any rule below.
You need to include a meaningful section of your code
(not your entire project and not a single line).
Please do not add screenshots as they're not easy to work with.
Errors like IgActionSpamError (feedback_required), IgCheckpointError (challenge_required), checkpont_required, login_required
are "common" and there are multiple issues, search here.
You can delete this section after reading it.
Form
Put an [x] if you meet the condition, else leave [ ].
I have a problem with a "login_required" error that append randomly. I have a loop that search through my instagram users and then read their discovery feed. With that loop, I load a session that I have stored in my database using the this.state.deserialize function and then I check if I can retrieve my user info. When I retrieve my user info, it works the 3 first try and then it throw me a "login_required" error, even if I set my loop to run every 40 seconds. I know instagram could block my ip address and for that I use a residential proxy so i'm pretty sure it's not related.
Please help me.
Code
// This is my load functionasyncloadSession(userID: string): Promise<void>{constuser=awaitthis.prismaService.user.findUnique({where: {id: userID},select: userSelector,});if(!user){thrownewNotFoundException(`The user with id ${userID} does not exists.`,);}if(!user.instagramState){thrownewError(` The user with id ${userID} does not have an instagram state. `);}this.state.proxyUrl='http://customer-xxxxxxx-country-FR-region-Ain:xxxxxxx@proxy.goproxy.com:30000';awaitthis.state.deserialize(user.instagramState);awaitthis.user.info(this.state.cookieUserId).catch(async(err)=>{if(err.code&&err.error.code!=='ECONNRESET'){awaitthis.prismaService.user.update({where: {id: userID},data: {lastInstaBlocked: newDate(),},});}throwerr;});}// And this is my loop for(constuserofusers){constisBlockedFromInsta=user.lastInstaBlocked&&this.getDiffFromNow(user.lastInstaBlocked)<24;constdontSearch=!user.isSearchActivated||!user.instagramState||isBlockedFromInsta;if(dontSearch){this.logger.debug(`The user with id ${user.id}${isBlockedFromInsta ? 'has been blocked by instagram' : 'has not activate searching'}.`,);continue;}try{awaitthis.instagramService.loadSession(user.id);}catch(err){this.logger.debug(err);this.logger.warn(`The user with id ${user.id} could not have been logged in instagram`,);continue;}try{constdiscoverFeed=this.instagramService.feed.topicalExplore();constdiscoverRequest=awaitdiscoverFeed.items();constdiscoverUsers=discoverRequest.flatMap((el)=>el.layout_content.medias?.map((el)=>el.media.user),);// Adding users to the database}catch(err){// Error handling}}
Error and Output
It's a typical "login_required" error that append when a user is not logged.
The text was updated successfully, but these errors were encountered:
Bug Report
Read the Notes and fill out the form.
Notes
Your issue will be closed if you violate any rule below.
(not your entire project and not a single line).
IgActionSpamError (feedback_required)
,IgCheckpointError (challenge_required)
,checkpont_required
,login_required
are "common" and there are multiple issues, search here.
Form
Put an
[x]
if you meet the condition, else leave[ ]
.Requirements
DEBUG
variable.Platform
v21.7.3
Description
I have a problem with a "login_required" error that append randomly. I have a loop that search through my instagram users and then read their discovery feed. With that loop, I load a session that I have stored in my database using the
this.state.deserialize
function and then I check if I can retrieve my user info. When I retrieve my user info, it works the 3 first try and then it throw me a "login_required" error, even if I set my loop to run every 40 seconds. I know instagram could block my ip address and for that I use a residential proxy so i'm pretty sure it's not related.Please help me.
Code
Error and Output
The text was updated successfully, but these errors were encountered: