Skip to content
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

Stopped working since 17th Sept. BMW server change? #84

Closed
wywywywy opened this issue Sep 18, 2018 · 5 comments · Fixed by #85
Closed

Stopped working since 17th Sept. BMW server change? #84

wywywywy opened this issue Sep 18, 2018 · 5 comments · Fixed by #85
Assignees
Labels
bug 🐛 Something isn't working

Comments

@wywywywy
Copy link

wywywywy commented Sep 18, 2018

Authentication does not work any more.

Now it returns the following when trying to authenticate -

Unknown status code 400, expected 200
{
  "error" : "invalid_grant",
  "error_description" : "the authN circuit failed"
}

I guess maybe BMW has made a change on their server side?

EDIT - Thinking about it, it's most likely that the authorisation token has been blacklisted...

@wywywywy
Copy link
Author

Output from bimmerconnected status

DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:bimmer_connected.account:getting new oauth token
DEBUG:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): b2vapi.bmwgroup.com
DEBUG:requests.packages.urllib3.connectionpool:https://b2vapi.bmwgroup.com:443 "POST /webapi/oauth/token HTTP/1.1" 400 None
ERROR:bimmer_connected.account:Unknown status code 400, expected 200
ERROR:bimmer_connected.account:{
  "error" : "invalid_grant",
  "error_description" : "the authN circuit failed"
}
Traceback (most recent call last):
  File "/usr/local/bin/bimmerconnected", line 106, in <module>
    main()
  File "/usr/local/bin/bimmerconnected", line 44, in main
    args.func(args)
  File "/usr/local/bin/bimmerconnected", line 49, in get_status
    account = ConnectedDriveAccount(args.username, args.password, get_region_from_name(args.region))
  File "/usr/local/lib/python3.5/dist-packages/bimmer_connected/account.py", line 55, in __init__
    self._get_vehicles()
  File "/usr/local/lib/python3.5/dist-packages/bimmer_connected/account.py", line 181, in _get_vehicles
    self._get_oauth_token()
  File "/usr/local/lib/python3.5/dist-packages/bimmer_connected/account.py", line 88, in _get_oauth_token
    expected_response=200, post=True)
  File "/usr/local/lib/python3.5/dist-packages/bimmer_connected/account.py", line 128, in send_request
    raise IOError(msg)
OSError: Unknown status code 400, expected 200

@MJP-76
Copy link

MJP-76 commented Sep 18, 2018

2018-09-18 21:49:39 ERROR (SyncWorker_8) [bimmer_connected.account] Unknown status code 400, expected 200
2018-09-18 21:49:39 ERROR (SyncWorker_8) [bimmer_connected.account] {
"error" : "invalid_grant",
"error_description" : "the authN circuit failed"
}
2018-09-18 21:49:40 ERROR (MainThread) [homeassistant.setup] Error during setup of component bmw_connected_drive
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/bmw_connected_drive/init.py", line 61, in setup
accounts.append(setup_account(account_config, hass, name))
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/bmw_connected_drive/init.py", line 90, in setup_account
read_only)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/bmw_connected_drive/init.py", line 137, in init
self.account = ConnectedDriveAccount(username, password, region)
File "/usr/local/lib/python3.6/site-packages/bimmer_connected/account.py", line 55, in init
self._get_vehicles()
File "/usr/local/lib/python3.6/site-packages/bimmer_connected/account.py", line 181, in _get_vehicles
self._get_oauth_token()
File "/usr/local/lib/python3.6/site-packages/bimmer_connected/account.py", line 88, in _get_oauth_token
expected_response=200, post=True)
File "/usr/local/lib/python3.6/site-packages/bimmer_connected/account.py", line 128, in send_request
raise IOError(msg)
OSError: Unknown status code 400, expected 200

Was working, Just updated to latest Hass.io today 18/09/2018

@m1n3rva m1n3rva added the bug 🐛 Something isn't working label Sep 19, 2018
@m1n3rva m1n3rva self-assigned this Sep 19, 2018
@m1n3rva
Copy link
Contributor

m1n3rva commented Sep 19, 2018

I can confirm this issue.

@MJP-76
Copy link

MJP-76 commented Oct 5, 2018

Now working, Sorry for the late notice - am away onsite

Great work and many thanks

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants