gboudreau / nest-api

Unofficial Nest Learning Thermostat API
GNU Lesser General Public License v3.0
299 stars 92 forks source link

Google account now getting an error on line 1309 #116

Closed knappster1 closed 4 years ago

knappster1 commented 4 years ago

My account migrated to google in January, but yesterday, I started getting an error on line 1309:

PHP Fatal error:  Uncaught RuntimeException: Error: Received empty response from request to **<cut-url>**. in /home/pi/nest-api/nest-api-master/nest.class.php:1309
Stack trace:
#0 /home/pi/nest-api/nest-api-master/nest.class.php(1198): Nest->doRequest('GET', 'https://account...', NULL, true, Array)
#1 /home/pi/nest-api/nest-api-master/nest.class.php(1091): Nest->doGET('https://account...', Array)
#2 /home/pi/nest-api/nest-api-master/nest.class.php(151): Nest->login()
#3 /home/pi/nest-api/nest-api-master/nest.php(14): Nest->__construct(NULL, NULL, 'https://account...', 'OCAK=X5g6PTdQWI...')
#4 {main} in /home/pi/nest-api/nest-api-master/nest.class.php on line 1309

I am using a script to update humidity once per hour and it is nearly spring, so I don't think this will be an urgent issue, but I thought it was worth reporting.

vjooris commented 4 years ago

did you tried to re-enter/renew your cookies and token ?

knappster1 commented 4 years ago

@vjooris Sorry, I forgot to mention that. I updated the cookies and token twice yesterday with the same result. From a glance the token appeared to be the same for all 3, but the cookie was different each time.

vjooris commented 4 years ago

sorry, but no other ideas, because mine is still working perfectly

vjooris commented 4 years ago

I see you host this php on a raspberry PI. Did you tried on a Synology, or on/from an other Web server ? No update on your PI ?

knappster1 commented 4 years ago

There are no updates available. I will see if I can find out the last time there was an update. I will try on a PC as well. If I paste my issue_token into an incognito window browser, I get the following output: { "error" : "invalid_request" }

Is this normal?

vjooris commented 4 years ago

no idea

knappster1 commented 4 years ago

Copied it to a pc and it worked fine. Interesting... pi is on php 7.3.14 and PC is 7.2.24. I will need to do some more digging and provide an update.

vjooris commented 4 years ago

good news ! On my NAS Synology It works perfectly with php 73.11-0004

knappster1 commented 4 years ago

Well, thanks for the help. After confirming it worked on another computer, I did what I probably should have done in the first place. Restarted the pi. Everything is working again. Not sure what the issue was or what triggered it. The only change I can come up with is that I installed smartmontools on the pi around the same time this began, but I can't really see how that would be connected. I will go ahead and close this issue. Thank goodness it was just a false alarm!