TypeError: Cannot convert undefined or null to object #3
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Total time spent: 10 seconds
Due date
Androz2091
10 seconds
No due date set.
Dependencies
No dependencies set.
Reference: KaKi87/scraper-instagram-v1#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello, I'm getting the following error when I run the code below:
It says that the error comes from the
index.js, line 44. I updated the code like this (I added a console.log):When it works
I used a VPN to make the code working again, here is the
console.log(data);result:When it throws the error
After removing my VPN, here is the result:
If you need further information, I'm available and I can make tests for you, if you cannot reproduce the bug.
Here is the list of the methods that work and those that don't:
I finally managed to reproduce your issue, after spamming Instagram with a hell of requests !
In fact, you're being redirected to Instagram's login page.
This behavior generally occurs when trying to authenticate using
InstaClient.authBySessionId()with an invalid or expired session ID (i.e. HTTP 401).In this case, however, it seems to be a reaction to spam (i.e. HTTP 429), unfortunately, I can't distinguish these two, so I made a fix that will do nothing more but detect the redirection and return a 401 error.
Anyway, using a VPN works as a bypass solution, while authenticating doesn't.
Thanks for reporting.