Git Product home page Git Product logo

Comments (11)

Lizzard44 avatar Lizzard44 commented on June 12, 2024 1

I've change only one Line to check status < 0 :

             }
             if ($json->status !== 200) {
-                if (($json->status == 401 || $json->status == 404 || $json->status == 408) && $this->shouldRetry) {
+                if (($json->status == 401 || $json->status == 404 || $json->status == 408 || $json->status < 0) && $this->shouldRetry) {
                     $this->debug("Request for '$path' failed. Response received: " . json_encode($json) . " Will retry.");
                     $this->shouldRetry = FALSE; // Don't loop infinitely!
                     $this->config->customSessionID = NULL;

now it works.

from nissan-connect-php.

gboudreau avatar gboudreau commented on June 12, 2024 1

Thanks @Lizzard44 ; I committed this change in both master and new-api branches.

from nissan-connect-php.

Raiden38 avatar Raiden38 commented on June 12, 2024

I actually have this issue since August 8th. (Canada)...

from nissan-connect-php.

SDeath667 avatar SDeath667 commented on June 12, 2024

I am also having problems again, the new API worked for a day and now since I guess a week things have stopped working with a similar error as above.

from nissan-connect-php.

linuscorin avatar linuscorin commented on June 12, 2024

Mine started failing some time in late June, but as I've been away all summer, I didn't take a look at it until now.

After pulling the latest changes, I was then getting:
Response received: {"status":408}

I've since then removed the file /tmp/.nissan-connect-storage-.json, to get a new session, and now it works again.

Sorry if this isn't related to any of the issues you're having, but I wanted it documented somewhere in case someone else gets the 408 status.

from nissan-connect-php.

SDeath667 avatar SDeath667 commented on June 12, 2024

Things started working again for me today out of the blue.

from nissan-connect-php.

SDeath667 avatar SDeath667 commented on June 12, 2024

And it stopped again.

from nissan-connect-php.

linuscorin avatar linuscorin commented on June 12, 2024

Same for me. I got it to work yesterday, but apparently that was just a one-off.

Now, I get this:
[2019-08-20 11:22:21] [NissanConnect] Request: POST https://gdcportalgw.its-mo.com/api_v190426_NE/gdc/UserLoginRequest.php {"UserId":"WITHHELD","Password":"WITHHELD","custom_sessionid":"","initial_app_str":"9s5rfKVuMrT03RtzajWNcA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe/Stockholm"}
[2019-08-20 11:22:23] [NissanConnect] Found resultKey in response:
2019-08-20 11:22:23 Exception caught: Request for 'UserLoginRequest.php' failed. Response received: {"status":"-2010","message":"INVALID PARAMS","resultKey":""}

from nissan-connect-php.

linuscorin avatar linuscorin commented on June 12, 2024

Looking at my logs, I see that I had one successful update today at 09:21 Central European time. It then managed to authenticate and get a battery status (I've got it running on a schedule).

So it looks like it's broken most of the time, but occasionally works. If I put back the latest working json file in /tmp, then I get an error from BatteryStatusRecordsRequest.php instead of UserLoginRequest.php.

Since it's intermittent, I'm guessing there's a problem at the Nissan end, but this thing is so flaky it's hard to tell. Sometimes I wonder if they remove and put back old versions of the API.

From what I've heard from those who use the official Nissan app, that's also quite unreliable, and for some cars, Nissan have never been able to make it work at all.

from nissan-connect-php.

linuscorin avatar linuscorin commented on June 12, 2024

Quick update: It seems to fairly consistently work, for a little while, if I first remove the temp file (session storage). So, if the session info is never kept, then maybe it'll work consistently.

From what I've seen, the login request is fast compared to the rest of the process (12 seconds to log in, 40 seconds to get an update), so maybe caching this info is not necessary.

Another solution might be to reset the session only if the status requests fail. I'll have a play with this when/if I've got the time, but for now, I've just set up a cron job to remove the session temp file once an hour :-)

from nissan-connect-php.

SDeath667 avatar SDeath667 commented on June 12, 2024

@Lizzard44 That change worked immediately!
Thanks!

from nissan-connect-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.