Home of the Squeezebox™ & Transporter® network music players.
Page 28 of 31 FirstFirst ... 182627282930 ... LastLast
Results 271 to 280 of 305
  1. #271
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    19,296
    Quote Originally Posted by inquisitivej View Post
    I copy/pasted a failed URL from the server log into safari on the computer running LMS and it returned a 403. I tried again with https and it worked. I wonder how quickly we can get a fix for this.
    You may have a 2nd https specific issue. Your IO::Socket::SSL shows a version 1.966 (which is from 2014 !!) - you'll need at least a 2.0* for https to work with most internet services nowadays.

    You need to update IO::Socket::SSL, Net::SSLeay and make sure "openssl version" is at least 1.1.*

  2. #272
    Quote Originally Posted by jsc010 View Post
    ups! you're right... in chrome shows me an app streaming music ....

    Yep, same thing I saw.

    I changed from direct streaming to proxied on my player configuration and the errors in the log became wimp errors ("warning stream failed to open") but I imagine due to the same reason. Something up with not using https or some cloudfront problem or maybe a bit of both?

  3. #273
    Junior Member
    Join Date
    Mar 2010
    Posts
    11
    Quote Originally Posted by mherger View Post
    >Ok, you seem to be pretty technical :-). Could you please try to replace
    http with https (or vice versa) for one of those non-working URLs? Would
    they work then (using curl or the like)?

    --

    Michael
    YYes, it seems if we modify the streamUrl returned from MSB.com and change the scheme from http:// to https://, the resulting URL will succeed.

    If you don't mind editing source code, the following workaround might be helpful.

    1. In a terminal, cd to the location of your squeezeboxserver Perl modules. For many Linuxes, this will be /usr/share/perl5, but can vary.
    2. Now cd to Slim/Plugin/WiMP
    3. Start editing the file ProtocolHandler.pm
    4. Find the subroutine _gotTrack and change the initial lines to this.:
    Code:
    sub _gotTrack {
    	my ( $client, $info, $params ) = @_;
    
    	main::DEBUGLOG && $log->is_debug && $log->debug('Original URL: ' . $info->{url});
    
    	# START workaround for bad streamUrl scheme from MSB.com #
    	if ($info->{url}) {
    		$info->{url} =~ s/http:/https:/;
    	}
    	# END workaround for bad streamUrl scheme from MSB.com #
    	
        my $song = $params->{song};
    5. Restart LMS.

    Apologies for the more complicated solution I proposed (and have now deleted) moments ago. I should have done as Michael asked straight off. Thanks for suggesting it, Michael!

    --Carl
    Last edited by csmig; 2020-10-17 at 16:55.

  4. #274
    Quote Originally Posted by csmig View Post
    I find that Tidal works equally well with both http:// and https:// schemes, I can even interchange them within a session.

    I know what follows will not be helpful to everyone. But if you are a developer-type AND you have a Tidal premium account AND you understand how to obtain a Tidal sessionId from the TidalAPI, then you may be able to apply this temporary local fix. It gets the streamUrl directly from Tidal and substitutes it for the streamUrl obtained from mysqueezebox.com

    0. Obtain a Tidal sessionId. They are valid for a very long time (months). You can sniff an existing web session, use Chrome Developer Tools, or use this python library (https://pypi.org/project/tidalapi/)
    1. In a terminal, cd to the location of your squeezeboxserver Perl modules. For many Linuxes, this will be /usr/share/perl5, but can vary.
    2. Now cd to Slim/Plugin/WiMP
    3. Start editing the file ProtocolHandler.pm
    4. Find the subroutine _gotTrack (line 243 in the current commit, YMMV) and modify the initial code so you end up with something like this:
    Code:
    sub _gotTrack {
    	my ( $client, $info, $params ) = @_;
          
            # START of workaround for bad streamUrls from www.squeezebox.com #
    	my $tidalInfo;
            my $tidalSessionId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' #INSERT YOUR TIDAL SESSIONID HERE
    	if ($info->{id}) {
    		main::DEBUGLOG && $log->is_debug && $log->debug('Calling TidalAPI directly for streamUrl of track ' . $info->{id});
    		my $tidalUrl = 'http://api.tidalhifi.com/v1/tracks/' . $info->{id} . '/streamUrl?sessionId=' . $tidalSessionId . '&countryCode=US&limit=999&soundQuality=LOSSLESS';
    		my $response = LWP::UserAgent->new->get( $tidalUrl );
    		$tidalInfo = eval { from_json( $response->content ) };
    		if ($tidalInfo->{url}) {
    			main::DEBUGLOG && $log->is_debug && $log->debug('Substituting url: ' . $tidalInfo->{url});
    			$info->{url} = $tidalInfo->{url};
    		}
    	}
            # END of workaround for bad streamUrls from www.squeezebox.com #
    	
            my $song = $params->{song};
    The line my $song = $params->{song}; is where the original code picks up. Save your changes.

    5. Find the subroutine _getTrack and within this routine change the line:
    Code:
    if ( $@ || $info->{error} ) {
    to
    Code:
    if ( $@ ) {
    This is line 205 in the current commit, YMMV. I found this necessary because even with (or maybe because of) the streamUrl replacement, MSB.com is generating additional errors about the SqueezeNetwork session not have Streaming privileges.

    6. Restart LMS.

    I'm so sorry this is probably obtuse for non-developers, but I offer it as a temporary fix that will get some of us though the weekend with our Tidal tunes :-).

    Hopefully, those with the proper access to MSB.com will sort out why the streamUrls from there are so wrong.

    --Carl
    FWIW... I installed a proxy on my mac running the server. I configured the player to not use direct streaming. I configured the server to use the proxy. I configured the proxy to rewrite the request with https and I get things to play. They stop after 25-30 seconds, but I actually hear sound and bits are flowing end to end. I think the reason stops could be I'm use a "free" version of the proxy and it might be limiting how much can be retrieved or something. not sure.

    If I set the player to instead use direct streaming I go back to the problem where 403 errors are generated (doesnt use the proxy setting the server has and goes back to failing). I'm not sure why this works given your workaround with the session ID. modifying that perl file is a more sustainable way than this proxy. thought I would share to see if helps finding the ultimate root cause.

  5. #275
    Junior Member
    Join Date
    Mar 2010
    Posts
    11
    Quote Originally Posted by csmig View Post
    Apologies for the more complicated solution I proposed (and have now deleted) moments ago. I should have done as Michael asked straight off. Thanks for suggesting it, Michael!

    --Carl
    I'll retract the apology slightly. The scheme substitution workaround does not seem to work if players are synchronized (remote streaming vs direct). My more complicated solution (make a separate call to the Tidal API) works in both cases. Of course, I have deleted the post with that solution. This is a signal that I am too tired to keep at this. If you are interested in the other workaround which requires you know a Tidal sessionId, ask for it and I will repost.

  6. #276
    Junior Member
    Join Date
    Jun 2020
    Posts
    4

    Do I need Tidal HiFi subscription to stream to piCorePlayer now?

    Sorry, I posted this in another area specific to a SB hardware platform. I have been spending a few hours viewing forums and trying to figure out why I can not stream from Tidal to my piCorePlayers. I have a "premium" account, not a "HiFi" account. Do I now need a "HiFi" account?

    LMS v8.0.0
    piCorePlayer v6.1.0 www v0009
    Squeezelite v1.9.7-1278-pCP

    Thanks,

    Steve

  7. #277
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,460

    Attention TIDAL users - changesahead!

    > I'll retract the apology slightly. The scheme substitution workaround
    > does not seem to work if players are synchronized (remote streaming vs
    > direct). My more complicated solution (make a separate call to the Tidal
    > API) works in both cases. Of course, I have deleted the post with that
    > solution.


    No need to apologize at all! You're investigation is super helpful, and
    I'll see what I can pick out of it.

    What is slightly confusing/unsettling is the fact that the call you're
    using is what TIDAL says was outdated, not to be used anymore. They
    specifically asked me to replace it with a new endpoint a few months
    ago... That's great information to have none the less. It'll at least
    give me some more information to share with TIDAL engineers to figure
    out what's going on.

    Thanks for sharing your findings!

    --

    Michael

  8. #278
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,460

    Attention TIDAL users - changesahead!

    Ok, here's what I've found: TIDAL seems to be using a different caching
    system in some parts of the world. One which doesn't support http, but
    https only. Whereas the other parts can use both. LMS/SB relies on http,
    as the players don't support https.

    --

    Michael

  9. #279
    Junior Member
    Join Date
    Nov 2015
    Posts
    7
    Quote Originally Posted by mherger View Post
    Ok, here's what I've found: TIDAL seems to be using a different caching
    system in some parts of the world. One which doesn't support http, but
    https only. Whereas the other parts can use both. LMS/SB relies on http,
    as the players don't support https.

    --

    Michael
    Michael should we wait for a solution from Tidal? or maybe a workaround like suggested csmig (thanks by the way...)
    best regards

  10. #280
    Senior Member
    Join Date
    Dec 2018
    Location
    The Netherlands
    Posts
    106
    Quote Originally Posted by Steve B View Post
    Sorry, I posted this in another area specific to a SB hardware platform. I have been spending a few hours viewing forums and trying to figure out why I can not stream from Tidal to my piCorePlayers. I have a "premium" account, not a "HiFi" account. Do I now need a "HiFi" account?

    LMS v8.0.0
    piCorePlayer v6.1.0 www v0009
    Squeezelite v1.9.7-1278-pCP
    I have a Tidal Premium account (that provides only AAC streams) and streaming from Tidal to my piCorePlayer works without problem. Not sure why it does not work at your end. It may be a Tidal issue, since I read many messages that Tidal streaming does not work this weekend in many regions in the world. No problem here in Europe. In which country are you living?

    Also "LMS v8.0.0" does not mean much, because since the beginning of this year there have been at least 50 different LMS 8.0.0 releases. I suggest to download the latest LMS 8.0.0 from http://downloads.slimdevices.com/nightly/?ver=8.0. If you keep having problems, I suggest to copy and paste detailed LMS information including OS that you are using from LMS web GUI => Settings => Information tab. See example below:

    Logitech Media Server Version: 8.0.0 - 1602925693 @ Sat Oct 17 11:13:08 WEDT 2020
    Hostname: ATOM
    Server IP Address: 192.168.0.101
    Server HTTP Port Number: 9000
    Operating system: Windows 7 - EN - cp1252
    Platform Architecture: 8664
    Perl Version: 5.14.1 - MSWin32-x86-multi-thread
    Audio::Scan: 1.02
    IO::Socket::SSL: 2.068
    Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)
    | LMS 8.0 | Squeezebox Boom | RPi0W + pCP 6.1.0 + HiFiBerry DAC Zero | SqueezeAMP |

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •