[Debian-med-packaging] Bug#823842: python-fitbit: cannot generate auth token
Ritesh Raj Sarraf
rrs at debian.org
Mon May 9 14:43:46 UTC 2016
Control: retitle -1 add versioned dependency on python-requests-oauthlib
The actual bug filed is incorrect, hence I've retitled.
On Mon, 2016-05-09 at 19:58 +0530, Ritesh Raj Sarraf wrote:
> Package: python-fitbit
> Version: 0.2-1
> Severity: normal
>
> As per the documentation, the ./gather_keys_oauth2.py should help in
> generating an auth token. But when using the same, I get the following
> error from the fitbit server
>
> "The app you're trying to connect did not provide valid information to
> Fitbit. Please report this issue to them.
>
> Developer information: invalid_request - Invalid redirect_uri parameter
> value"
>
>
> On the terminal, I get the following:
>
>
> rrs at learner:/var/tmp/Debian-Build/temp/python-fitbit-0.2$
> ./gather_keys_oauth2.py XXXXXX xxxxxxxxxxxxxxxxxxx
> [09/May/2016:19:53:44] ENGINE Listening for SIGHUP.
> [09/May/2016:19:53:44] ENGINE Listening for SIGTERM.
> [09/May/2016:19:53:44] ENGINE Listening for SIGUSR1.
> [09/May/2016:19:53:44] ENGINE Bus STARTING
> CherryPy Checker:
> The Application mounted at '' has an empty config.
>
> [09/May/2016:19:53:44] ENGINE Started monitor thread 'Autoreloader'.
> [09/May/2016:19:53:44] ENGINE Started monitor thread '_TimeoutMonitor'.
> [09/May/2016:19:53:44] ENGINE Serving on http://127.0.0.1:8080
> [09/May/2016:19:53:44] ENGINE Bus STARTED
> Created new window in existing browser session.
> [14429:14456:0509/195345:ERROR:nss_util.cc(839)] After loading Root Certs,
> loaded==false: NSS error code: -8018
>
>
With a proper callback url in place, this doesn't fail. So it was my bad
assuming this to be a buggy behavior.
OTOH, I think now I have encountered a bug, which I believe has already been
reported and fixed upstream.
https://github.com/orcasgit/python-fitbit/issues/70
I cannot verify the fix because the dependent python-requests-oauthlib is
outdated in Debian. What we need today is 0.6+
This leads to errors like the following.
ERROR: Missing access token parameter.
Please check that you are using the correct client_secret
You can close this window
File "./gather_keys_oauth2.py", line 46, in index
self.oauth.fetch_access_token(code, self.redirect_uri)
File "/media/SSHD/var/tmp/Debian-Build/temp/python-fitbit-0.2/fitbit/api.py",
line 153, in fetch_access_token
code=code)
File "/usr/lib/python2.7/dist-packages/requests_oauthlib/oauth2_session.py",
line 160, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/lib/python2.7/dist-
packages/oauthlib/oauth2/rfc6749/clients/base.py", line 409, in
parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/lib/python2.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py",
line 376, in parse_token_response
validate_token_parameters(params)
File "/usr/lib/python2.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py",
line 386, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
>
> PS: Also, could you please ship gather_keys_oauth2.py in the binary
> package ?
It'd still be very helpful to see this packaged in the binary package.
--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20160509/1f1b7365/attachment.sig>
More information about the Debian-med-packaging
mailing list