yp87 / leaf2mqtt

Pull in data from the Nissan Connect platform for the LEAF and publish over MQTT
GNU General Public License v3.0
42 stars 39 forks source link

An error occured while logging in. Please make sure you have selected the right LEAF_TYPE, LEAF_USERNAME and LEAF_PASSWORD. Retrying in 5 seconds. #40

Closed nuno99costa closed 1 year ago

nuno99costa commented 1 year ago

Describe the bug From yesterday onwards, I have not been able to connect to the Nissan Connect services

LEAF_TYPE Newer than 2019 Nissan Leaf (Europe)

Logs


WARNING: 2022-10-20 09:12:37.858791: main: An error occured while logging in. Please make sure you have selected the right LEAF_TYPE, LEAF_USERNAME and LEAF_PASSWORD. Retrying in 5 seconds.
FINE: 2022-10-20 09:12:37.858865: main: NoSuchMethodError: The method '[]' was called on null.
Receiver: null
Tried calling: []("data")
FINE: 2022-10-20 09:12:37.858950: main: #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38)
#1      _objectNoSuchMethod (dart:core-patch/object_patch.dart:85)
#2      NissanConnectSession.login (package:dartnissanconnect/src/nissanconnect_session.dart:319)
<asynchronous suspension>
#3      NissanConnectSessionWrapper.login (file:///app/src/leaf/nissan_connect_wrapper.dart:21)
<asynchronous suspension>
#4      _login (file:///app/src/leaf_2_mqtt.dart:87)
<asynchronous suspension>
#5      main (file:///app/src/leaf_2_mqtt.dart:63)
<asynchronous suspension>
WARNING: 2022-10-20 09:12:37.858965: main: Could not execute request.
FINEST: 2022-10-20 09:12:37.858984: MqttClientWrapper: Publishing message lastErrorDateTimeUtc 2022-10-20T09:12:37.858978Z
nuno99costa commented 1 year ago

I have tried recreating, rebuilding and rebooting the container and host, but no success.

atxbyea commented 1 year ago

Nissan had maintenance last night, this is probably related and might have changed something in how the login process happens

phairplay commented 1 year ago

Hi, I've just taken delivery of the new 22 leaf and can confirm I'm seeing the same issue when I installed this app. I'm able to log in without issue on the app. is there a possible fix?

RobertRoxenhall commented 1 year ago

Nissan Leaf 2021 here with the same issue.

RobertRoxenhall commented 1 year ago

Okay after some googling they've updated something. Check here for more information.

yp87 commented 1 year ago

Updated to newest version, however, the cockpit function to get total mileage is now broken since it used an unofficial library that is not yet updated with the fix. @sensor-freak, can you merge from the official lib please?

yp87 commented 1 year ago

@nuno99costa Unless you change something in the code, there is no point in rebuilding the container if you use yp87/leaf2mqtt as the container image. You will only need to pull the new one when the code on this repository change (the image is published automatically)

sensor-freak commented 1 year ago

Updated to newest version, however, the cockpit function to get total mileage is now broken since it used an unofficial library that is not yet updated with the fix. @sensor-freak, can you merge from the official lib please?

I've merged my fork with the latest changes and also updated all packages to latest versions. My fork is also using a slightly modified fork of the dartnissanconnect package - that's probably the unofficial library your speaking of?

However, since I'm only a casual Dart developer, I'm not quite sure what I've done to make it work again (except for merging the login changes from here).

sensor-freak commented 1 year ago

If someone is curious: The modified library is hosted somewhere else: https://gitlab.com/sensor-freak/dartnissanconnect

yp87 commented 1 year ago

Thank you @sensor-freak, I now point to your version again.