flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
415 stars 220 forks source link

Login OK but no vehicles? #583

Closed ErSeraph closed 11 months ago

ErSeraph commented 1 year ago

Describe the bug I have a New Peugeot 208 petrol, and I have the My Peugeot app. I used --remote-disable as I don't have remote controls, it seems that by entering my email and password I am able to log in correctly but then I am not able to see anything.

To Reproduce Steps to reproduce the behavior:

  1. what command did you use? psa-car-controller --remote-disable
  2. when the bug append ? After login
  3. Does it persist after restarting the program? Yes
  4. Does it persist after recreate config by going to http://server_address:port/config? Not tested

Environment (please complete the following information):

2023-07-11 17:39:58,647 :: ERROR :: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 48, in firstLaunchConfig token = res.json()["accessToken"] KeyError: 'accessToken'

HOST_BRANDID : https://id-dcr.peugeot.com/mobile-services sitecode: AP_IT_ESP{"returnCode":"OK","token":"b03fe69c7c1bdd654ae9ee53462ce1d64bac54dce92141f114b8437618c3fe01"} 2023-07-11 17:39:58,648 :: ERROR :: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 48, in firstLaunchConfig token = res.json()["accessToken"] KeyError: 'accessToken'

HOST_BRANDID : https://id-dcr.peugeot.com/mobile-services sitecode: AP_IT_ESP{"returnCode":"OK","token":"b03fe69c7c1bdd654ae9ee53462ce1d64bac54dce92141f114b8437618c3fe01"} Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 48, in firstLaunchConfig token = res.json()["accessToken"] KeyError: 'accessToken'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/web/view/config_views.py", line 133, in connectPSA res = firstLaunchConfig(app_name, email, password, countrycode) File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 57, in firstLaunchConfig raise Exception(msg) from ex Exception: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 48, in firstLaunchConfig token = res.json()["accessToken"] KeyError: 'accessToken'

HOST_BRANDID : https://id-dcr.peugeot.com/mobile-services sitecode: AP_IT_ESP{"returnCode":"OK","token":"b03fe69c7c1bdd654ae9ee53462ce1d64bac54dce92141f114b8437618c3fe01"} 2023-07-11 17:39:58,658 :: INFO :: 127.0.0.1 - - [11/Jul/2023 17:39:58] "POST /_dash-update-component HTTP/1.1" 200 - 2023-07-11 17:40:36,890 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,891 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,892 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,893 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,893 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,893 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,900 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,900 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,901 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,901 :: INFO :: Namespace mapping (60, 420) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-07-11 17:40:36,935 :: WARNING :: Requested API level 31 is larger than maximum we have, returning API level 28 instead. 2023-07-11 17:40:46,990 :: INFO :: save config change 2023-07-11 17:40:47,685 :: ERROR :: get_vehicles: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 137, in get_vehicles res = self.api().get_vehicles_by_device() File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1331, in get_vehicles_by_device (data) = self.get_vehicles_by_device_with_http_info(**kwargs) # noqa: E501 File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1400, in get_vehicles_by_device_with_http_info return self.api_client.call_api( File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/oauth.py", line 96, in call_api raise e File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/oauth.py", line 78, in call_api return self._ApiClient__call_api(resource_path, method, File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 157, in __call_api response_data = self.request( File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 347, in request return self.rest_client.GET(url, File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 234, in GET return self.request("GET", url, File "/usr/local/lib/python3.8/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 228, in request raise ApiException(http_resp=r) psa_car_controller.psa.connected_car_api.rest.ApiException: (404) Reason: Not Found HTTP response headers: HTTPHeaderDict({'Connection': 'close', 'Cache-Control': 'no-store, no-cache, must-revalidate, private', 'Date': 'Tue, 11 Jul 2023 15:40:47 GMT', 'Expires': '0', 'Set-Cookie': 'rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Mon, 10-Jul-2023 15:40:47 GMT, JSESSIONID=qZAgSo8JdzCkZW-PRt9--1Rt-zEfDD4N_3zvkIOZ; path=/, PSACountry=IT; Domain=.groupe-psa.com; Path=/', 'Content-Type': 'application/hal+json', 'X-Global-Transaction-ID': '945fb68f64ad77ff8d78fbcf', 'User-Agent': 'Swagger-Codegen/4.0/python'}) HTTP response body: {"uuid":"2d7bca29-b5d6-4735-b362-034552027429","code":40400,"message":"No vehicle found","timestamp":"2023-07-11T15:40:47.535Z"}

flobz commented 11 months ago

run with

psa-car-controller --web-conf --remote-disable