Title: Bug in token refresh logic makes library practically unusable · Issue #2 · ecobee/python_api_sdk · GitHub
Open Graph Title: Bug in token refresh logic makes library practically unusable · Issue #2 · ecobee/python_api_sdk
X Title: Bug in token refresh logic makes library practically unusable · Issue #2 · ecobee/python_api_sdk
Description: There is a bug in the token refresh logic that results in permanent silent failure. This makes the entire ebapi library pointless to use because authorization tokens require frequent refreshes. Calling the refresh() method on a FileToken...
Open Graph Description: There is a bug in the token refresh logic that results in permanent silent failure. This makes the entire ebapi library pointless to use because authorization tokens require frequent refreshes. Cal...
X Description: There is a bug in the token refresh logic that results in permanent silent failure. This makes the entire ebapi library pointless to use because authorization tokens require frequent refreshes. Cal...
Opengraph URL: https://github.com/ecobee/python_api_sdk/issues/2
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug in token refresh logic makes library practically unusable","articleBody":"There is a bug in the token refresh logic that results in permanent silent failure. This makes the entire `ebapi` library pointless to use because authorization tokens require frequent refreshes.\r\n\r\nCalling the `refresh()` method on a `FileTokens` instances (used by `ApiConnection`) results in a `NameError`, but is masked by a try/except block that ignores any instance of `Exception` that it catches.\r\n\r\nComment added in code snippet below ([copied from tokens.py here](https://github.com/ecobee/python_api_sdk/blob/42801b032cf67b85edd7636bbbaf456042ebd146/ebapi/tokens.py#L119-L122)) identifies where the bug is located:\r\n\r\n```python\r\n# snip\r\ntry:\r\n self.user.loc[idx] = refresh_token(ref) # \u003c-- refresh_token() is not defined (NameError)\r\nexcept Exception:\r\n pass # \u003c-- bug is completely silenced\r\n# snip\r\n```\r\n","author":{"url":"https://github.com/joxl","@type":"Person","name":"joxl"},"datePublished":"2021-07-25T04:28:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/python_api_sdk/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8f4da98a-b884-475c-6996-18cdf7dbabb3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 92B4:177525:1FB4AF3:2AD0ACF:6A599A67 |
| html-safe-nonce | e110a9aba9e8f5b9d5a8a8962a8413f9cdf7f0c734ef39b8e954b158fc8737a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkI0OjE3NzUyNToxRkI0QUYzOjJBRDBBQ0Y6NkE1OTlBNjciLCJ2aXNpdG9yX2lkIjoiNTUxMDgzNDAyNjMxMDExMzg5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 65eeae0b77adfccb69898ad50b53d0afe845e20140f2b31107991b62c0e521cd |
| hovercard-subject-tag | issue:952194375 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ecobee/python_api_sdk/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1f7d9af5d94214832df62b17c859a2c989f278d12ef46bacca59fe2fd0e58917/ecobee/python_api_sdk/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1f7d9af5d94214832df62b17c859a2c989f278d12ef46bacca59fe2fd0e58917/ecobee/python_api_sdk/issues/2 |
| og:image:alt | There is a bug in the token refresh logic that results in permanent silent failure. This makes the entire ebapi library pointless to use because authorization tokens require frequent refreshes. Cal... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joxl |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-preview |
| go-import | github.com/ecobee/python_api_sdk git https://github.com/ecobee/python_api_sdk.git |
| octolytics-dimension-user_id | 28985350 |
| octolytics-dimension-user_login | ecobee |
| octolytics-dimension-repository_id | 131649654 |
| octolytics-dimension-repository_nwo | ecobee/python_api_sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 131649654 |
| octolytics-dimension-repository_network_root_nwo | ecobee/python_api_sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 737e0bf019c29d8431b268ae84d528b052789210 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width