Closed diegomustafamarino closed 2 years ago
another try and: main.075a4527.chunk.js:1 Failed to run Error: User not found at navigateToUserWithCheck (C:\SimpleInstaBot-win\resources\app.asar\node_modules\instauto\index.js:216:50) at processTicksAndRejections (internal/process/task_queues.js:85:5) at async navigateToUserAndGetData (C:\SimpleInstaBot-win\resources\app.asar\node_modules\instauto\index.js:239:5) at async Instauto (C:\SimpleInstaBot-win\resources\app.asar\node_modules\instauto\index.js:937:22) at async Object.initInstauto (C:\SimpleInstaBot-win\resources\app.asar\build\electron.js:147:14
Hi. Does it happen with any user or just one? Can you try to open this in your browser:
https://www.instagram.com/user.account/?__a=1
I Just have 1 user, i'm trying to install a virtual machina with hackintosh to try it
Firefox < and Chrome >
Hackintosh didn't work to: Message: User not found
It could be that Instagram has been changing some behavior regarding the ?__a=1
URLs, but only for some users. I am not able to reproduce this problem.
would be nice if you could post the full log history from SimpleInstaBot when it crashes, and I assume you're using the latest version?
would be nice if you could post the full log history from SimpleInstaBot when it crashes, and I assume you're using the latest version?
Ok, give me a momment... Yes, lastest version.
would be nice if you could post the full log history from SimpleInstaBot when it crashes, and I assume you're using the latest version?
Here we go:
main.21cc2732.chunk.js:1 No cookies found
e @ main.21cc2732.chunk.js:1
error @ main.21cc2732.chunk.js:1
apply @ callbacks-registry.ts:45
(anonymous) @ remote.js:286
(anonymous) @ remote.js:276
emit @ events.js:203
onMessage @ init.ts:50
main.21cc2732.chunk.js:1 Setting language to English (en)
main.21cc2732.chunk.js:1 Waiting 1 sec
main.21cc2732.chunk.js:1 Waiting 4 sec
main.21cc2732.chunk.js:1 Found language selector
main.21cc2732.chunk.js:1 Already English language
main.21cc2732.chunk.js:1 Waiting 2 sec
main.21cc2732.chunk.js:1 No login page button, assuming we are on login form
main.21cc2732.chunk.js:1 Waiting 2 sec
main.21cc2732.chunk.js:1 Waiting 1 sec
main.21cc2732.chunk.js:1 Waiting 11 sec
main.21cc2732.chunk.js:1 Setting language to English (en)
main.21cc2732.chunk.js:1 Waiting 2 sec
main.21cc2732.chunk.js:1 Waiting 5 sec
main.21cc2732.chunk.js:1 Found language selector
main.21cc2732.chunk.js:1 Already English language
main.21cc2732.chunk.js:1 Saving cookies
main.21cc2732.chunk.js:1 Have followed/unfollowed 0 in the last hour
main.21cc2732.chunk.js:1 Have followed/unfollowed 0 in the last 24 hours
main.21cc2732.chunk.js:1 Have liked 0 images in the last 24 hours
main.21cc2732.chunk.js:1 Navigating to user user
main.21cc2732.chunk.js:1 Goto https://www.instagram.com/user
main.21cc2732.chunk.js:1 Waiting 1 sec
main.21cc2732.chunk.js:1 Failed to run Error: User not found
at navigateToUserWithCheck (/Applications/Simple…stauto/index.js:216)
at processTicksAndRejections (internal/process/taskqueues.js:85)
at async navigateToUserAndGetData (/Applications/Simple…stauto/index.js:239)
at async Instauto (/Applications/Simple…stauto/index.js:937)
at async Object.initInstauto (electron.js:147)
e @ main.21cc2732.chunk.js:1
error @ main.21cc2732.chunk.js:1
ot @ main.21cc2732.chunk.js:1
async function (async)
ot @ main.21cc2732.chunk.js:1
onClick @ main.21cc2732.chunk.js:1
m @ 2.883abbf7.chunk.js:2
z @ 2.883abbf7.chunk.js:2
(anonymous) @ 2.883abbf7.chunk.js:2
C @ 2.883abbf7.chunk.js:2
V @ 2.883abbf7.chunk.js:2
@ 2.883abbf7.chunk.js:2
T @ 2.883abbf7.chunk.js:2
Mr @ 2.883abbf7.chunk.js:2
le @ 2.883abbf7.chunk.js:2
Er @ 2.883abbf7.chunk.js:2
Tr @ 2.883abbf7.chunk.js:2
Vr @ 2.883abbf7.chunk.js:2
t.unstable_runWithPriority @ 2.883abbf7.chunk.js:2
Wa @ 2.883abbf7.chunk.js:2
oe @ 2.883abbf7.chunk.js:2
Sr @ 2.883abbf7.chunk.js:2
2.883abbf7.chunk.js:2 SweetAlert2: Unknown parameter "onDestroy"
d @ 2.883abbf7.chunk.js:2
Xe @ 2.883abbf7.chunk.js:2
(anonymous) @ 2.883abbf7.chunk.js:2
main @ 2.883abbf7.chunk.js:2
value @ 2.883abbf7.chunk.js:2
Kt @ 2.883abbf7.chunk.js:2
(anonymous) @ 2.883abbf7.chunk.js:2
v @ 2.883abbf7.chunk.js:2
fire @ 2.883abbf7.chunk.js:2
ot @ main.21cc2732.chunk.js:1
async function (async)
ot @ main.21cc2732.chunk.js:1
onClick @ main.21cc2732.chunk.js:1
m @ 2.883abbf7.chunk.js:2
z @ 2.883abbf7.chunk.js:2
(anonymous) @ 2.883abbf7.chunk.js:2
C @ 2.883abbf7.chunk.js:2
V @ 2.883abbf7.chunk.js:2
@ 2.883abbf7.chunk.js:2
T @ 2.883abbf7.chunk.js:2
Mr @ 2.883abbf7.chunk.js:2
le @ 2.883abbf7.chunk.js:2
Er @ 2.883abbf7.chunk.js:2
Tr @ 2.883abbf7.chunk.js:2
Vr @ 2.883abbf7.chunk.js:2
t.unstable_runWithPriority @ 2.883abbf7.chunk.js:2
Wa @ 2.883abbf7.chunk.js:2
oe @ 2.883abbf7.chunk.js:2
Sr @ 2.883abbf7.chunk.js:2
It could be that Instagram has been changing some behavior regarding the
?__a=1
URLs, but only for some users. I am not able to reproduce this problem.
It happens when i try to open the ?__a=1 of my own account when i'm logged in my own account too:
TEXT:
for (;;);{"__ar":1,"error":1357004,"errorSummary":"Ocorreu um erro","errorDescription":"Feche e abra a janela do seu navegador novamente.","payload":null,"hsrp":{"hblp":{"consistency":{"rev":1005366256}}},"lid":"7087291162611017638"}
It could be that Instagram has been changing some behavior regarding the
?__a=1
URLs, but only for some users. I am not able to reproduce this problem.
is there a solution? I can extract here any information you need and if you want I can share the screen on teams too or something like that
TBH I don't know why this is happening. :| Instagram seems to be sending some strange response. seems to only happen for a few people...
TBH I don't know why this is happening. :| Instagram seems to be sending some strange response. seems to only happen for a few people...
oh, ok :/ my company insta is blocked for bot =/. No problems. Thanks!
anyway, i'll try the lastest version
It's happening to our instance too. Account is not blocked as it's loading just fine.
Goto https://www.instagram.com/
If I try to open https://www.instagram.com/
{
"seo_category_infos":[],
"logging_page_id":"",
"show_suggested_profiles":false,
"graphql":{
"user":{
"biography":"",
"blocked_by_viewer":false,
"restricted_by_viewer":null,
"country_block":false,
"external_url":",
"external_url_linkshimmed":"",
"edge_followed_by":{},
"fbid":"",
"followed_by_viewer":false,
"edge_follow":{},
"follows_viewer":false,
"full_name":"",
"has_ar_effects":false,
"has_clips":true,
"has_guides":false,
"has_channel":false,
"has_blocked_viewer":false,
"highlight_reel_count":8,
"has_requested_viewer":false,
"hide_like_and_view_counts":false,
"id":"",
"is_business_account":true,
"is_professional_account":true,
"is_supervision_enabled":false,
"is_guardian_of_viewer":false,
"is_supervised_by_viewer":false,
"is_embeds_disabled":false,
"is_joined_recently":false,
"business_address_json":null,
"business_contact_method":"UNKNOWN",
"business_email":null,
"business_phone_number":null,
"business_category_name":"",
"overall_category_name":null,
"category_enum":"",
"category_name":"",
"is_private":false,
"is_verified":false,
"edge_mutual_followed_by":{},
"profile_pic_url":"",
"profile_pic_url_hd":"",
"requested_by_viewer":false,
"should_show_category":true,
"should_show_public_contacts":true,
"state_controlled_media_country":null,
"username":"",
"connected_fb_page":null,
"pronouns":[],
"edge_felix_video_timeline":{},
"edge_owner_to_timeline_media":{},
"edge_saved_media":{},
"edge_media_collections":{},
"edge_related_profiles":{}
}
},
"toast_content_on_load":null,
"show_qr_modal":false,
"show_view_shop":false
}
It seems I can't find full log so I just post screenshot here:
Nice. I hope someone can help us
so https://www.instagram.com/user.account/?__a=1
gives an error while https://www.instagram.com/user.account//?__a=1
(extra slash) gives the proper JSON?
so
https://www.instagram.com/user.account/?__a=1
gives an error whilehttps://www.instagram.com/user.account//?__a=1
(extra slash) gives the proper JSON?
idk why, this link: https://www.instagram.com/user.account/?__a=1 is working here now, i'll try the bot again..
worked fine, nice work thank u man !! i think the solution for this cases is just wait and try this links sometimes
I will use for a month then i supply ur work thanks
I can confirm, that bot is now working, probably some bug on Twitter
This is happening to me aswell. I'd be glad to help by providing my account if needed.
Hello i have the same problem with both of my account. But i have another problem - im a total beginner in coding. From what you wrote i think i understood i have to delete "https://www.instagram.com/user.account/?__a=1" and put "https://www.instagram.com/user.account//?__a=1 (extra slash)" in where it was. But im to dumb to make it. can you please tell me, how i do it? Would be really nice. Thanks a lot for your work :)
Hello, I just had the same problem on 2 of my business accounts
I tried that https://www.instagram.com/user.account/?__a=1 and it try to go "login" after i login and try that again it print like this with my browser.
for (;;);{"__ar":1,"error":1357004,"errorSummary":"Sorry, something went wrong","errorDescription":"Please try closing and re-opening your browser window.","payload":null,"hsrp":{"hblp":{"consistency":{"rev":1005611792}}},"lid":"7104412750110707038"}
I think the reason is:
2:16 AMMissing graphql in page, falling back to alternative method... and alterative is not working.
I tried that https://www.instagram.com/user.account/?__a=1 and it try to go "login" after i login and try that again it print like this with my browser.
for (;;);{"__ar":1,"error":1357004,"errorSummary":"Sorry, something went wrong","errorDescription":"Please try closing and re-opening your browser window.","payload":null,"hsrp":{"hblp":{"consistency":{"rev":1005611792}}},"lid":"7104412750110707038"}
I think the reason is:
2:16 AMMissing graphql in page, falling back to alternative method... and alterative is not working.
I've been racking my brain trying to figure out how to fix this problem but I can't
I think the reason is:
2:16 AMMissing graphql in page, falling back to alternative method... and alterative is not working.
Same problem here. Seems like the JSON is no longer available neither from https://www.instagram.com/user.account/?__a=1 nor https://www.instagram.com/user.account//?__a=1
Anyone having an other idea to solve this?
Ideally we should stop relying on this unstable endpoint and find another way to recover the data the bot needs. But for that we would need @mifi 's attention xD
Yes that would be great. I'm about to experiment with other bots, but this is the best I've found so far.
Basically we need to find a way to find the User ID
of an account, only knowing the account's username
. Previously we used methods like these:
https://stackoverflow.com/questions/11796349/instagram-how-to-get-my-user-id-from-username
but it seems that none of those work anymore.
can look into other bots like https://github.com/InstaPy/InstaPy how they do it
The user ID is needed for GraphQL queries.
Basically we need to find a way to find the
User ID
of an account, only knowing the account'susername
. Previously we used methods like these: https://stackoverflow.com/questions/11796349/instagram-how-to-get-my-user-id-from-username but it seems that none of those work anymore.can look into other bots like https://github.com/InstaPy/InstaPy how they do it
The user ID is needed for GraphQL queries.
Upon sniffing a few requests I found an endpoint that makes this possible: https://i.instagram.com/api/v1/users/web_profile_info/?username=username_here
cool! but it's giving me {"message":"useragent mismatch","status":"fail"}
. not sure which user agent they are expecting...
cool! but it's giving me
{"message":"useragent mismatch","status":"fail"}
. not sure which user agent they are expecting...
Seems like it requires a few extra headers in order to allow the request to passthrough. If you are using Puppeteer you could specifically intercept this request and get it's response data. Another alternative is that, it seems like the user id gets loaded at some point into the DOM
Thanks, will try that!
Oh if you can find the user ID in the Dom somewhere let me know
Oh if you can find the user ID in the Dom somewhere let me know
You can find it by doing these two operations:
const body = document.querySelector("body").innerHTML
const userId = body.match(/profile_id":"(.*?)"/)[1]
omg it works! i intercepted the request and all the needed data is there. releasing new version
The fix commit looks great. I would add the DOM alternative as a fallback aswell. In case any exceptions happen, and may be worth comparing how fast both these solutions perform, because it seems like this information has been in the DOM since 2018.
Ok i'll add a TODO for the DOM alternative fallback. at least the bot works again now
hi i have a little error from last fix :
Dang, it really works again now. Thanks man, U Guys are the best! Thank you for your Work mifi 💪
Basically we need to find a way to find the
User ID
of an account, only knowing the account'susername
. Previously we used methods like these: https://stackoverflow.com/questions/11796349/instagram-how-to-get-my-user-id-from-username but it seems that none of those work anymore.can look into other bots like https://github.com/InstaPy/InstaPy how they do it
The user ID is needed for GraphQL queries.
@mifi https://github.com/InstaPy/InstaPy/issues/6615 we are having this problem, how can we solve it, can you help? https://github.com/InstaPy/InstaPy/blob/master/instapy/util.py#L2639
@metapodcod see discussion above and https://github.com/mifi/instauto/commit/b3a5d7c8ba3362513de8b3a1d863956b2114b363
@metapodcod see discussion above and mifi/instauto@b3a5d7c
I don't know how to make this change in python
@metapodcod I came here after reading your post on Stackoverflow, I think this is a different implementation in JavaScript with a somewhat different idea.
Seems like it requires a few extra headers in order to allow the request to passthrough. If you are using Puppeteer you could specifically intercept this request and get it's response data. Another alternative is that, it seems like the user id gets loaded at some point into the DOM
What headers it needs? I have pass it the user-agent to the requests in python but its just the same "mismatch useragent". Can someone help me with this?
To Reproduce Unexpected token o in JSON at position 1
Screenshots
Desktop (please complete the following information):
Windows 10 Pro for Workstations
It access normally, start, access my config, my profile, but then it happens when i use any Unfollow function. Need Help! I didn't try the bot following function yet. May i install something before using the bot?
main.075a4527.chunk.js:1 Failed to run SyntaxError: Unexpected token o in JSON at position 1 at JSON.parse ()
at getPageJson (C:\Users\J951F~1\AppData\Local\Temp\27HguQcbkCvsVXCIsh9XAn4f2sS\resources\app.asar\node_modules\instauto\index.js:220:17)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async navigateToUserAndGetData (C:\Users\J951F~1\AppData\Local\Temp\27HguQcbkCvsVXCIsh9XAn4f2sS\resources\app.asar\node_modules\instauto\index.js:231:20)
at async Instauto (C:\Users\J951F~1\AppData\Local\Temp\27HguQcbkCvsVXCIsh9XAn4f2sS\resources\app.asar\node_modules\instauto\index.js:937:22)
at async Object.initInstauto (C:\Users\J951F~1\AppData\Local\Temp\27HguQcbkCvsVXCIsh9XAn4f2sS\resources\app.asar\build\electron.js:147:14)