Insecure Transport for OAuth2 Authentication
2024-11-30T16:02:48+0000:INFO:session_manager:Could not use token from file /tmp/weconnect.token ([Errno 2] No such file or directory: '/tmp/weconnect.token')
Traceback (most recent call last):
File "/opt/venv/bin/vwsfriend", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/venv/lib/python3.12/site-packages/vwsfriend/vwsfriend_base.py", line 329, in main
weConnect = weconnect.WeConnect(username=weConnectUsername, password=weConnectPassword, spin=weConnectSpin, tokenfile=tokenfile,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/weconnect/weconnect.py", line 114, in __init__
self.__session.login()
File "/opt/venv/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
response = self.doWebAuth(authorizationUrl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/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 "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 69, in request
return super(WeConnectSession, self).request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/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.
Same as #701
Bitte einmal in der App ausloggen und wieder einloggen und die neuen Terms akzeptieren.
Same as #701
Bitte einmal in der App ausloggen und wieder einloggen und die neuen Terms akzeptieren.
This work for me. Thanks!
Please, could you elaborate a bit and if possible answer in english too. I have the same issue and I did not quite catch the comment.
Please logout and in in the Volkswagen app to accept the terms and conditions again.
Even after accept of new terms on login, still this error message.
Restarting the container doesn't help ?
On Fri, Dec 6, 2024, 07:26 AndreasNoj @.***> wrote:
Even after accept of new terms on login, still this error message.
— Reply to this email directly, view it on GitHub https://github.com/tillsteinbach/VWsFriend/issues/702#issuecomment-2522316098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRTQPKNF5K54LFYJVBGVEL2EFGS7AVCNFSM6AAAAABSYVGRZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRSGMYTMMBZHA . You are receiving this because you authored the thread.Message ID: @.***>
No same issue - when loggin in on the app and on VW website, now always get the screen where I have to accept the "Term and Privacy"
Same problem. When testing 'weconnect-cli' I get notification:
CRITICAL:There was a problem when authenticating with WeConnect: It seems like you need to accept the terms and conditions for the Volkswagen service. Try to visit the URL "https://identity.vwgroup.io//signin-service/v1/a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com/terms-and-conditions?relayState=4ddd3771922514412406b4ccb17f29df2580cb68&canChangeCountryOfResidence=false&userId=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx&updated=dataprivacy" or log into the Volkswagen smartphone app
This URL gives "Something went wrong" error, so I guess there are some issues on VW side.
Same issue here. The website and app always ask me to accept the "Terms and Privacy" during the login process, even though I clicked "Accept" the last time I logged in.
I was able to fix it by doing this trick on the VW website:
- Change my country to Germany
- Log out, then log in again and accept the "Terms and Privacy" (at this point "weconnect-cli" started working again)
- Changed my country back to Switzerland
- :partying_face: :tada:
I'm not able to change to Germany - the option is greyed out and only UK is available.
Unable to start my vwsfriend container as a result (or at least it starts, but never presents a page)
Docker compose logs:
vwsfriend-vwsfriend-1 | 2024-12-17T11:14:10+0000:INFO:vwsfriend_base:vwsfriend 0.24.7 (using WeConnect-python 0.60.5, WeConnect-mqtt 0.49.2)
vwsfriend-vwsfriend-1 | 2024-12-17T11:14:10+0000:INFO:session_manager:Could not use token from file /tmp/weconnect.token ([Errno 2] No such file or directory: '/tmp/weconnect.token')
vwsfriend-vwsfriend-1 | 2024-12-17T11:14:11+0000:CRITICAL:vwsfriend_base:There was a problem when authenticating with WeConnect: Login throttled, probably too many wrong logins. You have to wait some minutes until a new login attempt is possible
Container logs:
Traceback (most recent call last):
File "/opt/venv/bin/vwsfriend", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/venv/lib/python3.12/site-packages/vwsfriend/vwsfriend_base.py", line 329, in main
weConnect = weconnect.WeConnect(username=weConnectUsername, password=weConnectPassword, spin=weConnectSpin, tokenfile=tokenfile,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/weconnect/weconnect.py", line 114, in __init__
self.__session.login()
File "/opt/venv/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
response = self.doWebAuth(authorizationUrl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/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 "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 69, in request
return super(WeConnectSession, self).request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/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.
I was able to fix it with the above information. Login to the website, and in your profile select Germany as the country. This is located almost at the bottom, i.e. do not change the country in your address this does not work.
I was able to setup VWsFriend setting the country and region to "Germany". Logout of the VW website, log on again and confirm the german terms and condition
Unfortunately, even after changing the country (not the adress) and accepting the terms in the app, I am unable to start the container with the OAuth2 error.
Any pointers?
Can you post the response that you receive in the Terminal here? That would help to see whether it is the same error others received.
Hello,
since yesterday I also have the same problem. It seems that vwsfreind can't authorize with WeConnect. I already logged out and in in the Volkswagen app. I also tried on the Webpage https://vwid.vwgroup.io/. I even changed the "country and region" to Albania and back to Germany, but there were no new "Terms and Privacy" notes for acceptance.
Maybe anybody could help?
Here is my docker error log:
vwsfriend-1 | 2025-11-25T11:50:39+0000:INFO:vwsfriend_base:vwsfriend 0.24.7 (using WeConnect-python 0.60.5, WeConnect-mqtt 0.49.2)
vwsfriend-1 | 2025-11-25T11:50:39+0000:INFO:session_manager:Could not use token from file /tmp/weconnect.token ([Errno 2] No such file or directory: '/tmp/weconnect.token')
vwsfriend-1 | Traceback (most recent call last):
vwsfriend-1 | File "/opt/venv/bin/vwsfriend", line 8, in <module>
vwsfriend-1 | sys.exit(main())
vwsfriend-1 | ^^^^^^
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/vwsfriend/vwsfriend_base.py", line 329, in main
vwsfriend-1 | weConnect = weconnect.WeConnect(username=weConnectUsername, password=weConnectPassword, spin=weConnectSpin, tokenfile=tokenfile,
vwsfriend-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/weconnect/weconnect.py", line 114, in __init__
vwsfriend-1 | self.__session.login()
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
vwsfriend-1 | response = self.doWebAuth(authorizationUrl)
vwsfriend-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/weconnect/auth/we_connect_session.py", line 123, in doWebAuth
vwsfriend-1 | loginFormResponse: requests.Response = websession.get(authorizationUrl, allow_redirects=False)
vwsfriend-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
vwsfriend-1 | return self.request("GET", url, **kwargs)
vwsfriend-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 575, in request
vwsfriend-1 | prep = self.prepare_request(req)
vwsfriend-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 484, in prepare_request
vwsfriend-1 | p.prepare(
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 367, in prepare
vwsfriend-1 | self.prepare_url(url, params)
vwsfriend-1 | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 438, in prepare_url
vwsfriend-1 | raise MissingSchema(
vwsfriend-1 | requests.exceptions.MissingSchema: Invalid URL '/u/login?state=hKFo2SB6MkkyMmJBUW02bEJHQzhhYjduSF9UTFBEYzA2a18yd6Fur3VuaXZlcnNhbC1sb2dpbqN0aWTZIGtmSndRNEpzMG9JVjVQZTdPQXpFYTd2T3Q4R3Y1RHppo2NpZNk2YTI0ZmJhNjMtMzRiMy00ZDQzLWIxODEtOTQyMTExZTZiZGE4QGFwcHNfdnctZGlsYWJfY29': No scheme supplied. Perhaps you meant https:///u/login?state=hKFo2SB6MkkyMmJBUW02bEJHQzhhYjduSF9UTFBEYzA2a18yd6Fur3VuaXZlcnNhbC1sb2dpbqN0aWTZIGtmSndRNEpzMG9JVjVQZTdPQXpFYTd2T3Q4R3Y1RHppo2NpZNk2YTI0ZmJhNjMtMzRiMy00ZDQzLWIxODEtOTQyMTExZTZiZGE4QGFwcHNfdnctZGlsYWJfY29?
@tillburner most likely your issue is #752