Closed magnific0 closed 6 years ago
I have this exact same issue on both my laptops at home. At work this issue doesn't occur. Neither does it on my VPS.
My conclusion for the moment: https://account.health.nokia.com is blocking my IP. Perhaps too many requests, refreshing of unexpired tokens. I don't know.
My findings summarized:
That said, I will continue to check on the issue. Hopefully it's just a temporary matter. Otherwise I will contact Nokia API team about it (I have been in contact with them before).
Interesting. I've tried to run it from some other IP's (office, ec2 instance and another VPS) but no luck... I'd say this rules out the blocking of my IP's, as I've now ran it through IP's I've never used before for this API.
Or, maybe we've managed to break their API 😉
Anyways, thanks for your efforts!
That's very odd, because on my VPS it's running smoothly now. The only thing I can think of is that I did try revoking the application a few times yesterday, so perhaps it's a combination of things. You can try revoking by clicking "Disconnection" here: https://account.health.nokia.com/partner/partner
Disconnecting didn't do the trick either, tried a few times, but no luck. Did run into this message though, so I suspect they might be updating or fixing their API right now:
You're right, the service is hanging for me now as well again. But I did happen to get through just now. I'm assuming it is on their end. Let's see how this plays out.
I had contact with Nokia, they looked at an individual request I made. Turns out urllib3 hangs for a bit before sending the request by which time the authorization_code has expired (30 seconds after Allow this app). I found a simple solutions that speed the timeout up a bit. I was able to authorize the application more consistently now.
Be aware I made some changes to the setup flow:
Works, tnx! Also see #5
Nice! I'm closing this issue then. Thanks.
Hi, I still have this issue and none of the above worked for me. Also, now Nokia doesn't allow ip address or localhost as callback url and it must be on port 80 or 443.
Here is the error
Traceback (most recent call last): File "D:\Tools\nokia-weight-sync\nokia-weight-sync.py", line 262, in <module> setup_nokia( options, config ) File "D:\Tools\nokia-weight-sync\nokia-weight-sync.py", line 128, in setup_nokia creds = auth.get_credentials(nokia_auth_code) File "D:\Tools\nokia-weight-sync\nokia.py", line 87, in get_credentials client_secret=self.consumer_secret) File "C:\Users\tolra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests_oauthlib\oauth2_session.py", line 307, in fetch_token self._client.parse_request_body_response(r.text, scope=self.scope) File "C:\Users\tolra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\oauthlib\oauth2\rfc6749\clients\base.py", line 415, in parse_request_body_response self.token = parse_token_response(body, scope=scope) File "C:\Users\tolra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\oauthlib\oauth2\rfc6749\parameters.py", line 425, in parse_token_response validate_token_parameters(params) File "C:\Users\tolra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\oauthlib\oauth2\rfc6749\parameters.py", line 435, in validate_token_parameters raise MissingTokenError(description="Missing access token parameter.") oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
@tolrahC I haven't tried changing my apps url in a while, but you are right that it has become more strict. Can you open a separate issue for this?
Just did #12
@jschram writes: