mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-24 23:06:13 +03:00
[GH-ISSUE #857] "Authentication Failed" when pasting request headers from Chrome #524
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#524
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @apastel on GitHub (Jan 27, 2026).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/857
Describe the bug
When pasting request headers from Chrome (even though Firefox is recommended), the authentication process fails with:
The reason this happens is because starting sometime early last year, Chrome request headers are copied to your clipboard without a colon at the end of each key. For example:
This breaks the parser in
browser.py:setup_browser.I've been working on a solution but it's a bit tricky since now the header keys and header values don't have any distinguishing characteristics from each other -- you kind of just have to assume the first line is a key and the 2nd line is a value and go from there.
References:
github.com/apastel/ytmusic-deleter@56726397b8/ytmusic_deleter/common.py (L94)We could port over that fix to ytmusicapi but I'm not super proud of it. I would rather start with the existing fix that uses
chrome_remembered_keyand modify that instead. I started to work on something but so far it's not quite working yet.ytmusicapi version
1.11.4
To Reproduce
Steps to reproduce the behavior:
@sigma67 commented on GitHub (Jan 31, 2026):
PR welcome