flobz / psa_car_controller

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

Home Assistant EOF Using new login method #775

Closed Lawdie closed 4 months ago

Lawdie commented 5 months ago

Describe the bug When following the new instructions to login you are unable to input your OAUTH return code for section 6 due to the script failing when you press "submit" within PSACC

To Reproduce Steps to reproduce the behavior:

  1. Attached myself to the PSACC docker container from within home assistant
  2. Followed instructions shown on the configuration page, when you press submit to generate the external link it EOF's
  3. You can paste the code into the terminal however OTP fails and submit will just generate another error

Environment (please complete the following information):

Error from docker container & HA log when pressing submit

2024-02-24 22:55:13,252 DEBUG https://mw-vx-m2c.mym.awsmpsa.com:443 "POST /api/v1/user?culture=en_GB&width=1080&version=1.33.0 HTTP/1.1" 200 None
2024-02-24 22:55:13,259 :: INFO :: Now login to this URL in a browser: https://idpcvs.vauxhall.co.uk/am/oauth2/authorize?client_id=CLIOENTID&redirect_uri=mymvxsdk%3A%2F%2Foauth2redirect%2Fgb&response_type=code&scope=openid%20profile&state=STATE&code_challenge=CHALLENGE&code_challenge_method=S256

Copy+paste the resulting mymXX-code (in F12 > Network, when you hit the final OK button, 36 chars, UUID format): 2024-02-24 22:55:13,261 :: ERROR :: EOF when reading a line
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/config_views.py", line 139, in connectPSA
    res = firstLaunchConfig(app_name, email, password, countrycode)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 95, in firstLaunchConfig
    psacc.connect()
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 35, in connect
    self.manager.init_with_oauth2_redirect(realm_info[self.realm]["scheme"], self.country_code)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 49, in init_with_oauth2_redirect
    ret = input("\nCopy+paste the resulting mymXX-code (in F12 > Network, "
EOFError: EOF when reading a line
frans0180 commented 5 months ago

Hallo. I have the same problem

EOF. See at the bottom of the picture And the log file is very very long !

And after that, the home assistant app crashed on the iPhone)

HA latest version

IMG_9747

abilio9 commented 5 months ago

+1

same here with a Peugeot e208. OS : Home Assistant OS 11.5 HA Core : 2024.2.3 PSA-Car-Controller add-on version : 3.4.0

I get also the same messages in the logs. All the script files described in the logs (/usr/local/lib/python3.9/...) does not exist. I found a python3.11 folder but nothing about python 3.9.

cmjcmj123 commented 4 months ago

Same for me Opel Mokka. Problem started after latest upgrade of PSA Controller. Before the upgrade I had another problem: 400 -server_error. I was hoping the PSA Controller upgrade should let me login without errors :-(

nicknol commented 4 months ago

same here for a Citroen eC4

290989 commented 4 months ago

Same here for a Peugeot E-208.

Arnoudd commented 4 months ago

Same here. Also with a Peugeot e-208.

adambogocz commented 4 months ago

It has nothing to do with car model, check here for more info https://github.com/flobz/psa_car_controller/issues/777#issuecomment-1963771810

flobz commented 4 months ago

fix in version v3.4.1

290989 commented 4 months ago

Thanks a lot! Do you will update psacc-ha, too?