-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canada NCI login fails "INVALID PARAMS" from HTTP Response Body #21
Comments
Took a stab at things today ... I fear we're in another API backwards compatibility breakage. The best thing to do atm is to get down into the POST ... I've tried varying permutations of posting to the API endpoint without success. as a start:
and then try....
What's interesting though is that I'm not sure if the data should be binary or not .. either way nothing is working
all result in
Helper Refs:
|
@linuscorin I don't suppose you have insight/guidance? |
I also hit up the php version of https://github.com/gboudreau/nissan-connect-php/blob/master/README.md php > require_once 'NissanConnect.class.php';
php > $nissanConnect = new NissanConnect('[email protected]', 'your_password_here', 'America/New_York', NissanConnect::COUNTRY_CANADA, NissanConnect::ENCRYPTION_OPTION_OPENSSL);
php > $nissanConnect->debug = TRUE php > $nissanConnect->getStatus(); PHP Parse error: syntax error, unexpected '$nissanConnect' (T_VARIABLE) in php shell code on line 2
php > $nissanConnect->getStatus();
PHP Warning: Uncaught Exception: Request for 'UserLoginRequest.php' failed. Response received: {"status":"-2010","message":"INVALID PARAMS","resultKey":""} in /home/fermulator/projects/nissan-connect-php/NissanConnect.class.php:457
Stack trace:
(snip) |
Sorry, no. There doesn't seem to have been any permanent API-breaking changes recently, at least not anything affecting Europe. Looking at my logs though, I can see that on the 3rd and 4th of February, I was getting a lot of "status: 404" responses, so if you're lucky it may be temporary. Note: I don't think the status number has anything to do with HTTP error codes. I've also in the past had status -2010, on a few occasions, but the last time I saw that was on the 27th of October. |
I wish there was a way to ask for "more verbose error details" "INVALID PARAMS" doesn't do it for me. Is it that I'm missing one? Provided one that is no longer supported? Does it actually mean "failed to authenticate"? ... |
"INVALID PARAMS" seems to be the standard error message, and the status varies. On the 15th of Feb, I had a few hours of consistent "INVALID PARAMS" with status code 52 and -5256. Then it started working again by itself, without any changes to the supplied params. I'm not aware of any way of getting more verbose errors from the API, and if the status codes are at all documented anywhere, it'll be for internal use only, as the API wasn't designed to be public, and has just been reverse engineered by people who wanted to use it. |
Having the same problem today in Sweden: |
For what it's worth, it seems to be working consistently for me today, also from Sweden. So, it doesn't seem to be a system wide issue. I get variations of "INVALID PARAMS" occasionally. Has it been working for you previously, or are you just getting started?
|
I got the Nissan Leaf yesterday so no - have no experience previously of getting it to work ;-) |
Are you consistently getting the same error code, -2010? I haven't been seeing that code since October last year. At that point, it was a temporary error at the Nissan end which resolved itself after a day or so. Unfortunately, I don't know much about the Python code (I'm using a PHP library), but what I can see from your debug output looks correct. Grattis till bilen! :) |
Thanks, tried with the php-lib but getting the same error there. Question: Is it the password for https://youplus.nissan.se/ (I dont see Connected Services there) or the https://apps.apple.com/se/app/nissanconnect-services/id1451280347? |
It should be the same password as you use in the app. I assume the app is able to connect to your car? Which model / year is it? I've got a 2016 / 30kWh. I've recently heard that newer cars use a different version of the app, so maybe they also use a different API or different API version? If so, that could also explain that what works for some people, doesn't work for others. I did briefly play with sending traffic through a proxy server running on my laptop. to reverse engineer some of the features that weren't yet in the PHP library. If the app works, but you can't get it to work using the API, then comparing requests between the app and your python code would be one way of figuring out what's wrong. Here's some notes on reverse engineering: |
Yes, my problem seems to be that my car (MY2020) is only using the new NissanConnect Services API and because of that nissanyou+ based API is not enabled for my account and therefor the error code. Thanks for trying to help me out. |
Same problem here, NE region too... |
Just tried after that MR, on
Same issue. ❌
|
Maybe unrelated, but have you tried changing your username (if allowed) or password? These are the only parameters that would change between the initial Edit: Oh, and do other 3rd party apps work properly: such as the "My Leaf" app by Tobias Kjeldsen? |
@Kalkran - are you wondering/thinking that my password is "too complex" for the API and breaks it? (it has special characters etc) - the NissanConnect app works fine, and I'm using that (and logged out and logged back in w/ same credentials to verify those work); I haven't tried other 3rd party apps (would prefer not to, but if I need to do so to debug....) - if others report that the fix in the PR for user agent has fixed their issue, then I guess I have a secondary problem here w/ credentials or something else. |
I'm actually not sure about the password as it is encoded before being sent over, but something is definitely breaking things on the Nissan side and it doesn't seem related to the way the request are made (the first request goes through fine), and other users have no issues using identical versions. Do you perhaps use a "+"-sign or other special character in your emailaddress? |
yup i have [email protected] , and password has i tried just stripping all special chars, for a test (obviously the credentials are thus invalid), but still the same error -- i would EXPECT the API to give me a |
FWIW, MyLeaf continues to function, and I don't see any related code changes on their side that could be related to this. |
Hello, pycarwings2 used to work for me a few years back on my 2018 Leaf in Canada, but trying it now with 2.12 After some digging, looks like MyLeaf is using https://github.com/Tobiaswk/dartnissanconnectna to access Canadian Leaf status. Maybe 2018 leafs have no carwings support anymore? And it looks like there are some efforts on Nissan's part to try and ruin things for anyone not using the official app: https://tobis.dk/blog/open-letter-nissan-resistance-is-futile/ . |
Good day,
Initially tried this via https://www.home-assistant.io/integrations/nissan_leaf/, however it didn't work with:
Reproduced it with my account hitting Canada NCI portal using latest
pycarwings2
:As per the
README.md
, did the basic install, and copied down some examples w/my_config.ini
.Had to tweak
get-leaf-info.py
to hit my python3 directly (notenv python
), otherwise it is left unmodified.After that, it ran, and repro'd the problem:
Open to working through/debugging (just filing the issue report for now). If anyone has guidance happy for it to get a jump start.
It may be worth noting (since I'm not sure if different regions have different account rules):
@
,-
)The text was updated successfully, but these errors were encountered: