Server download link hiding makes it useless

Server Version#: 1.26.1.5762

Recently the DOWNLOAD NOW button on the server updates page started making links with the X-Plex-Token argument replaced by a bunch of xs.

I figure Plex made this change to protect the link or something, but it makes it much harder to upgrade a server running remotely.

Previously you could right click, get the URL, and download it using wget on the remote computer, but now you are forced to download it on the local computer.

Please revert this change to make it easier to upgrade Plex server when there is a new release.

Not understanding here. Please help me?

  1. plex.tv/downloads takes you to here where you select the distro and version you want. (Public or Beta)

  1. From within the Plex/web app, when you click “install manually” it downloads based on which “update channel” you’ve selected as your default.

On Linux, you can enable the respository (which is predefined for you during PMS installation).

With the repository enabled, apt update and apt upgrade will download and install the current Public version as needed. (RPM distros use dnf update)

Often there will be server updates that don’t show up in the apt repositories, and the server has a note saying to download it manually.

Browsing to http://plex.tv/web connects to the server and gives an alert that there is a new update, and it provides a page with one link to a changelog and a big orange button labeled “DOWNLOAD NOW”.

If I hadn’t already updated my server today I’d take a screenshot, but now that my server is up to date I don’t know how to get back to that page.

This is how it works on Linux.

In the same way your distro tells you there are updates available, so does Plex.
Once you install those updates, you don’t see them unless you want to go into the history and see when the last update was.

I let the repository and the native package manager auto-updating do what it’s there for.

I don’t mind waiting a few days after an update is released until it gets installed unless I know it has a fix for me.

In those cases, I update manually.

I guess I’m not understanding the meaning of ‘useless’ because it’s been this way for a long time.

Did you recently change from a different OS or has it been a while since your last PMS update ?

Yeah, I had to use brief phrasing in the topic title :slight_smile:

So, what changed was until recently the big orange “DOWNLOAD NOW” button gave a URL that would work, but now the URL is partly replaced by xxxxxxxx, so it no longer works.

That’s what’s useless, the new, scrambled URL.

Like I said, I’m sure they had a reason to obfuscate the URL, but maybe they didn’t realize how it interferes in remote server management.

Can you clarify -

PMS 1.26.1.5762 on Linux
Settings → General
Right?

The DOWNLOAD NOW button doesn’t behave how you expect?

What happens when you click it? Does it download?
If you right-click and copy, what URL is copied?

What is Server update Channel set to?

Right, that was the version today.

The button changed how it generates URLs and now doesn’t work as expected.

Next time I get a notification saying I need to manually update the server I’ll save the URL it made and report back.

I have been experiencing the same thing for the past 2 updates.

I am on a Debian server, on the beta channel (1.26.1.5772). I get a manual download link like so:

image

The download link leads to: https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=debian&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx

That is, it has the X-Plex-Token set to xxxxxxxxxxxxxxxxxxxx.

When I download this link, I get:

wget 'https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=debian&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx' -O foo.deb                                                                                                                                                                            [17:42:11]
--2022-05-11 17:42:16--  https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=debian&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Resolving plex.tv (plex.tv)... 63.34.174.176, 18.200.219.245, 52.49.172.158, ...
Connecting to plex.tv (plex.tv)|63.34.174.176|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://downloads.plex.tv/plex-media-server-new/1.26.0.5715-8cf78dab3/debian/plexmediaserver_1.26.0.5715-8cf78dab3_amd64.deb [following]
--2022-05-11 17:42:16--  https://downloads.plex.tv/plex-media-server-new/1.26.0.5715-8cf78dab3/debian/plexmediaserver_1.26.0.5715-8cf78dab3_amd64.deb
Resolving downloads.plex.tv (downloads.plex.tv)... 172.64.153.236, 104.18.34.20, 2606:4700:4400::6812:2214, ...
Connecting to downloads.plex.tv (downloads.plex.tv)|172.64.153.236|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 78337352 (75M) [application/x-debian-package]
Saving to: ‘foo.deb’

foo.deb                                                                         100%[====================================================================================================================================================================================================>]  74,71M  83,7MB/s    in 0,9s

2022-05-11 17:42:17 (83,7 MB/s) - ‘foo.deb’ saved [78337352/78337352]

Notice how the download link leads to the file plexmediaserver_1.26.0.5715-8cf78dab3_amd64.deb - an older version than my currently installed 1.26.1.5772.

What I’m guessing happens is, since the link contains an invalid X-Plex-Token, it gives me the latest stable release.

1 Like

I’ve also observed this behavior. Save yourselves some time and just make a bash script:

plex.sh:

#!/bin/sh

wget "https://plex.tv/downloads/latest/5?channel=16&build=linux-x86_64&distro=debian&X-Plex-Token=XXXXXXXXXXXXXXXXXXXX" -O plex.deb
sudo dpkg -i plex.deb
rm plex.deb
exit

THANKS! That’s exactly the comment I wanted to make, but couldn’t because I’d already updated and so couldn’t get back to the page and link.

So exactly, I understand that they’d have reasons to obfuscate the X-Plex-Token, but maybe they don’t realize how it breaks this workflow for manually upgrading the server.

I also think I remember times in the past when the xxxxx URL didn’t work at all, but I can’t be sure. Maybe they tweaked it behind the scenes but forgot to point it to the beta channel when that’s requested?

Thanks for the work, @Pishmoffle

It’s not a “normal” bare link, there’s JavaScript and CSS and such.

Does the same thing happen when you CLICK the link, vs. when you COPY the link?

I get the correct file when I click the link - however having to do this makes the upgrade workflow significantly more cumbersome.

Previously, I could copy the link - paste it into my command line on my server and download and install in seconds.

With this change, now I have to download the file locally (which may be on one of 3 different machines with different setups), transfer it to the server, and then open a command line to install it.

Another workaround - click to start the download, then copy the URL from the download-in-progress.

Yeah, but would you mind sending this feedback up the chain so that we wouldn’t need to look for workarounds in the first place? :slight_smile:

It sounds like it should be trivial to provide the download URL to us one way or another.

Maybe they have a particular reason for not wanting the download button to be right-clickable. Well, one compromise would be to just print the URL to the screen, even without making it a link. That would be fine for copy/pasting the URL into the remote server for upgrading.

I’m not in any chain - I’m a rando!

I personally think Plex should stop associating betas with Plex Pass. It encourages people to think of betas as a perk. Most people shouldn’t use betas most of the time, but sometimes it would be helpful for others to use betas, too.

If you update instantly and obsessively - which I don’t recommend, but do understand - the suggestion above to make a download script is a pretty good one. :slight_smile:

I agree that the current copied-link behavior just seems weird.

Oh ha!

Sorry, I still had in mind that an employee was on here since @ChuckPa above was involved at one point.

1 Like

Another workaround for getting the URL is to run the following command in your browser’s Javascript console (F12) while the download link is visible:

document.querySelector('.install-manual-link').attributes.href.value.replace('xxxxxxxxxxxxxxxxxxxx', localStorage.myPlexAccessToken)

It finds the link, extracts the URL (href), and replaces the x’es with the correct access token.

The result should appear on the line under where you enter the code.

2 Likes

@ChuckPa did you see the updated conversation around this topic?

Others provided more information than I had, and the clumsiness of the workarounds shows how this problem impacts us.

I use this to obtain the link for my use case:

curl -s "https://plex.tv/downloads/details/1?build=linux-ubuntu-x86_64&channel=16&distro=ubuntu" | grep -Po '(?<=url=\")(.*)(?=\")'

Nice call, but I suspect that link would direct to the wrong version, based on @Pishmoffle 's comment above.

My server’s not currently looking for an upgrade, though, so I can’t test it.