Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

(i) Login... Network error: TLS handshake failed. #321

Closed
fapestniegd opened this Issue · 48 comments
@fapestniegd

I could not get mp3-hifi to work, so so I used the following (from
nega0/pianobarfly#37) to get a bit rate of 193 kpbs instead of 64kbps, and it stopped working with
"(i) Login... Network error: TLS handshake failed. " some time this afternoon. I assumed they changed one of these parameters, but have no idea where to find the new ones.

or if audio_format = mp3-hifi would work that would be better. Any advice on how to get 192kbps again from my PandoraOne subscription would be appreciated.

#audio_format = mp3-hifi
audio_quality = high
rpc_host = internal-tuner.pandora.com
partner_user = pandora one
partner_password = TVCKIBGS9AO9TSYLNNFUML0743LH82D
device = D01
encrypt_password = 2%3WCL*JU$MP]4
decrypt_password = U#IO$RZPAB%VX2
tls_fingerprint = 394067EECB420E3911985C2CC02C12AE89BB09B2

@dlobue

I have been getting this error as well. It just started this morning, and I have had high quality audio on for months. Oddly pianobar works when I disable high quality audio.

fapestniegd: Your configuration is correct, it is the exact same settings I have been using. There is something else wrong.

Perhaps the passwords or tls_fingerprint have changed?

@fapestniegd

dlobue: that was my suspicion as well

@PromyLOPh
Owner
@Adastras

Using the new tls_fingerprint still results in a read failure for me. Did anything else change?

@fapestniegd

Same result (Login... Network error: TLS read failed.) with the new tls_fingerprint.

@PromyLOPh
Owner
@dfacto82

That fix doesn't work for me ... :(

@dfacto82

Ah it works but not with my pandora one settings...

@PromyLOPh
Owner

Can you be more precise? What is the error message?

@fapestniegd

It works for me with the partner settings in the Original post and the tls_fingerprint PromyLOPh provided.
(I get 192 kbps)

@brandon-beacher

Here are my settings - but I still get (i) Login... Network error: TLS read failed.

# high-quality audio (192k mp3, for Pandora One subscribers only!)
audio_quality = high
rpc_host = internal-tuner.pandora.com
partner_user = pandora one
partner_password = TVCKIBGS9AO9TSYLNNFUML0743LH82D
device = D01
encrypt_password = 2%3WCL*JU$MP]4
decrypt_password = U#IO$RZPAB%VX2
tls_fingerprint = B0A1EB460B1B6F33A1B6CB500C6523CB2E6EC946

@fapestniegd can you paste your config file here?

@Verohomie

I too get (i) Login... Network error: TLS read failed.
I applied temp fix https://gist.github.com/4051586
I changed the tls_fingerprint B0A1EB460B1B6F33A1B6CB500C6523CB2E6EC946
And even dropped audio_quality=low.

