TypeError: Cannot convert undefined or null to object
#3
Closed
opened 3 years ago by Androz2091
·
2 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. 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.