-
Notifications
You must be signed in to change notification settings - Fork 57
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
Unexpected exception : OAuth 2 MUST utilize https #285
Comments
From another post: |
yep, as explained, I was first affected by this. But then I have now another issue, regarding OAuth it seems. Regards |
I have the same problem, and I have logged onto https://id.vwgroup.io/landing-page; there was no prompt for me to accept new T&Cs. To resolve my problem, I removed consent for everything, saved that, and restored consent again. Error log (included again, as is formatted, so easier to read than OP):
|
Thanks a lot. This resolved my "OAuth 2 MUST utilize https" issue! The integration is working again! |
Thanks for the suggestions. I tried removing all the consents, then accepting all the consents again. But I still get the same result when I try to configure the integration, same error :-( |
Ah my solution was to accept the New "Nutzer Vereinbarung" under user-administration in the Volkswagen App. Then it is working after reload of the application. |
For the records, I also tried another VW integration : https://github.com/robinostlund/homeassistant-volkswagencarnet It really looks like I could fix this problem by "playing" with consents, but no solution find yet, already tried to reset everything I could... |
Take a Look on my solution. Maybe it could help |
Thank you @Benny1907 Sorry, I wasn't clear in my previous message: in fact I've also reset the Volkswagen App on my phone. Previously, I'd also deleted the permissions for connected apps, on id.vwgroup.io |
I also realise that I've deleted all the connected apps listed on https://id.vwgroup.io/. |
In your vw app- settings-administration-user administration. There I musst accept New user agreements with a few separate points for example allow ota and so on. And after reload of ha Integration it worked fine |
Thank you very much for your time @Benny1907 , I also tried this way but it leads to same user agreements.
Btw, as you can see in this link, I'm in Switzerland. It looks like user agreement could be different between countries... I wonder if there is something like "local problem". Anyway, thanks for all theses suggestions, and happy it has helped some people here :-) Best regards |
Just wanted to say I'm experiencing the same issue, all consents given/accepted, via every link I could find online and via the app, obviously including all those mentioned here. Presumably this is resulting from a redirect to a non-HTTPS page, so perhaps there is a consent I have missed but I have looked extremely thoroughly multiple times. What is needed it seems is some modification of the integration to expose the url causing the problem. That's beyond me, but perhaps someone else has the skills. There are many other improvements needed to the integration too, some very simple (e.g. properly linking to the Guthub documentation and issues), some more involved (e.g. correctly defining sensors as boolean rather than text, which would be a breaking but important change). Clearly this issue is therefore related to the fact that this integration no longer seems to be maintained, see #283. Hopefully given the number of people using this integration is proportionate to the number of people driving supported cars, and someone somewhere can help, as the integration is unusable for me for now 🤞 It would also be helpful if those who say they have fixed permissions and now have things working could state what version of HA they are using. For me this happened after upgrading to 2024.12. Perhaps they are using an earlier version amd are unaffected by some change in 2024.12, perhaps not 🤷♂️ |
I'm using HA 2024.11.3 and experiencing the same since 2 or 3 days. |
Thanks, that maybe rules out a change in HA 👍 |
Thanks all, This bit: "To resolve my problem, I removed consent for everything, saved that, and restored consent again." And then reloading the application in HA solved this same issue on my side. |
It effectively looks like it comes from VW or from the underlaying python library as I face the same issue when using the |
My problem is that every time I logon to the vw web interface it asks for me to accept the terms and privacy. I press accept. All should be Ok. |
Maybe try use a different browser? |
Solution that worked for me: robinostlund/homeassistant-volkswagencarnet#683 (comment) |
No, that didn't work. However the change the country to "Albania" and then back again worked. |
Well this is weird- I made no changes yet overnight the integration started working again. Anyone else? I guess there are two likely explanations: either VW have fixed something, or after my last attempt to accept terms (which in my case were already all accepted) perhaps I neglected to reload (and a reload took place for some reason in the meantime). I've tried this numerous times amd have definitely reloaded, and thought I did every time. If this has happened only for me, then I suppose the latter is more likely. If that does turn out to be the case, it reemphasises the need to expose what URL (and hopefully therefore the permission(s)) is causing this so a meaningful error can be generated, as fixing this currently seems to be a case of fumbling around in the dark. And that of course wastes of a lot of people's time. Ps fyi at no point did I remove permissions for the app to reaccept them (though I did try turning off various permission switches on my.volkswagen.co.uk and then reenabling them), so that would suggest doing so is (in theory) overkill. The app continued to work throughout and never requested any permissions be confirmed, and neither did the website. |
For some reason this also fixed it for me, how bizar |
What fixed for me was changing the country to another country and then back the original country on https://id.vwgroup.io/landing-page |
Confirmed, it's a bug on Volkswagen consent management. If you try to login and always get the updated terms and conditions to accept, the consent is not being stored and that prevents the integration to do the login process. As @sven73a and others report, going to the profile and changing your country to another one, accept the updated T&C, select your country again and accept the updated T&C for a last time seems to work, the consent is stored and you never get the prompt again, making the integration work as before. |
Just to be sure, it's not the billing address that needs to be changed to another country and back after logging in at https://id.vwgroup.io/landing-page. It is the Country and Region information I'd mark this issue as fix #285 |
Can confirm changing country as @mpschr showed via web worked for me too, moving to Sweden and back. There was a green note popping up each time at upper right, that country was successfully changed. Thanks for digging into this! |
For me the changing country thing has not (so far) been necessary. As previously mentioned, the integration began working again overnight - no idea precisely what triggered this. However after a reboot of the HA server today it stopped working again, so I thought I'd try the country change after all. Before I could do so, I was asked for two consents at the URL mentioned above. After accepting these I reloaded the integration and it is now working again. So for me at least I still haven't needed to change country. |
I can confirm that I also had to change country in my profile and then change it back to get the consent to record properly on my VW profile. Without this, I got the "consent" question on every login - so it clearly was not being recorded in my profile. Interesting, because technically that is GDPR violation on VW's behalf. |
Changing region/country in my profile and back worked for me as well. I followed the steps described here: robinostlund/homeassistant-volkswagencarnet#683 (comment) |
Hello,
The integration was unable to connect recently. I tried to re-download the integration. Then I uninstalled it, reinstalled it.
Then I realized that I was affected by the classic problem: there were new conditions to accept on the VW website.
After accepting the conditions, I try again to add the integration, and when I enter the username and password, there's an unexpected error, about "OAuth 2 MUST utilize https". See logs below.
I was trying to configure integration from the local URL (not HTTPS), so then I tried with the HTTPS URL provided by ui.nabu.casa. Same result
I've completely uninstalled and reinstalled integration with HACS (with reboots in between.) But still the same error.
I've run out of ideas. How about you?
Version of the custom_component
0.2.3
Installation method (hacs / manual)
hacs
Home Assistant on Virtual Box
Core 2024.11.3
Supervisor 2024.11.4
Operating System 13.2
Frontend 20241106.2
Add your logs here.
Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 65, in async_step_user
info = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 39, in validate_input
await hass.async_add_executor_job(we_connect.login)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weconnect/weconnect.py", line 184, in login
self.__session.login()
File "/usr/local/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
response = self.doWebAuth(authorizationUrl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 253, in doWebAuth
afterLoginResponse = self.get(afterLoginUrl, allow_redirects=False, access_type=AccessType.NONE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 69, in request
return super(WeConnectSession, self).request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weconnect/auth/openid_session.py", line 188, in request
raise InsecureTransportError()
oauthlib.oauth2.rfc6749.errors.InsecureTransportError: (insecure_transport) OAuth 2 MUST utilize https.
The text was updated successfully, but these errors were encountered: