Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Error with invalid access token #4

Closed
mkomko opened this issue Mar 4, 2018 · 0 comments · Fixed by #8
Closed

Error with invalid access token #4

mkomko opened this issue Mar 4, 2018 · 0 comments · Fixed by #8

Comments

@mkomko
Copy link
Contributor

mkomko commented Mar 4, 2018

$ mlbplay -v -d 2018-03-02 nyy
2018-03-04 19:10:37 [   DEBUG] logging in
2018-03-04 19:10:37 [   DEBUG] logging in
2018-03-04 19:10:37 [   DEBUG] logged in: 7808471
2018-03-04 19:10:38 [   DEBUG] getting schedule: 1, 2018-03-02 00:00:00, 2018-03-02 00:00:00, None, 147, None
2018-03-04 19:10:38 [   DEBUG] geting media for game 533897
2018-03-04 19:10:38 [   DEBUG] getting schedule: None, None, None, None, None, 533897
2018-03-04 19:10:38 [   DEBUG] found preferred stream
2018-03-04 19:10:38 [   DEBUG] getting access token
2018-03-04 19:10:38 [   DEBUG] access_token: [ACCESS TOKEN]
2018-03-04 19:10:38 [   DEBUG] stream response: {'errors': [{'code': 'access-token.invalid'}]}
2018-03-04 19:10:38 [   ERROR] no stream URL for game 533897

After deleting ~/.config/mlbstreamer/cookies and ~/.config/mlbstreamer/session everything works again.

I believe the following is happening:

  • mlbstreamer/mlbplay stores the authentication cookies and other keys and tokens.
  • The cookie has an expiration time of 24 hours, I don't know about the tokens.
  • mlbstreamer/mlbplay tries to use the expired information, gets an error and exits.

I think mlbstreamer/mlbplay should either consider the expiration times or simply try getting new information when this error occurs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant