I can't login to Tidal

Hi @dylan,

I’m currently away from home for work but I am able to confirm that installing Roon to my work laptop and logging into Tidal there works. As I proposed in my original post there is some networking issue that is preventing my home Roon server from being able to login to Tidal.

Unfortunately, as Roon provides no context around what sort of connection it is attempting to make to Tidal I have no way of testing that connection in isolation to ensure hosts are reachable, etc. I’ve modified every setting I can think of that could be responsible, to no avail.

Given the issues with Tidal integration that are frequently posted here I’d have hoped the implementation details would be documented to assist in troubleshooting.

Nils

@support please make an official statement regarding the state of the Tidal integration and these ongoing issues that have arisen in recent months. There are lots of paying users here with nebulous problems that are occurring in setups that have worked flawlessly for years.

They deserve a statement acknowledging that there’s a problem with the integration and stating whether or not it has the attention of the Roon & Tidal developers.

So is there any further advice from the Roon team for debugging this?

I lost my TIDAL after a manual back-up. (this following a clean install) Strange thing is the fact I didn’t get a warning, seemed logged-in, but it just didn’t load anything.

All playlists are empty. Only the one I opened yesterday was there and it played, the signal path showed TIDAL as origin. Even the song of which I’m sure I didn’t play before. (I only played two of the list)

So connected, but no info or data showing, just a loading icon.

@support my setup is still broken in the exact manner described in my original post.

I’ve found logs that finally give some detail around the failure:

02/08 11:19:32 Trace: [tidal/http] POST https://api.tidalhifi.com/v1/login/username => Success
02/08 11:19:32 Warn: [tidal/http] https://api.tidalhifi.com/v1/login/username? failed (deserialize): Sooloos.JSONExtensi
ons.JSONException: JSON: missing required string field: userId
at Sooloos.JSONExtensions.Extensions.GetString (System.Object o, System.String key) [0x0001a] in <a0f3dcf79d2341d68a98
a1f4974e147e>:0
at Sooloos.Tidal.LoginResult.Parse (System.Object o) [0x00005] in <d2c716725a6a4ba99c35faee3b0db77e>:0
at Sooloos.Tidal.Proxy.HandleJsonResponse[T] (System.String url, System.String etag, System.Func`2[T,TResult] parse_js
on, System.String responsebody, Base.ResultCallback`1[T] cb_result) [0x0009d] in <d2c716725a6a4ba99c35faee3b0db77e>:0
02/08 11:19:32 Info: [broker/locations] updating location Tidal:Name=TIDAL:Id=a2bc918b-81fb-abc3-f24b-19bcfed910a2

The submission of my username & password to /login/username was a success, but then the response didn’t contain the “userId” field that was expected.

This doesn’t appear to be any issue at the networking level of my machine since a request is being made to the Tidal API successfully.

@dylan @support Additionally I’ve been able to write a basic NodeJS script using the tidal-api-wrapper library to test a Tidal login from this Linux machine and it succeeded without any error whatsoever:

> var Tidal = require('tidal-api-wrapper')
> var tidal = new Tidal();
> tidal.login(myUsername, myPassword).catch((e) => console.log('error', e)).then((s) => console.log('success', s))
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events: { error: [Function: debugDomainError] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [] } }
> success { userId: 167432555,
  sessionId: CENSORED,
  countryCode: 'CA' }

This request, essentially the same one as Roon is attempting, succeeds and returns a userId, when running in the same system & network environment.

What is Roon doing that is so different than every other way of logging into Tidal? I can’t assist in debugging this unless I understand how it’s supposed to be working.

2 posts were split to a new topic: Having difficulties logging in to TIDAL

I’ve rebooted my server way more than twice already. Please refer to the OP for everything I’ve tried in an attempt to resolve this or post in your own thread.

@support is there anything I should try to continue debugging this?

Comparing my logs with those of another user (and the request I made from the NodeJS script) I noticed something. My Roon logs don’t include the required Tidal API token as part of the request!! See my logs:
Trace: [tidal/http] POST https://api.tidalhifi.com/v1/login/username => Success
vs this user:
Trace: [tidal/http] POST https://api.tidalhifi.com/v1/login/username?token=Imi5DLPIAVRmszdL => Success
and while investigating how the NodeJS library works, it also makes a request inlcuding a token:
url: 'https://api.tidal.com/v1/login/username?token=wdgaB1CilGA-S_s2',

A missing parameter in the request like this would explain why the response doesn’t contain the userId like expected.

Why might Roon forget to include this required parameter in it’s requests?

Hi @Nils_Lundquist,

I discussed this issue with the team and I think the next step here is to enable some diagnostics on your account so our technical staff can get some more insight into what’s going on here.

However, before I enable this feature, I’d like to ask for your help ensuring we gather the right information.

First, can you please reproduce the issue once more and note the time at which the error occurs. Then respond here with that time, and I’ll make sure we review the diagnostics related to that timestamp.

1 Like

hi @dylan so I’ve done as you’ve asked. I attempted 3 logins today. All of which readily reproduced the issue:

1 @ ~12:44:30PM MST
2 @ ~12:45:00PM MST
3 @ ~12:45:30PM MST

I can confirm that if you enter incorrect username/password, the Tidal API will return a JSON object that does not have a userId field.

{'status': 401, 'subStatus': 3001, 'userMessage': 'Username or password is wrong'}
This is how the error you posted would have happened.

failed (deserialize): Sooloos.JSONExtensi ons.JSONException: JSON: missing required string field: userId

@Nils_Lundquist , are you able to successfully sign in to https://listen.tidal.com with the username/password that you’re trying with Roon?

@Benjamin_Rumble …yes. The first point of my OP:

  • my tidal account is in good standing and works everywhere else

The NodeJS script that makes a successful login you see above? It was run by me. With my Tidal credentials. Which work.

The Tidal app works. The Tidal website work. My Tidal phone apps work. The Plex/Tidal Integration works. It all works with one notable exception.

(I even ended up turning off & unpairing the Plex/Tidal integration to confirm it wasn’t interfering somewhow. I’ve also conducted testing with the Plex instance on this machine disabled, to no effect.)

@support / @dylan when you get a chance please confirm if your team was able to gather the diagnostics they needed

Thanks for the timestamps, @Nils_Lundquist — The diagnostics report has been received and with the team for analysis. I’ll be sure to reach out to you as soon as I have their feedback.

Thank you @dylan!

However with mild embarrassment I have to admit I think I’ve finally resolved my issue on my own. Though maybe something changed on your end, salvaging my pride :stuck_out_tongue:

Despite many changes around the DNS servers used by my system, I only did testing with the pi-hole instance installed on the system disabled once, and I hadn’t noticed any change in behavior. Ultimately, after fully removing pi-hole and restarting the system, my login to Tidal succeeded :0

I cannot possibly explain how Pi-Hole was blocking Roon, but the requests made by the NodeJS script succeeded (and in addition so did a Tidal client running in a VM). There appears to be different means of resolving DNS between Roon and other processes on the system like the Node runtime.

A nice diagnostic that could be run by Roon to assist in situations like this either could be:

  • A check by Roon to see if the IP resolved for the Tidal API host is a known good Tidal server, low-visibility warning if not (probably impractical, requires a white list)
  • An error that more specifically explains “there’s an HTTP server here but it’s not a valid Tidal API endpoint”. Note this is different than a misunderstood response error. Ideally this would make use of a simple request to the API, the response of which is unique & consistent enough to be used to “fingerprint” the host as a Tidal API server. If that request succeeds but doesn’t have the expected fingerprint we know with especially high certainty there’s a DNS issue.

Thanks for the update, @Nils_Lundquist! I’m glad to hear that things are working for you now. I’ll be sure to run this solution by the team so they can understand what happened here. I appreciate the detailed explanation!

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.