streamrip icon indicating copy to clipboard operation
streamrip copied to clipboard

[BUG] The tool doesn't want to re-log in on TIDAL

Open StormProductionsMusic opened this issue 2 months ago • 46 comments

Describe the bug

Hi,

The config says:

If you haven't used streamrip in more than a week, you may have to log in again using `rip config --tidal

However when I tipe rip config --tidal, it says:

Error: No such option: --tidal

Am I missing something, or does the command actually not work?

Thanks!

Command Used

rip config --tidal

Debug Traceback

[21:44:48] DEBUG    Showing all debug logs                                                                    cli.py:111
Usage: rip config [OPTIONS] COMMAND [ARGS]...
Try 'rip config --help' for help.

Error: No such option: --tidal

Config File

Note: Credentials removed with AI, but all of them are correctly in the file.

[downloads]
# Folder where tracks are downloaded to
folder = "D:\\StreamripDownloads"
# Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal' etc.
source_subdirectories = true
# Put tracks in an album with 2 or more discs into a subfolder named `Disc N` 
disc_subdirectories = true
# Download (and convert) tracks all at once, instead of sequentially. 
# If you are converting the tracks, or have fast internet, this will 
# substantially improve processing speed.
concurrency = true
# The maximum number of tracks to download at once
# If you have very fast internet, you will benefit from a higher value,
# A value that is too high for your bandwidth may cause slowdowns
# Set to -1 for no limit
max_connections = 6
# Max number of API requests per source to handle per minute
# Set to -1 for no limit
requests_per_minute = 60
# Verify SSL certificates for API connections
# Set to false if you encounter SSL certificate verification errors (not recommended)
verify_ssl = true

[qobuz]
# 1: 320kbps MP3, 2: 16/44.1, 3: 24/<=96, 4: 24/>=96
quality = 4
# This will download booklet pdfs that are included with some albums
download_booklets = false

# Authenticate to Qobuz using auth token? Value can be true/false only
use_auth_token = false
# Enter your userid if the above use_auth_token is set to true, else enter your email
email_or_userid = "[Removed["
# Enter your auth token if the above use_auth_token is set to true, else enter the md5 hash of your plaintext password
password_or_token = "[Removed["
# Do not change
app_id = "[Removed["
# Do not change
secrets = ["[Removed[", "[Removed[", "[Removed["]

[tidal]
# 0: 256kbps AAC, 1: 320kbps AAC, 2: 16/44.1 "HiFi" FLAC, 3: 24/44.1 "MQA" FLAC
quality = 3
# This will download videos included in Video Albums.
download_videos = true