Still no music :( - thanks Brad

@PromyLOPh
Owner
@Verohomie

Replaced -9 with GNUTLS_E_PREMATURE_TERMINATION on line 540.
Still getting Network error: TLS read failed :(

@ledoktre

Where do you replace -9 with GNUTLS_E_PREMATURE_TERMINATION? I tried the 'quick and dirty' patch but it failed to compile for me, citing that GNUTLS_E_PREMATURE_TERMINATION variable did not exist. I've got the same config as the original post with the updated tls_fingerprint.

@Verohomie

I manually patched /src/libwaitress/waitress.c with the 4 + lines from https://gist.github.com/4061896
Pianobar ran fine until Network error: TLS read failed.

@ledoktre

@Verohomie - Thats what I did too. I just found the spot, pasted them in there (without the + of course), and did gmake clean && gmake. It wouldn't compile, it barked.

@PromyLOPh
Owner
@dlobue

@PromyLOPh: using GNUTLS_E_PREMATURE_TERMINATION did the trick. I modified your patch to try both: https://gist.github.com/4073773
and it works! thanks!

I have gnutls 3.1.3

@ledoktre

@PromyLOPh : I'm running Mint Debian, and my GnuTLS is from the standard repo. My system shows version 2.12.20-1.

@pvstodghill

I modified @dlobue's patch to allow for different versions of gnutls.

https://gist.github.com/4078695

It compiles against gnutls 3.1.3 on OS X and 2.8.6 on Debian Squeeze. Using the new tls_fingerprint that @PromyLOPh provided (B0A1EB460B1B6F33A1B6CB500C6523CB2E6EC946), pianobar runs successfully on my OS X machine. I can't test the Linux box at the moment because it's remote.

@PromyLOPh
Owner
@Verohomie

Thanks to @pvstodghill's patch I am playing music on a ALIX board running Linux-Voyage 0.8!

@r35krag0th

Add this line to your config files. It will make all things well again.

tls_fingerprint = 2D0AFDAFA16F4B5C0A43F3CB1D4752F9535507C0

@r35krag0th

Here's a crappy but working script that will get the current TLS Fingerprint --> https://gist.github.com/4173333

@krunk4ever

Thanks @r35krag0th! pianobar stopped working for me earlier today. adding the tls_fingerprint worked.

@Coaxial

Changing the tls_fingerprint to 2D0AFDAFA16F4B5C0A43F3CB1D4752F9535507C0 worked for me too

@perette

2D0AFDAFA16F4B5C0A43F3CB1D4752F9535507C0 is working for me.
@r35krag0th: Your script to get the TLS fingerprint rocks. Thanks!

@haxwithaxe

works for me as well
here is a quick little bash script for grabbing the tls fingerprint and sticking it in the config before running pianobar.
https://github.com/haxwithaxe/scripts/blob/master/pianobar.sh

@jacroe

@haxwithaxe I couldn't get your script to append it. It got the fingerprint fine, but wouldn't stick it in the config.

Here's a one-liner that I used on my Pi via SSH: https://gist.github.com/4200610. Works easily enough.

@PromyLOPh
Owner

Please move the fingerprint discussion to #324. This issue is about a different problem that happened to have the same error message (until 2012.12.01). Thanks.

@prattmic prattmic referenced this issue from a commit in prattmic/pianobar
@prattmic prattmic Apply @pvstodghill's patch from Issue #321
Fixes TLS read errors when attempting to get high quality audio.
1bbb2a7
@perette

Also encountered this when trying to use Pandora One, but Promy's patch didn't work. Here's my variation on Promy's 4-line workaround:

#ifdef ENABLE_BUGS
if (ret == GNUTLS_E_UNEXPECTED_PACKET_LENGTH || ret == GNUTLS_E_PREMATURE_TERMINATION) {
*retSize = 0;
return waith->request.readWriteRet;
}

#endif

Some guys discussing a similar problem in a different program (Filezilla) suggested a router (say, the ubiquitous $30 gateway router) in the middle was probably breaking things.

@PromyLOPh
Owner

Please give this patch a try: https://gist.github.com/anonymous/5541265

@Kickflip7

Could someone explain to me how do I apply @pvstodghill's patch?

@prattmic

You should be able to use patch from the pianobar directory:

patch -p1 < gnutls.patch
@PromyLOPh PromyLOPh closed this issue from a commit
@PromyLOPh waitress: Close connection if body has been received
Now libwaitress won’t wait until the server closes the connection if the
request body has been received. Multiple requests per connection are not
supported anyway. Fixes #321. Thanks to Michael Stowe.
ea4324b
@PromyLOPh PromyLOPh closed this in ea4324b
@Nybbling

So about an hour ago today (2pm MST) my pianobar stopped authenticating, blaming the TLS handshake.

If I put a config file in with either the fingerprint that fixed this issue 9 months ago or with a number I pulled with OpenSSL today, I get "(i)Login...OK \n (i)Get Stations... Error: Internal error."

Can anybody confirm this, or is our office an isolated incident? (Win7, Win8, and OSX 10.8 all showing these symptoms)

@prattmic
@Nybbling

That's what I was hoping, but my browser is still working fine... but if yours isn't the issues could be intermittent. I'll wait it out. Thanks!

@lordB8r
@kylebradshaw

I'm getting this error "Login... Network error: TLS read failed." - I think their tls_fingerprint has changed, I'm setting these up for a group of school kids and all the boxes were working just last week. This is the only possible explanation.

Is there any way to ascertain from Pandora what the new tls_fingerprint is?

@perette
@derobert
@pixster

Originally, a year ago pianobar was working fine, they it developed a problem of NOT being able to change the volume. I finally gave up and created a new SD Card with nothing on it but RPi.GPIO and wiringPi. Then I installed a fresh copy of pianobar, copied over the config file and even ran the shell that shows what the current TLS should be. It happens to be the correct one.

pianobar installed without a hitch, but I'm still getting: Network error: TLS handshake failed

ALL of the pertinent files are installed: alsa-utils, mpg321, lame. Also ran:
sudo modprobe snd-bcm2835

Does anyone have a clue This used to work perfect!!

@PromyLOPh
Owner
@pixster

I have 2012.05.06. If that's not the latest, where do I go to get the latest?
thanks!

@PromyLOPh
Owner
@pixster

Sorry, what is it the location for cloning and how do I clone it and then compile the whole thing?
Be patient, I'm old!

@PromyLOPh
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.