TonyTromp / tidal-connect-docker

This is the dockerized version of Tidal Connect Raspberry binairies. Can be seemlessly used in HifiberryOS or any other RPi based operating system running Docker.
160 stars 28 forks source link

Tidal APK 2.65.1 - [error] handle_transport_init received error: TLS handshake failed #28

Closed paradix closed 1 year ago

paradix commented 1 year ago

After updating to APK 2.65.1 tidal connect stopped working.

Docker starts but the you can't connect to the player from the Android phone. The following error occurs: [error] handle_transport_init received error: TLS handshake failed

Can anyone confirm?

MoM-Raider commented 1 year ago

I can confirm this. It was also reported in another Thread. I fear they revoked the certificate that is used by the ifi leak we are using but understand to little about the handshake to be certain

SebastianoCurreli commented 1 year ago

I can confirm this too. For the sake of leaving an helpful note to the others encountering this issue: The last working APK is version 2.64.2, thus reverting is a temporary workaround. @MoM-Raider can you link the thread where they report this issue?

SebastianoCurreli commented 1 year ago

@TonyTromp in case @MoM-Raider 's guess would be correct (currently used ifi certificate being revoked) can you please tell us which one of the certs available in the seniorgod repo is currently the default one? We could run tests using the other one.

paradix commented 1 year ago

@SebastianoCurreli based on the entrypoint.sh script the certificate is used app/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat

SebastianoCurreli commented 1 year ago

@paradix I've tested both the certificates available at seiorgod repo on Tidal APKs version 2.64.2 and 2.65.1 and Windows client version 2.32.0.12. On Android devices both certificate work up to version 2.64.2, from version 2.65.1 both certificates failed the handshake. It seems that @MoM-Raider is right, either certificates got revocated or linked device IDs got blacklisted, yet they fail to handshake. On Windows, both certificate work fine up to 2.32.0.12 (latest for Windows 10), yet I'd not be surprised to see the block implemented for the windows client too in few days. This sucks. As of today blocking updates seems the only viable workaround.

charliesjc commented 1 year ago

Tidal seems to have made a mess of this anyway. I'm also using Volumio which is a Tidal sanctioned implementation of Tidal Connect and since a couple of days ago it has also broken with v2.65.1. On v2.65.0 and below it was still okay.

SebastianoCurreli commented 1 year ago

Maybe we could advise users to make a mass signalling to Tidal (i.e. on Reddit or to Tidal itself) to prompt Tidal devs to fix the mess.

TonyTromp commented 1 year ago

I truly hope Tidal opens up to the opensource community, and to be honest i have already moved on (away from using Tidal). Its a sad day.

SebastianoCurreli commented 1 year ago

@TonyTromp what service are you using if I can ask? Do you have another open source project related to hi-res music streaming?

mtimms1980 commented 1 year ago

It is frustrating, I only started using Tidal a few days before this happened and was stoked that this existed!

Oddly old versions of the app don't show the tidal connect service, and the old version of the app is laggy on my Pixel 6.

I was deciding between Qubuz and Tidal, and went for Tidal as it does offer some level of curated recommendations which I quite enjoyed on Spotify. As far as I am aware Qobuz does not do this.

Do you think this is an active move by Tidal to stop projects like this?

npmstart-pray commented 1 year ago

Possibly, but I'd lean more towards saying it's for their own internal purposes.

TonyTromp commented 1 year ago

@TonyTromp what service are you using if I can ask? Do you have another open source project related to hi-res music streaming?

I just started to use BluOS in my every day life as this just works and have most features i like in a digital setup. However I do miss the DSP settings from my Pi as this greatly improved overall sound reproduction in my room. That beeing said, i dont think that Tidal will ever provide an opensource API or free license for software like HifiBerry. Thus best is to move away unfortunately, until HifiBerry/Volumio gets the required certificate and does an official implementation.

What i still dont understand is that on "older" APKs, there is still no issue. If its a revoked certificate, it would mean that it should not work on earlier implementations either. Inless there was no certificate check to begin with (which i highly doubt), the check must be somewhere else. Maybe if lucky the "Android app" just started to use a different certificate and tries to handshake with the binairy (not via Tidal.com but directly to binary).

Some food for thought why this could be:

reidyrobot commented 1 year ago

I can't see it as a separate logged issue so just to confirm the same problem using the iOS app from my ipad. It's a bit trickier to revert in iOS and I haven't tried yet.

Gee, it'd be so great to have this working again. There's discussion on Volumio forum of a tidal app release on 21 Sept to fix the handshake issue so we live in hope.

paradix commented 1 year ago

@reidyrobot Can you please post a link to that volumio thread?

charliesjc commented 1 year ago

This one?

https://community.volumio.org/t/lost-tidal-connect-after-update/57503/28

reidyrobot commented 1 year ago

@reidyrobot Can you please post a link to that volumio thread?

https://community.volumio.org/t/tidal-connect-not-working-from-android-phone/57780/2

paradix commented 1 year ago

Tidal 2.68 still does not work.

reidyrobot commented 1 year ago

Weirdly enough when I tried to update my Android phone to test, it doesn't install 2.68 but rather an earlier 2.67x version, which as noted doesn't work.

the4anoni commented 1 year ago

Anyone knows how to block auto updates on desktop Tidal? 2.33.2.611-release works for now

Kybeer commented 1 year ago

Tidal 2.68 still does not work.

Same for me

npmstart-pray commented 1 year ago

Could it be that this is the way:

https://flathub.org/apps/details/com.mastermindzh.tidal-hifi

?

emerout commented 1 year ago

I use iOs since android app does not work anymore.

On iOs, I haven't updated Tidal app for several month, to avoid the same issue than with android.

Since a couple of day, iOs Tidal app doesn't work anymore, but without any TLS handshake failure in the tidal_connect log.

So I decided to update the iOs Tidal app, and surprisingly it works again ! It seems that they keep the same certificate than before.

paradix commented 1 year ago

@TonyTromp there is a solution for the handshake issue. Reach out please so that your docker image can be fixed

charliesjc commented 1 year ago

Ooh. I'm very keen to see what the fix is.

tiscali19 commented 1 year ago

Hello, what is the solution to the problem? I can connect only with Win10 and iOs...

TonyTromp commented 1 year ago

@TonyTromp there is a solution for the handshake issue. Reach out please so that your docker image can be fixed

Many many Thanks @paradix. I will test today and hope to have a new build ready by tomorrow! Looking very promising!

mtimms1980 commented 1 year ago

This is great news! How is the testing looking?

paradix commented 1 year ago

It's working for me. I tested on aarch64 (odroid) and on raspberry pi

mtimms1980 commented 1 year ago

Excellent!

SebastianoCurreli commented 1 year ago

If you guys need another tester feel free to reach out. I'm on HiFiBerryOS 221128, RPi4B Rev 1.2

charliesjc commented 1 year ago

Great, can’t wait to see how it was done.

Kybeer commented 1 year ago

@TonyTromp there is a solution for the handshake issue. Reach out please so that your docker image can be fixed

Many many Thanks @paradix. I will test today and hope to have a new build ready by tomorrow! Looking very promising!

Hi, any news to share? 😁😁😄

TonyTromp commented 1 year ago

Hi everyone,

Great news! I have patched the files with the certificate provided by @paradix. If people are willing to test together with me, i have checked in the latest version in this branch: https://github.com/TonyTromp/tidal-connect-docker/tree/bug/issue-28_tidal-apk-TLS-handshake. I will need to re-install my Hifiberry (as it was gathering dust for last month), so sorry if testing has been slow.

  1. Switch the 'Master' branch into '[bug/issue-28_tidal-apk-TLS-handshake]'
  2. Copy these files to your Raspberry Pi
  3. From terminal 'cd src/Docker' and build the docker image using './build_docker.sh' script
  4. run the 'install_hifiberry.sh' script

Happy testing!!! + Special thanks to @paradix for making us very Happy!!

Kybeer commented 1 year ago

Hi everyone,

Great news! I have patched the files with the certificate provided by @paradix. If people are willing to test together with me, i have checked in the latest version in this branch: https://github.com/TonyTromp/tidal-connect-docker/tree/bug/issue-28_tidal-apk-TLS-handshake. I will need to re-install my Hifiberry (as it was gathering dust for last month), so sorry if testing has been slow.

1. Switch the 'Master' branch into '[bug/issue-28_tidal-apk-TLS-handshake]'

2. Copy these files to your Raspberry Pi

3. From terminal 'cd src/Docker' and build the docker image using './build_docker.sh' script

4. run the 'install_hifiberry.sh' script

Happy testing!!! + Special thanks to @paradix for making us very Happy!!

It's working. Thanks a lot for the effort!

SebastianoCurreli commented 1 year ago

Great news, I'll test it tomorrow! Thanks @TonyTromp @paradix

tiscali19 commented 1 year ago

Thanks @TonyTromp and @paradix, It's working on my Android device!

P.S. @SebastianoCurreli , vivi in Sardegna?

TonyTromp commented 1 year ago

Great! With this latest effort, development on this project for HifiBerry can resume again. I will merge changes to master later today and checkin latest images on docker.io

SebastianoCurreli commented 1 year ago

tldr: @TonyTromp @paradix I've just tried the new certificate and it doesn't work on my rig with the latest Tidal APK.

Anybody testing had a similar outcome? @paradix @Kybeer @tiscali19 what's the Tidal APK version you guys are using?

Details: For the sake of details I'm posting all the steps to check whether I've made some trivial mistake.

  1. Rename the "old" certificate "IfiAudio_ZenStream.dat" to "IfiAudio_ZenStream.expired"
  2. Dowload the new certificate "IfiAudio_ZenStream.dat" from https://github.com/TonyTromp/tidal-connect-docker/tree/bug/issue-28_tidal-apk-TLS-handshake/Docker/src/id_certificate/
  3. rebuild the docker image using the "build_docker.sh" script
  4. installed the plugin using "install_hifiberry.sh' "script

I am on HiFiBerryOS 221128, RPi4B Rev 1.2 Tidal APK is the latest on Android 2.75.0.1096.9546

The new certificate works if I revert to Tidal APK 2.64.2

paradix commented 1 year ago

I'm using Tidal APK 2.75.0 without issues on two different setups. Works without issues.

You must have messed up something with the image build process.

Kybeer commented 1 year ago

Anybody testing had a similar outcome? @paradix @Kybeer @tiscali19 what's the Tidal APK version you guys are using?

@SebastianoCurreli I have no issues with this setup;

Raspberrypi 3 + RapsberryOS 11 + Docker Android phone + Tidal app v. 2.76.0 Installed Tidal Connect using instructions above from @TonyTromp

SebastianoCurreli commented 1 year ago

tldr: @TonyTromp @paradix I've just tried the new certificate and it doesn't work on my rig with the latest Tidal APK.

Anybody testing had a similar outcome? @paradix @Kybeer @tiscali19 what's the Tidal APK version you guys are using?

Details: For the sake of details I'm posting all the steps to check whether I've made some trivial mistake.

  1. Rename the "old" certificate "IfiAudio_ZenStream.dat" to "IfiAudio_ZenStream.expired"
  2. Dowload the new certificate "IfiAudio_ZenStream.dat" from https://github.com/TonyTromp/tidal-connect-docker/tree/bug/issue-28_tidal-apk-TLS-handshake/Docker/src/id_certificate/
  3. rebuild the docker image using the "build_docker.sh" script
  4. installed the plugin using "install_hifiberry.sh' "script

I am on HiFiBerryOS 221128, RPi4B Rev 1.2 Tidal APK is the latest on Android 2.75.0.1096.9546

The new certificate works if I revert to Tidal APK 2.64.2

Issue fixed. For some reason my "./Docker/entrypoint.sh" file was pointing to "IfiAudio_NeoStream.dat" certificate. Updating the reference to the new "IfiAudio_ZenStream.dat" certificate solved the issue.

Now I can confirm that HiFiBerryOS 221128 on RPi4B Rev 1.2 and Tidal APK 2.75.0.1096.9546 (latest on Android) have a working TidalConnect service.

Many thanks to @TonyTromp @paradix

Kybeer commented 1 year ago

@TonyTromp there is a solution for the handshake issue. Reach out please so that your docker image can be fixed

Many many Thanks @paradix. I will test today and hope to have a new build ready by tomorrow! Looking very promising!

Will this new certificate eventually expire (I assume yes?) and create the same problem again?

npmstart-pray commented 1 year ago

Expire or be revoked, yes, of course. That’s how it works by design. Sent from nowhere near my ready room with my new tricorderOn Feb 11, 2023, at 11:10, Kybeer @.***> wrote:

@TonyTromp there is a solution for the handshake issue. Reach out please so that your docker image can be fixed

Many many Thanks @paradix. I will test today and hope to have a new build ready by tomorrow! Looking very promising!

Will this new certificate eventually expire (I assume yes?) and create the same problem again?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

TonyTromp commented 1 year ago

If its similar to x509, We should be able to check the validity of the certificate i hope

mtimms1980 commented 1 year ago

Hi everyone,

Great news! I have patched the files with the certificate provided by @paradix. If people are willing to test together with me, i have checked in the latest version in this branch: https://github.com/TonyTromp/tidal-connect-docker/tree/bug/issue-28_tidal-apk-TLS-handshake. I will need to re-install my Hifiberry (as it was gathering dust for last month), so sorry if testing has been slow.

  1. Switch the 'Master' branch into '[bug/issue-28_tidal-apk-TLS-handshake]'
  2. Copy these files to your Raspberry Pi
  3. From terminal 'cd src/Docker' and build the docker image using './build_docker.sh' script
  4. run the 'install_hifiberry.sh' script

Happy testing!!! + Special thanks to @paradix for making us very Happy!!

Sorry if I am being an idiot, I have en existing pi with hifiberry setup from when this worked previously. What would the steps be to apply this fix? Or even from a newly setup pi using hifiberry. Thanks in advance.

tiscali19 commented 1 year ago

@mtimms1980 : you are using Docker? If not using, download new IfiAudio_ZenStream.dat file and overwite them

mtimms1980 commented 1 year ago

@tiscali19 I am using Docker, but only because I started from TonyTromp's method. Happy to start from scratch to get this up and running again.

mtimms1980 commented 1 year ago

Just started from scratch, and it is working great! (some bass distortion, but I think that is probably my receiver setup!) Thanks for the hard work on this.

TonyTromp commented 1 year ago

I have merged the Pull Request with the main branch.

If there are any issues, please create a new 'issue' and we can follow-up (as this issue is auto-closed by the PR merge).

reidyrobot commented 1 year ago

Just dropped by to say thanks for sorting this issue! much appreciated.