[GH-ISSUE #491] Fresh tokens are constantly refreshed #365

Closed
opened 2026-02-27 23:00:24 +03:00 by kerem · 0 comments
Owner

Originally created by @heisen273 on GitHub (Dec 18, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/491

Describe the bug
I think there's a typo/mistake in oauth.load_headers() that causes fresh token constantly refresh itself:

Screenshot 2023-12-18 at 22 20 27

Highlighted line will always return True and self.refresh_token() will be executed every time when new request is done.

To Reproduce
Steps to reproduce the behavior:

  1. Go to load_headers() method
  2. Click on line 97 and put breakpoint.
  3. Build YTMusic class and use it 2+ times.
  4. See that refresh_token is constantly triggered.
Originally created by @heisen273 on GitHub (Dec 18, 2023). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/491 **Describe the bug** I think there's a typo/mistake in `oauth.load_headers()` that causes fresh token constantly refresh itself: <img width="774" alt="Screenshot 2023-12-18 at 22 20 27" src="https://github.com/sigma67/ytmusicapi/assets/13763176/4e2fcfa0-4bd1-4bf3-ac18-cbeb84f9a6a2"> Highlighted line will always return `True` and `self.refresh_token()` will be executed every time when new request is done. **To Reproduce** Steps to reproduce the behavior: 1. Go to `load_headers()` method 2. Click on line 97 and put breakpoint. 3. Build `YTMusic` class and use it 2+ times. 4. See that refresh_token is constantly triggered.
kerem closed this issue 2026-02-27 23:00:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#365
No description provided.