Giter VIP home page Giter VIP logo

Comments (14)

buehlerfabian avatar buehlerfabian commented on September 22, 2024 1

I think I may have found a solution that works for me: using the following (older) package versions I can log in again without the "Missing token error"

certifi = "2022.9.24"
charset-normalizer = "2.1.1"
requests = "2.28.1"
urllib3 = "1.26.12"
websocket-client = "1.4.1"

With one or more of these packages the newer (current) versions seem to cause the trouble.

from teslapy.

tdorssers avatar tdorssers commented on September 22, 2024 1

I believe the combination of urllib3 2.0 and Python <3.10 is causing issues. Either upgrade Python to 3.10+ or downgrade urllib3 to 1.26.x. Please let me now if this works for you.

from teslapy.

tdorssers avatar tdorssers commented on September 22, 2024

This error means that oauthlib doesn't get an access token back from the Tesla server. The body is actually HTML with an access denied error instead of a JSON response.

from teslapy.

behconsci avatar behconsci commented on September 22, 2024

from teslapy.

buehlerfabian avatar buehlerfabian commented on September 22, 2024

Hi. I have the same issue. Everything worked fine until today I set up a new virtual environment, in which I installed teslapy with all necessary dependencies.
Now I keep getting the "Missing access token parameter".
Maybe something goes wrong with the current version of one of the packages teslapy depends on?

from teslapy.

behconsci avatar behconsci commented on September 22, 2024

I deployed on different servers (debian, ubuntu..) and still no luck. I have TeslaPy==2.7.0 both in my localhost and on server. localhost works fine, but server doesn't. what are we missing here?

from teslapy.

buehlerfabian avatar buehlerfabian commented on September 22, 2024

I tried different versions for TeslaPy and also for the dependent packages, no change.
Providing a refresh token obtained from a third party app didn't work either. Always the same error: MissingTokenError raised from oauthlib/oauth2/rfc6749/parameters.py", line 451, in validate_token_parameters.

from teslapy.

behconsci avatar behconsci commented on September 22, 2024

what we are doing is a pure "man in the middle attack"? :D but then localhost is still working. I suspect, the scope is the issue, maybe? instead of offline_access maybe online_access .. but just a guess

from teslapy.

buehlerfabian avatar buehlerfabian commented on September 22, 2024

but then localhost is still working.

Lucky for you. Here nothing is working, neither server nor localhost.

from teslapy.

behconsci avatar behconsci commented on September 22, 2024

damn it. time for tesla sso auth for third parties.

from teslapy.

behconsci avatar behconsci commented on September 22, 2024

Aaah thanks man. I will try out tomorrow morning.

from teslapy.

HansKappert avatar HansKappert commented on September 22, 2024

This saved my day.
Week
Month

from teslapy.

Refhi avatar Refhi commented on September 22, 2024

Hey @fbphysik

thank you so much for the tip !

had the same problem, but it was solved only by downgrading charset-nromalize and requests to the aforementioned versions, I did not have to touch the others

if that's important : I"m working in an up-to-date dockerised Domoticz where I had :

  • requests 2.31.0 (downgraded to 2.28.1)
  • certifi-2023.7.22
  • charset_normalizer-3.2.0 (downgraded to 2.1.1)
  • urllib3 2.0.4
  • websocket-client 1.6.2
    On my other computer it works with :
  • requests 2.25.1
  • certifi 2020.6.20
  • urllib3 1.26.5
  • websocket-client 1.5.1
    (charset_normalize is nowhere to be found)

If I had a guess that would be to blame a recent requests update

(thank you so much for teslapy btw :) )

from teslapy.

Refhi avatar Refhi commented on September 22, 2024

I'm sorry it will be difficult for me to do more testing, though in my dockerized environment it works properly with python 3.9 and urlib 2.0.4
It broke with requests 2.31/charset_normalize 3.2, but worked again with downgrading to requests 2.28.1/charset_normalize 2.1.1 if that helps
here's my pip list (where TeslaPy is working properly) :

Python 3.9.2 (default, Feb 28 2021, 17:03:44)
Package Version
certifi 2023.7.22
charset-normalizer 2.1.1
idna 3.4
oauthlib 3.2.2
pip 20.3.4
requests 2.28.1
requests-oauthlib 1.3.1
setuptools 52.0.0
TeslaPy 2.8.0
urllib3 2.0.4
websocket-client 1.6.2
wheel 0.34.2

Hope that'll help a bit

from teslapy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.