Open renvivancos opened 2 years ago
We took a quick look at the cookies returned, seems that Insta is returning "mid" as one of the cookies with hashed code. Could be this is the new name for sessionId
Ok, thanks. I'll check it when i'll have time, and keep you informed.
After changing the sessionId to mid, we're having other issues, so not quite sure that is the right session
Ok, with my quick fix I don't have the error anymore, but I don't get the contents from instagram. I'll try to look at it maybe next week if I have time.
Hello,
I've the same problem.
"sessionId" cookie is not set in my CookieJar.
I've approved my device with "checkpoint challenge" method.
Ok, with my quick fix I don't have the error anymore, but I don't get the contents from instagram. I'll try to look at it maybe next week if I have time.
Maybe, just a quick check if $session
is not null?
Looks like it's the same error as in https://github.com/pgrimaud/instagram-user-feed/issues/305
Hello, We updated to 6.16.4 and we are experiencing the same issue for new connections. Could we please have :
$session->getExpires()
? So it doesn't throw a 500 (or at least do a try/catch)163 $session = $cookies->getCookieByName('mid');
164
165 // Session expired (should never happened, Instagram TTL is ~ 1 year)
166 if ($session && $session->getExpires() < time()) {
167 $this->logout($username);
168 $this->login($username, $password, $imapClient);
169 }
Thanks 🙏
Description
When the sessionId cookie is not set, there is an error :
Call to a member function getExpires() on null in Instagram\Api->login() (line 166 of /var/www/html/vendor/pgrimaud/instagram-user-feed/src/Instagram/Api.php).
Possible Solution
I don't know very well Instagram and the different cookies set but I found a solution which works for me, but I'm not sure it's the best and if that there are no side effects : On line 166 just also check if variable $session is empty.