# Do not change any of the fields below
user_id = [Removed[
country_code = "GB"
access_token = "[Removed["
refresh_token = "[Removed["
# Tokens last 1 week after refresh. This is the Unix timestamp of the expiration
# time. If you haven't used streamrip in more than a week, you may have to log
# in again using `rip config --tidal`
token_expiry = [Removed[

[deezer]
# 0, 1, or 2
# This only applies to paid Deezer subscriptions. Those using deezloader
# are automatically limited to quality = 1
quality = 2
# An authentication cookie that allows streamrip to use your Deezer account
# See https://github.com/nathom/streamrip/wiki/Finding-Your-Deezer-ARL-Cookie
# for instructions on how to find this
arl = "[Removed["
# This allows for free 320kbps MP3 downloads from Deezer
# If an arl is provided, deezloader is never used
use_deezloader = true
# This warns you when the paid deezer account is not logged in and rip falls
# back to deezloader, which is unreliable
deezloader_warnings = true

[soundcloud]
# Only 0 is available for now
quality = 0
# This changes periodically, so it needs to be updated
client_id = "[Removed["
app_version = "[Removed["

[youtube]
# Only 0 is available for now
quality = 0
# Download the video along with the audio
download_videos = false
# The path to download the videos to
video_downloads_folder = "D:\\StreamripDownloads\\YouTubeVideos"

[database]
# Create a database that contains all the track IDs downloaded so far
# Any time a track logged in the database is requested, it is skipped
# This can be disabled temporarily with the --no-db flag
downloads_enabled = true
# Path to the downloads database 
downloads_path = "D:\\StreamripDownloads\\downloads.db"
# If a download fails, the item ID is stored here. Then, `rip repair` can be
# called to retry the downloads
failed_downloads_enabled = true
failed_downloads_path = "D:\\StreamripDownloads\\failed_downloads.db"

# Convert tracks to a codec after downloading them.
[conversion]
enabled = false
# FLAC, ALAC, OPUS, MP3, VORBIS, or AAC
codec = "ALAC"
# In Hz. Tracks are downsampled if their sampling rate is greater than this. 
# Value of 48000 is recommended to maximize quality and minimize space
sampling_rate = 48000
# Only 16 and 24 are available. It is only applied when the bit depth is higher
# than this value.
bit_depth = 24
# Only applicable for lossy codecs
lossy_bitrate = 320

# Filter a Qobuz artist's discography. Set to 'true' to turn on a filter.
# This will also be applied to other sources, but is not guaranteed to work correctly
[qobuz_filters]
# Remove Collectors Editions, live recordings, etc.
extras = false
# Picks the highest quality out of albums with identical titles.
repeats = false
# Remove EPs and Singles
non_albums = false
# Remove albums whose artist is not the one requested
features = false
# Skip non studio albums
non_studio_albums = false
# Only download remastered albums
non_remaster = false

[artwork]
# Write the image to the audio file
embed = true
# The size of the artwork to embed. Options: thumbnail, small, large, original.
# "original" images can be up to 30MB, and may fail embedding. 
# Using "large" is recommended.
embed_size = "original"
# If this is set to a value > 0, max(width, height) of the embedded art will be set to this value in pixels
# Proportions of the image will remain the same
embed_max_width = -1
# Save the cover image at the highest quality as a seperate jpg file
save_artwork = false
# If this is set to a value > 0, max(width, height) of the saved art will be set to this value in pixels
# Proportions of the image will remain the same
saved_max_width = -1

[metadata]
# Sets the value of the 'ALBUM' field in the metadata to the playlist's name. 
# This is useful if your music library software organizes tracks based on album name.
set_playlist_to_album = true
# If part of a playlist, sets the `tracknumber` field in the metadata to the track's 
# position in the playlist instead of its position in its album
renumber_playlist_tracks = true
# The following metadata tags won't be applied
# See https://github.com/nathom/streamrip/wiki/Metadata-Tag-Names for more info
exclude = []

# Changes the folder and file names generated by streamrip.
[filepaths]
# Create folders for single tracks within the downloads directory using the folder_format
# template
add_singles_to_folder = false
# Available keys: "albumartist", "title", "year", "bit_depth", "sampling_rate",
# "id", and "albumcomposer"
folder_format = "{albumartist} - {title} ({year}) [{container}] [{bit_depth}B-{sampling_rate}kHz]"
# Available keys: "tracknumber", "artist", "albumartist", "composer", "title",
# and "albumcomposer", "explicit"
track_format = "{tracknumber:02}. {artist} - {title}{explicit}"
# Only allow printable ASCII characters in filenames.
restrict_characters = false
# Truncate the filename if it is greater than this number of characters
# Setting this to false may cause downloads to fail on some systems
truncate_to = 120

# Last.fm playlists are downloaded by searching for the titles of the tracks
[lastfm]
# The source on which to search for the tracks.
source = "qobuz"
# If no results were found with the primary source, the item is searched for 
# on this one.
fallback_source = ""

[cli]
# Print "Downloading {Album name}" etc. to screen
text_output = false
# Show resolve, download progress bars
progress_bars = false
# The maximum number of search results to show in the interactive menu
max_search_results = 10

[misc]
# Metadata to identify this config file. Do not change.
version = "2.0.6"
# Print a message if a new version of streamrip is available 
check_for_updates = true

Operating System

Windows 11

streamrip version

2.1.0

Screenshots and recordings

No response

Additional context

No response

StormProductionsMusic avatar Oct 15 '25 18:10 StormProductionsMusic

The key that was used to access Tidal has been terminated and no longer valid. This is affecting a few other downloaders, too. There were other keys in the wild but I'm not sure at this time if those have been terminated as well. If you find the keys and are code saavy, you can change it in this file: streamrip/client/tidal.py

RyanThaDude avatar Oct 15 '25 19:10 RyanThaDude

The key that was used to access Tidal has been terminated and no longer valid. This is affecting a few other downloaders, too. There were other keys in the wild but I'm not sure at this time if those have been terminated as well. If you find the keys and are code saavy, you can change it in this file: streamrip/client/tidal.py

This is also impacting me. I'm code savvy, but I'm not aware of how to get the keys? Do I just grab my access token from my browser?

anujb avatar Oct 16 '25 00:10 anujb

The key that was used to access Tidal has been terminated and no longer valid. This is affecting a few other downloaders, too. There were other keys in the wild but I'm not sure at this time if those have been terminated as well. If you find the keys and are code saavy, you can change it in this file: streamrip/client/tidal.py

This is also impacting me. I'm code savvy, but I'm not aware of how to get the keys? Do I just grab my access token from my browser?

The client_id / client_secret replacement is only one piece of the puzzle anyway.

Tidal has also moved to DASH, so, any existing ripper that makes use of the old mechanism (single file retrieved over HTTPS) will need a relatively major overhaul to support downloading/concatenating the DASH segments.

vron-rgb avatar Oct 16 '25 10:10 vron-rgb

Thanks for clarifying. Given that project has quite a bit of work to update to the new DASH implementation and source a new client_id/secret...do you recommend I just move to Deezer or another alternative?

anujb avatar Oct 16 '25 15:10 anujb

Thanks for clarifying. Given that project has quite a bit of work to update to the new DASH implementation and source a new client_id/secret...do you recommend I just move to Deezer or another alternative?

I moved to OrpheusDL, seems like it's working perfectly.

StormProductionsMusic avatar Oct 16 '25 15:10 StormProductionsMusic

[21:44:48] DEBUG Showing all debug logs cli.py:111 Usage: rip config [OPTIONS] COMMAND [ARGS]... Try 'rip config --help' for help.

Error: No such option: --tidal

Got the same issue, does not list as well

mechaniq666 avatar Oct 16 '25 16:10 mechaniq666

Thanks for clarifying. Given that project has quite a bit of work to update to the new DASH implementation and source a new client_id/secret...do you recommend I just move to Deezer or another alternative?

If you need something quick, it might make sense. I am not sure about the "OrpheusDL" mentioned prior, or whether there are already any other open source alternatives that support the new architecture.

It's definitely quite possible to implement DASH downloads, I can't say how long it would take for a proper implementation or whether this project will see one.

vron-rgb avatar Oct 16 '25 16:10 vron-rgb

The key that was used to access Tidal has been terminated and no longer valid. This is affecting a few other downloaders, too. There were other keys in the wild but I'm not sure at this time if those have been terminated as well. If you find the keys and are code saavy, you can change it in this file: streamrip/client/tidal.py

This is also impacting me. I'm code savvy, but I'm not aware of how to get the keys? Do I just grab my access token from my browser?

The client_id / client_secret replacement is only one piece of the puzzle anyway.

Tidal has also moved to DASH, so, any existing ripper that makes use of the old mechanism (single file retrieved over HTTPS) will need a relatively major overhaul to support downloading/concatenating the DASH segments.

Since yesterday? I just gave stream rip a go at the beginning of the week and worked like a charm (though some options do not seem to work like this issue)

I got this message: Exception: Refresh failed

mechaniq666 avatar Oct 16 '25 16:10 mechaniq666

The key that was used to access Tidal has been terminated and no longer valid. This is affecting a few other downloaders, too. There were other keys in the wild but I'm not sure at this time if those have been terminated as well. If you find the keys and are code saavy, you can change it in this file: streamrip/client/tidal.py

This is also impacting me. I'm code savvy, but I'm not aware of how to get the keys? Do I just grab my access token from my browser?

The client_id / client_secret replacement is only one piece of the puzzle anyway. Tidal has also moved to DASH, so, any existing ripper that makes use of the old mechanism (single file retrieved over HTTPS) will need a relatively major overhaul to support downloading/concatenating the DASH segments.

Since yesterday? I just gave stream rip a go at the beginning of the week and worked like a charm (though some options do not seem to work like this issue)

I got this message: Exception: Refresh failed

Right. The Refresh failed exception is related to the no longer in use client_id / client_secret (pre-user login) that are in use. Tidal uses a new client_id / client_secret for non-authenticated requests. However, if you get a working client_id and client_secret, you will (almost definitely) then discover the next problem, which is that the stream delivery format has changed.

It is perhaps possible that some client_id / client_secret combination provided can be used to preserve the prior behavior (where the API provided a temporary link to a single audio file to play), but at this time I don't believe that to be the case.

vron-rgb avatar Oct 16 '25 16:10 vron-rgb

streamrip/client/tidal.py

where should that be on my Mac, can not find it thought it would be there a long the config file. Or am I just a bit blind ;)

mechaniq666 avatar Oct 16 '25 17:10 mechaniq666

streamrip/client/tidal.py

where should that be on my Mac, can not find it thought it would be there a long the config file. Or am I just a bit blind ;)

The answer to this depends on a few things - whether you use venv's, whether it was installed with Homebrew, installed globally or only for your user, etc.

"On macOS, Python packages are typically installed in the site-packages directory, which can be found at paths like /usr/local/lib/pythonX.Y/site-packages or /Library/Python/X.Y/site-packages, where X.Y corresponds to the version of Python you are using. If you installed Python via Homebrew, the packages may be located in /opt/homebrew/lib/pythonX.Y/site-packages."

vron-rgb avatar Oct 16 '25 17:10 vron-rgb

It looks like OrpheusDL uses the Atmos TV client_id/secret that could be repurposed here? Might just move to Deezer though since they will likely rotate this key too.

https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

anujb avatar Oct 16 '25 17:10 anujb

It looks like OrpheusDL uses the Atmos TV client_id/secret that could be repurposed here? Might just move to Deezer though since they will likely rotate this key too.

https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

That's kind of what I was hinting at -- if anything still works, it probably is using a different client_id/secret, since they are per-device type/application I believe. Webapp has one, android another, etc.

Similar to YouTube, though, you're probably correct in that the Atmos TV key/behavior will also likely soon change. It might work for a day, week, month, years... not sure. Haven't tested it personally.

vron-rgb avatar Oct 16 '25 17:10 vron-rgb

It looks like OrpheusDL uses the Atmos TV client_id/secret that could be repurposed here? Might just move to Deezer though since they will likely rotate this key too. https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

That's kind of what I was hinting at -- if anything still works, it probably is using a different client_id/secret, since they are per-device type/application I believe. Webapp has one, android another, etc.

Similar to YouTube, though, you're probably correct in that the Atmos TV key/behavior will also likely soon change. It might work for a day, week, month, years... not sure. Haven't tested it personally.

Is there a preferred service you use that works reliably with this project?

anujb avatar Oct 16 '25 17:10 anujb

It looks like OrpheusDL uses the Atmos TV client_id/secret that could be repurposed here? Might just move to Deezer though since they will likely rotate this key too. https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

That's kind of what I was hinting at -- if anything still works, it probably is using a different client_id/secret, since they are per-device type/application I believe. Webapp has one, android another, etc. Similar to YouTube, though, you're probably correct in that the Atmos TV key/behavior will also likely soon change. It might work for a day, week, month, years... not sure. Haven't tested it personally.

Is there a preferred service you use that works reliably with this project?

I only have experience with Tidal, but from what I understand Deezer is probably the closest in terms of available audio quality / catalog size. Not sure how "close".

vron-rgb avatar Oct 16 '25 17:10 vron-rgb

streamrip/client/tidal.py where should that be on my Mac, can not find it thought it would be there a long the config file. Or am I just a bit blind ;)

The answer to this depends on a few things - whether you use venv's, whether it was installed with Homebrew, installed globally or only for your user, etc.

"On macOS, Python packages are typically installed in the site-packages directory, which can be found at paths like /usr/local/lib/pythonX.Y/site-packages or /Library/Python/X.Y/site-packages, where X.Y corresponds to the version of Python you are using. If you installed Python via Homebrew, the packages may be located in /opt/homebrew/lib/pythonX.Y/site-packages."

thanks for the hint, found it /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamrip/client/tidal.py

mechaniq666 avatar Oct 16 '25 17:10 mechaniq666

It looks like OrpheusDL uses the Atmos TV client_id/secret that could be repurposed here? Might just move to Deezer though since they will likely rotate this key too. https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

That's kind of what I was hinting at -- if anything still works, it probably is using a different client_id/secret, since they are per-device type/application I believe. Webapp has one, android another, etc. Similar to YouTube, though, you're probably correct in that the Atmos TV key/behavior will also likely soon change. It might work for a day, week, month, years... not sure. Haven't tested it personally.

Is there a preferred service you use that works reliably with this project?

I only have experience with Tidal, but from what I understand Deezer is probably the closest in terms of available audio quality / catalog size. Not sure how "close".

Thank you. Yes I also prefer Tidal due to the higher quality audio. It looks like Qobuz is the best alternative for high quality audio.

anujb avatar Oct 16 '25 17:10 anujb

then someone found fix for streamrip and tidal ? because i think nathom can't fix very soon ...

cisko99za avatar Oct 17 '25 17:10 cisko99za

then someone found fix for streamrip and tidal ? because i think nathom can't fix very soon ...

I have spent hours in the config and manually grabbing fresh access keys from tidal android. It appears that Tidal has started generating keys that apparently last for less than a minute

OwenKDTS avatar Oct 17 '25 19:10 OwenKDTS

then someone found fix for streamrip and tidal ? because i think nathom can't fix very soon ...

I have spent hours in the config and manually grabbing fresh access keys from tidal android. It appears that Tidal has started generating keys that apparently last for less than a minute

Have you tried grabbing the client_id/secret from Orpheus and replacing it in tidal.py?

https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

anujb avatar Oct 17 '25 19:10 anujb

I have spent hours in the config and manually grabbing fresh access keys from tidal android. It appears that Tidal has started generating keys that apparently last for less than a minute

Have you tried grabbing the client_id/secret from Orpheus and replacing it in tidal.py?

https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

I have not tried that but I'm not savvy enough to really know what that is. I will def look into that tool and see if I can get it to work when I get off work

OwenKDTS avatar Oct 17 '25 19:10 OwenKDTS

Have you tried grabbing the client_id/secret from Orpheus and replacing it in tidal.py?

https://github.com/Dniel97/orpheusdl-tidal/blob/14305d3a68268ff78489054b0ccb64e0378f477b/interface.py#L25

Doesn't work.

dmpmem avatar Oct 17 '25 22:10 dmpmem

Hi, it worked perfectly using the orpheus keys, change the CLIENT_ID with a plain string, instead of base64 decode

Matias222 avatar Oct 18 '25 03:10 Matias222

Hi, it worked perfectly using the orpheus keys, change the CLIENT_ID with a plain string, instead of base64 decode

so this method work for streamrip? work now on tidal?

cisko99za avatar Oct 18 '25 10:10 cisko99za

Yes

Matias222 avatar Oct 18 '25 16:10 Matias222

the user above says not work ... and you can share here client_id/secret plain string? because i can't have/use orpheus, but streamrip only

cisko99za avatar Oct 18 '25 16:10 cisko99za

CLIENT_ID = "4N3n6Q1x95LL5K7p" CLIENT_SECRET = base64.b64decode( "oKOXfJW371cX6xaZ0PyhgGNBdNLlBZd4AKKYougMjik=", ).decode("iso-8859-1")

the user above says not work ... and you can share here client_id/secret plain string? because i can't have/use orpheus, but streamrip only

Matias222 avatar Oct 19 '25 02:10 Matias222

holy shit. not work for me. like the user above (dmpmem) already says .... i've edit tidal.py from C:\Program Files\Python312\Lib\site-packages\streamrip\client with the value above, then run streamrip, login from browser, but when run streamrip i get error TypeError: not all arguments converted during string formatting

cisko99za avatar Oct 19 '25 08:10 cisko99za

not all arguments converted during string formatting_

Did you remove the 'u' at the end of Tidal resource link? That could help I think.

I also applied what Matias222 advised, however still no success.

Do you guys maybe know how to 'force' streamrip to ask me for Tidal login/password again? I reinstalled both Python and streamrip, but it does not ask me about that anymore -- it only did one time, back when I was starting my adventure with all this some time ago. Thanks.

Image

hardy-mx avatar Oct 19 '25 11:10 hardy-mx

actually when click on 'share' then 'copy link' the link is without 'u'

and BIG news i've tried again just now and it WORK ! so big thanks @Matias222 your trick work fine ! (idk why i got an error message in the previous test ... but now work)

cisko99za avatar Oct 19 '25 12:10 cisko99za