joeshaw / carwings

Go package and CLI tool for the Nissan Leaf Carwings API
MIT License
31 stars 11 forks source link

Getting Login Error #2

Closed NickWallbridge closed 6 years ago

NickWallbridge commented 6 years ago

Was working fine for a week or so, then 48 hours ago (28-May-2018) started getting:

Logging into Carwings... ERROR: invalid character '<' looking for beginning of value

Research suggest this maybe a non-JSON response to the login, but I don't know enough to debug. ConnectEV and YOU+Nissan are working, so I think the service is up.

joeshaw commented 6 years ago

I've been seeing some weird behavior lately too, I will take a look.

In the meantime, you can get additional detail by passing a -debug flag, which will print out all the HTTP communication it does with Nissan's servers. Just note that credentials may be included in this output (particularly when logging in) so review things carefully, but that output would be helpful in tracking things down.

NickWallbridge commented 6 years ago

Thanks for the quick response. Here is the debug output:

Logging into Carwings...

POST https://gdcportalgw.its-mo.com/gworchest_160803A/gdc/InitialApp.php map[initial_app_strings:[geORNtsZe5I4lRGjG9GZiA]] HTTP/1.1 404 Not Found Content-Length: 234 Content-Type: text/html; charset=iso-8859-1 Date: Wed, 30 May 2018 15:15:17 GMT Server: Apache

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

404 Not Found

Not Found

The requested URL /gworchest_160803A/gdc/InitialApp.php was not found on this server.

ERROR: invalid character '<' looking for beginning of value

NickWallbridge commented 6 years ago

Sorry closed the issue by accident

joeshaw commented 6 years ago

Looks like the API has changed:

https://github.com/jdhorne/pycarwings2/issues/35 https://github.com/gboudreau/nissan-connect-php/issues/18 https://gist.github.com/BenWoodford/141ca350445e994e69a70aabfb6db942

I will look into updating things.

NickWallbridge commented 6 years ago

Thanks. Happy to test/confirm when you have an update.

joeshaw commented 6 years ago

@NickWallbridge In what country are you located?

joeshaw commented 6 years ago

https://github.com/jdhorne/pycarwings2/issues/35#issuecomment-393255266 had the clue needed -- a new API endpoint URL. They extracted it from the EU Nissan Leaf app. I am in the US and it still works for me.

There is still a new API available, but it appears to only be available for North America (and possibly Japan) but not Europe yet. I'll file a new issue about implementing that.

NickWallbridge commented 6 years ago

@joeshaw I am in the United Kingdom, so maybe a problem for me?