michealespinola / syno.plexupdate

A script to automagically update Plex Media Server on Synology NAS
GNU General Public License v3.0
312 stars 24 forks source link

DSM7/Plex changes #4

Closed Nedlinin closed 2 years ago

Nedlinin commented 3 years ago

I know DSM7 and the associated Plex change are in beta/preview. I just happened to have my task scheduler fail out overnight on the task and figured I'd log an issue here as there does appear to be some changes in the Plex installer when migrating from DSM6->DSM7 that you might want to make a note of/play with.

https://forums.plex.tv/t/dsm-7-plex-media-server-forum-preview/653717

When running the script on my DSM918+ after manually following the post about to migrate from the DSM6 to 7 release the log of the script output looks as:

SYNO.PLEX UPDATER SCRIPT v2.9.9.3

         Script: syno.plexupdate.sh v2.9.9.3
     Script Dir: /volume1/Scripts
    Running Ver: 2.9.9.3
     Online Ver: 2.3.3
       Released: 2020-09-06 08:34:14-05:00 (94+ days old)
             * No new version found.

cat: '/Failed to get log file 255/Preferences.xml': No such file or directory
cat: '/Failed to get log file 255/Preferences.xml': No such file or directory
       Synology: DS918+ (x86_64), DSM 7.0-41222 Update 0
       Plex Dir: /Failed to get log file 255
     Plex Token:
    Running Ver:
     Online Ver: 1.21.0.3711-b509cc236 (Public Channel)
       Released: 2020-12-01 16:19:08-06:00 (7+ days old)
             * Newer version found!

    New Package: PlexMediaServer-1.21.0.3711-b509cc236-x86_64.spk
    Package Age: 7+ days old (7+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

{"error":{"code":0},"results":[{"action":"install","beta":false,"betaIncoming":false,"error":{"code":261,"description":"invalid package info content"},"installReboot":false,"installing":true,"language":"enu","last_stage":"prepare_install","package":"Plex Media Server","packageName":"Plex Media Server","spk":"/volume1/Scripts/Archive/Packages/PlexMediaServer-1.21.0.3711-b509cc236-x86_64.spk","stage":"install_failed","success":false,"username":""}],"success":false}

{"action":"prepare","error":{"code":150,"description":"Failed to load package info"},"stage":"prepare","success":false}
----------------------------------------

    Update from:
             to: 1.21.0.3711-b509cc236 failed!

I suspect this is due to the Plex share no longer being used.

michealespinola commented 3 years ago

Based on these errors, there appear to be fundamental changes that require alterations to how this script works. This isn't unexpected, and I was forewarned about this by @ChuckPa at Plex. Based on the error, the PMS location seems to have been moved and/or determining it's location cannot be done with the same method the script currently uses.

Thank you for that Plex forums link! My problem assessment (as well as yours) appears to correlate with the forum post. Another thing that worries me is the installation section output. I've never seen errors like that in DSM 6, so there may also be changes regarding the synopkg package installation utility.

I admit I have not been following along with Plex/DSM 7 info, because I am not a fan of beta-level discussions or running beta version software. However, I will re-read through it a couple of times and see if there is anything I can extrapolate and work with.

I'm likely at a disadvantage to effectively troubleshoot the problem until I am personally running DSM 7.

Nedlinin commented 3 years ago

@michealespinola : During installation one of the prompts asks you where to store the log file. If left as default it appears to be

/\<volume>/@apphome/PlexMediaServer/Plex Media Server/Logs

Simply hard coding the PlexFolder

PlexFolder="/volume1/@apphome/PlexMediaServer/Plex Media Server"

appears to mostly work on my DSM7 install but obviously this assumes everyone picked volume1 for the install location and left the custom log location as default..

Also while digging through I noticed this check (line 255)


# COMPARE PLEX VERSIONS
/usr/bin/dpkg --compare-versions "$NewVersion" gt "$RunVersion"
if [ "$?" -eq "0" ]; then

My output there:

Running Ver: 1.21.0-3744
     Online Ver: 1.21.0.3711-b509cc236 (Public Channel)

I assume Plex intends to bump the version code after the preview but, as of right now, dpkg believes the online one is newer than the preview due to the formatting differences in the version number which may cause problems trying to use things before the final (or at least Plex beta) release anyway.

michealespinola commented 3 years ago

One of the reasons v3.0 of this script hasn't been released yet is because I have been contemplating a "force update" option. I think that this situation further reinforces the need. All of this is giving me reason to expand the command-line/terminal options.

Thank you for all this info!

Nedlinin commented 3 years ago

@michealespinola : Is the new script (v3) supposed to be supporting DSM7 already? Or is there no longer an intent to support it?

michealespinola commented 3 years ago

DSM 7 is still beta, and I have no means of testing/developing for it, so I cannot support it at this time. I hadn't realized this was still hanging as an "open" issue.

When DSM 7 is fully released and I can upgrade to it, I will re-open and re-address any outstanding DSM 7 issues if they exist after updating the script to support it.

v3 externalizes the settings to a config file, and in the meantime, I am working on making modifications to the self-updating process. I am anticipating significant changes for DSM7, and those will likely be released as v4.

Nedlinin commented 3 years ago

DSM7 is still beta (seems like it may be for a long while yet). However, if your Synology is capable of running Virtual Machines you can run a virtual DSM (one comes free): https://www.wundertech.net/how-to-setup-a-synology-dsm-virtual-machine-vdsm/

This gives the opportunity to test against a non-production environment for any new scripting changes that would need to take place for DSM7.

michealespinola commented 3 years ago

I run a DS1019+. I think it supports VMs, although I've never looked into it before. I'll have to investigate and see if it will cause any disruption to my environment or if I can at least utilize it off-hours to test with.

Thanks for the info

ChuckPa commented 3 years ago

If I may comment?

Please be very careful with anything you do regarding Plex and DSM 7.

I had to perform a complete redesign & rewrite for DSM 7.

Synology has severely restricted applications. root access is no longer available to 3rd party apps. If anything in Plex's data areas gets munged up, it will break and there will be no automated way to repair it.

All the new scripting runs as the user and not as root (it's that harshly restricted)

Hoping to get a new DSM beta soon so I may prepare for the RC.

Nedlinin commented 3 years ago

@ChuckPa : To my knowledge, it is only packages that are restricted. A script can still be run as root through say SSH.


Synology strongly advises you not to run commands as the root user, who has
the highest privileges on the system. Doing so may cause major damages
to the system. Please note that if you choose to proceed, all consequences are
at your own risk.

nedlinin@nedlinin-nas:~$ sudo whoami
root

So you can still get root privileges for the script though I admit I'm not sure how doing something like a scheduled task works if it requires root in DSM7 (I think it still works but haven't confirmed).

Edit: I can confirm the root is still an option for the task scheduler. Example

michealespinola commented 3 years ago

If I may comment?

@ChuckPa: Please and thank you. Your insight is always very appreciated!

ChuckPa commented 3 years ago

Yes, user scripts can run as root. If Synology removes that capability, we'll all be in trouble.

I have some new packaging I'm working on now for the Syno. Currently on my plate is backup and restore of the PMS install. If lucky, I'll be able to incorporate import a generic ZIP with it. :crossed_fingers:

I'll be opening a forum thread when ready.

(so you know what I'm up to)

cmatte commented 3 years ago

@michealespinola I have reviewed the script to be compatible with DSM 7 and created a pull request at https://github.com/michealespinola/syno.plexupdate/pull/15 following the DSM 7 structure - feel free to review it, advise any improvements, test it, and merge it ;) @Nedlinin if you are comfortable with testing an early version, feel free to do so.

I could not test the installation of a new version, however the remainder looks fine from my tests and I can't see synopkg install changes that shall affect that last part either.

ChuckPa commented 3 years ago

Advisory.

I am working with Synology on DSM 7 RC.

If any of you receive DSM 7.0-41876, do not install it. Plex will not install once this version is installed. Something changed in synopkg since previous release because none of the older PMS version will install either.

I will update when I learn more.

EDIT:

I decided to do some digging into the synopkg issue. Seems to be a regression to me. Any thoughts?

bash-4.4# synopkg install PlexMediaServer-1.23.0.4482-62106842a-aarch64_DSM7.spk  | jq
{
  "error": {
    "code": 0
  },
  "results": [
    {
      "action": "install",
      "beta": false,
      "betaIncoming": false,
      "error": {
        "code": 261,
        "description": "invalid package info content"
      },
      "installReboot": false,
      "installing": true,
      "language": "enu",
      "last_stage": "prepare_install",
      "package": "PlexMediaServer",
      "packageName": "Plex Media Server",
      "spk": "PlexMediaServer-1.23.0.4482-62106842a-aarch64_DSM7.spk",
      "stage": "install_failed",
      "success": false,
      "username": ""
    }
  ],
  "success": false
}
bash-4.4# 
Nedlinin commented 3 years ago

@cmatte : Nice! I was able to run it but unfortunately I just installed the newest version manually yesterday so I also cannot test the actual update process. However, it does properly detect my log location, version in use, etc so I suspect it'll work great.

Nedlinin commented 3 years ago

@cmatte : actually, installation did fail..

nedlinin@nedlinin-nas:~$ cat config.ini
# A NEW UPDATE MUST BE THIS MANY DAYS OLD
MinimumAge=0
# PREVIOUSLY DOWNLOADED PACKAGES DELETED IF OLDER THAN THIS MANY DAYS
OldUpdates=60
# NETWORK TIMEOUT IN SECONDS (900s = 15m)
NetTimeout=900
# SCRIPT WILL SELF-UPDATE IF SET TO 1
SelfUpdate=0
nedlinin@nedlinin-nas:~$ sudo ./syno.plexupdate.sh

SYNO.PLEX UPDATE SCRIPT v3.0.3

         Script: syno.plexupdate.sh v3.0.3
     Script Dir: /volume1/homes/nedlinin
    Running Ver: 3.0.3
     Online Ver: 3.0.2
       Released: 2021-03-31 03:55:38-05:00 (55+ days old)
                 * No new version found.

SynoType is Synology (DSM 7)
       Synology: DS918+ (x86_64), DSM 7.0-41222 Update 0
       Plex Dir: /volume1/@apphome/PlexMediaServer/Plex Media Server
     Plex Token: <redacted>
    Running Ver: 1.23.1.4528
     Online Ver: 1.23.1.4571 (Beta Channel)
       Released: 2021-05-24 16:55:40-05:00 (0+ days old)
                 * Newer version found!

    New Package: PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk
    Package Age: 0+ days old (0+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
2021-05-25 07:23:33 URL:https://downloads.plex.tv/plex-media-server-new/1.23.1.4571-6119e8eed/synology-dsm7/PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk [108820480/108820480] -> "/volume1/homes/nedlinin/Archive/Packages/PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk" [1]
{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

{"error":{"code":0},"results":[{"action":"upgrade","beta":true,"betaIncoming":true,"error":{"code":0},"finished":true,"installReboot":false,"installing":true,"language":"enu","last_stage":"started","package":"PlexMediaServer","packageName":"Plex Media Server","pid":7563,"scripts":[{"code":0,"message":"","type":"stop"},{"code":0,"message":"","type":"preupgrade"},{"code":0,"message":"","type":"preuninst"},{"code":0,"message":"","type":"postuninst"},{"code":0,"message":"","type":"preinst"},{"code":0,"message":"<br><br><p style='color:blue'>Note: If Plex cannot access your media, verify user <strong>PlexMediaServer</strong> is granted permission in <strong>Control Panel</strong>.</p><br>\nSet access to your media share(s) by performing the following steps:<br><br>\n1. Open <strong>Control Panel</strong> and select <strong>Shared Folder</strong><br>\n2. Select the share which contains your media and click <strong>Edit</strong><br>\n3. Click the <strong>Permissions</strong> tab<br>\n4. Change the dropdown from <strong>Local Users</strong> to <strong>System internal user</strong><br>\n5. Check the <strong>Read/Write</strong> checkbox for the <strong>PlexMediaServer</strong> user<br>\n6. Click <strong>Save</strong> to confirm the new permissions<br>\n7. Repeat steps 2-6 for each share you want Plex Media Server to access<br>\n","type":"postinst"},{"code":0,"message":"","type":"postupgrade"},{"code":0,"message":"","type":"start"}],"spk":"/volume1/homes/nedlinin/Archive/Packages/PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk","stage":"installed_and_started","status":"running","success":true,"username":""}],"success":true}

{"action":"prepare","error":{"code":150,"description":"Failed to load package info"},"stage":"prepare","success":false}
----------------------------------------

    Update from: 1.23.1.4528
             to: 1.23.1.4571 failed!

nedlinin@nedlinin-nas:~$

Looks like the install succeeds but querying for the info after fails?

Edit: can confirm that I'm now running the newest version but the script believed the install to have failed.

cmatte commented 3 years ago

Thanks @Nedlinin perfect feedback for me to look into it, I will update the pull request with a possible fix in a few days.

michealespinola commented 3 years ago

@michealespinola I have reviewed the script to be compatible with DSM 7 and created a pull request at #15 following the DSM 7 structure - feel free to review it, advise any improvements, test it, and merge it ;)

This is awesome and greatly appreciated! I may not be able to review/merge it for a few days, but it's now on my shortlist of things to do this week.

cmatte commented 3 years ago

@michealespinola I've amended the pull to include the installation fix and bumped version to 3.0.4 in #15.

Nedlinin commented 3 years ago

Looks like DSM 7.0-41882 (RC) just hit the update servers. I'll be installing it later and checking the script still functions.

@ChuckPa any update you're aware of versus the bugged version you had noted above?

ChuckPa commented 3 years ago

There is an enforcement change in the INFO file.

I've modified the INFO file and seem to be working with 41882. I am forum-testing the change here: https://forums.plex.tv/t/synology-dsm-7-build-41882-breaking-changes/719740/25

cmatte commented 3 years ago

Thanks @ChuckPa for the brilliant and timely work there!

DSM 7 RC installs will need a different package format and the official update server does not include that fix yet, so version 1.23.2.4656-85f0adf5b published today won't install until Chuck hand makes it,and possibly Plex might have to create two separate releases for pre-RC DSM 7 systems and for DSM 7 RC and above!

The current script version check mechanism has a bug for DSM 7 that wrongly advises for a successful installation while that is not the case, so I have updated pull #15 once again. Be warned that does not solve the RC incompatibility of the newer official package, while with it the script returns the correct information and shall be working fine once DSM 7 RC + compatible packages can be offered in the official channel again.

ChuckPa commented 3 years ago

This is Plex's current status.

https://forums.plex.tv/t/dsm-7-0-41882-release-candidate-breaks-plex-do-not-upgrade/720284

I've already made the changes to packages and released a developer's build (my google drive) here

I've also submitted the final changes to Engineering

cmatte commented 3 years ago

@ChuckPa if you have got a build 4656 prepared already for x86-64, please shout so I can test the script actual upgrade process. I had 4600 already manually installed when I published the pull and I then upgraded to DSM 7 RC so I'm unable to test it fully without a next package ;)

ChuckPa commented 3 years ago

We aren't chasing Engineering's tail with developer builds. It's a losing proposition.

I've submitted the changes for them to approve. Once they approve the change, you'll have DSM 7.0-41222 and DSM 7.0-41882 support.

Sadly, as outlined in the announcement I posted above, this is where our efforts to follow a "BETA" project end.

This is the epitome of why one never attempts to develop product against a moving target.

Even their documentation is woefully out of date and more changes are coming?

Sorry but our management said "Enough".

Major breaking change fixes will be considered on a case by case basis. It's the best I could get.

:bus: :person_fencing: :face_with_head_bandage:

cmatte commented 3 years ago

Once they approve the change, you'll have DSM 7.0-41222 and DSM 7.0-41882 support.

This is great news...I was worried the new type would break the old and require two different releases!! In other words, 3.0.5 of this script shall be ready to work fine when Plex Eng introduce your proposed changes to adapt the new INFO.

This is the epitome of why one never attempts to develop product against a moving target.

Be careful what you wish for, right :hushed:

It's the best I could get.

🚌 🤺 🤕

You could get a hell of a lot so far, this time included to be honest! Keep going :fire:

ChuckPa commented 3 years ago

@cmatte

I've not changed anything about where the package lives or how it runs..... yet.

I changed the INFO file to be compliant with the unannounced and undocumented changes by Synology.

If current trends continue, I'm probably destined to write "a killer root shell script" to run as a Task Scheduler job in order to do migration from DSM 6 -> DSM X.

This is why we had to stop our development. They haven't decided what is going to happen yet. We can't develop to or support a pre-design "idea"

cmatte commented 3 years ago

Good news the latest version of Plex from the servers both downloaded and installed fine via the proposed PR :)

ChuckPa commented 3 years ago

Brace yourselves ....

I have DSM 7.0-41888 in my possession.

It is supposed to have several fixes relating to Plex. I will tackle Friday afternoon.

trumpy81 commented 3 years ago

@michealespinola

With a little help from Chuck (and I do mean little :p) I have updated your script to work with DSM 7.0-41890.

It is very rough and can use some clean up as the final output is NOT 100%, but the script is functioning at least.

I have modified the following lines in your original script.

31 160 162 178 180 206 210 252

I have attached a zip file containing your original script, my updated script, the output log from DSM 7 Task Scheduler and the email I received after a successful update.

Syno.Update.Script.Results.zip

I hope this helps you with developing an update for your script. :)

I should add, that the script is now DSM 7 centric, so you will need to make some changes if you wish for your script to continue to support both DSM 6 and DSM 7, but I will leave that up to you.

Edit: I updated the zip file, it contained an incorrect file.

tillkruss commented 3 years ago

@trumpy81 can you open a pull request with your changes?

trumpy81 commented 3 years ago

I am not that familiar with Github, I'm flat out learning Linux ... lol

As I said, I have managed to get the script working with some relatively minor changes, but they are DSM 7 specific.

If you are able to download the zip I provided, you may see the changes I have made.

ChuckPa commented 3 years ago

@tillkruss

I helped trumpy with this. (part of my :smiling_imp: master plan to teach him more Linux)

I have a few suggestions for you. (I don't have time to write all the mods then let you PR it.. it's your code :stuck_out_tongue: LOL

# DSM 6 & 7 support
SPUMajorVersion=$(grep majorversion /etc/VERSION | awk -F\" '{print $2}')
[ $SPUMajorVersion -eq 6 ] && SPUPackageName="Plex Media Server"
[ $SPUMajorVersion -eq 7 ] && SPUPackageName="PlexMediaServer"

You can now add a little more down below to set and use a variable for the JSON name: value you're looking for

# Use correct package label
[ $SPUMajorVersion -eq 6 ] && SPUPlexPackageName="Synology"
[ $SPUMajorVersion -eq 7 ] && SPUPlexPackageName="Synology (DSM 7)"

Here's the magic . I'll let you work out how you want to build the jq query string.

PlexRelease=".nas.\"${SPUPlexPackageName}\".releases[]"

Use in the curl (which you quote $PlexRelease)

bash-5.0$ curl "https://plex.tv/api/downloads/5.json" | jq --arg ArchFamily rtd1296 -r "$PlexRelease"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 36978    0 36978    0     0  63975      0 --:--:-- --:--:-- --:--:-- 63865
{
  "label": "Intel 32-bit",
  "build": "linux-x86",
  "distro": "synology-dsm7",
  "url": "https://downloads.plex.tv/plex-media-server-new/1.23.3.4707-ebb5fe9f3/synology-dsm7/PlexMediaServer-1.23.3.4707-ebb5fe9f3-x86_DSM7.spk",
  "checksum": "274ec32c6d7155232d91787f69e66a12704278da"
Nedlinin commented 3 years ago

I believe #15 from @cmatte addresses the vast majority of those changes already (including keeping DSM6 capability though I don't have easy means of testing).

I can confirm that #15 allowed updating for my PMS package just the other day running from a Task Scheduler command.

ChuckPa commented 3 years ago

I'm just sharing. I am doing a lot of this work here so if it helps -- great

tillkruss commented 3 years ago

15 updated my PMS as well, except now I have to allow insecure connections for some reason.

ChuckPa commented 3 years ago

ALL:

There are some isolated certificate renewal issues. (July 4th timeframe). Please reach out in the forum thread and it will be investigated & reset as appropriate.

michealespinola commented 3 years ago

My apologies for ignoring this issue/thread. I've been having some technical problems (including with my Synology (HDDs, not the unit), and I am coming off of the backside of recovering from it. I meant to post about it earlier, but it has stalled my testing environment.

My rebuild should be complete by the end of the week ✌

Nedlinin commented 3 years ago

@michealespinola : Any luck with your rebuild + testing?

trumpy81 commented 3 years ago

I just did some more tinkering and corrected a few things in the script.

I have tested it and it is working well as far as I can tell.

I am sure it will need more work ... but hey I'm still learning Linux ... lol

I have attached my updated script.

syno.plexupdate.zip

trumpy81 commented 3 years ago

I have done a little more work on the script and it should now run on DSM 6 and/or DSM 7.

The code is still a little messy, but I have tested it and it is working on DSM 6.

I am unable to test it with DSM 7 right now as I am running the updated Plex package that relocates the Plex data folder to /volume1/PlexMediaServer. I still have work to do for the custom location of log files, but otherwise it works with the default location.

As soon as Chuck can push that to Plex downloads, I will be able to test the script further and make any changes that may be needed. Needless to say, it was working prior to the change.

I have attached the updated script.

syno.plexupdate-3.0.2c.zip

@michealespinola If you are still having issues with your NAS, you can teamviewer in and test on either of my NAS any time. I run Windows 10 if it matters.

I have DSM 6 on one NAS and DSM 7 installed on the other and I can also run DSM 5 in a VM if you need it.

You can contact me through the Plex forum (PM) or via email = trumpy81@optusnet.com.au

trumpy81 commented 3 years ago

I have made a few corrections and changes to the script.

I still have not tested it with DSM 7, but I will just as soon as Chuck can get the new packaging in place.

I have attached the updated script here: syno.plexupdate-3.0.2c.zip

seanhamlin commented 3 years ago

Note that DSM7 is no longer in beta. It is GA. https://www.synology.com/en-global/DSM70. I upgraded my DSM 918+ to it today.

Keen to see a DSM7 version of this script (this script is a lifesaver). It seems this disclaimer is no longer relevant https://github.com/michealespinola/syno.plexupdate/commit/966c8ff3ec5eb45a7843cde54d14d788fd10f85f

Also, instead of zip files attached to this issue, a pull request would be a nicer way to contribute (and others can see the changed proposed, and provide feedback). Edit, I see https://github.com/michealespinola/syno.plexupdate/pull/15 already exists.

JD2005L commented 3 years ago

I have made a few corrections and changes to the script.

I still have not tested it with DSM 7, but I will just as soon as Chuck can get the new packaging in place.

I have attached the updated script here: syno.plexupdate-3.0.2c.zip

So I'm getting the following error when I run V3.0.2c: cat: '/AppData/Plex Media Server/Preferences.xml': No such file or directory As a result it's not detecting that my Plex is running the Beta update channel. Otherwise everything else works it would seem, but that's a pretty important function to me. Any advice on how to resolve?

Full script output: SYNO.PLEX UPDATE SCRIPT v3.0.2c

     Script: syno.plexupdate.sh v3.0.2c
 Script Dir: /volume3/Admin/syno.plexupdate-master
Running Ver: 3.0.2c
 Online Ver: 3.0.2
   Released: 2021-03-31 02:55:38-06:00 (126+ days old)
             * No new version found.

cat: '/AppData/Plex Media Server/Preferences.xml': No such file or directory cat: '/AppData/Plex Media Server/Preferences.xml': No such file or directory Synology: DS1821+ (x86_64), DSM 7.0-41890 Update 0 Plex Dir: /AppData/Plex Media Server Plex Token: Running Ver: 1.24.0.4897 Online Ver: 1.23.6.4881 (Public Channel) Released: 2021-07-28 16:10:14-06:00 (6+ days old)

Nedlinin commented 3 years ago

@JD2005L : Have you tried the version here: https://github.com/michealespinola/syno.plexupdate/pull/15

JD2005L commented 3 years ago

@Nedlinin Yes that's the version that I've been running that at least works, it will update Plex, but I get the following weird output, here's the last output from a Plex update a few days ago:

SYNO.PLEX UPDATE SCRIPT v3.0.6

     Script: syno.plexupdate.sh v3.0.6
 Script Dir: /volume3/Admin/syno.plexupdate-master
Running Ver: 3.0.6
 Online Ver: 3.0.2
   Released: 2021-03-31 02:55:38-06:00 (126+ days old)
             * No new version found.

   Synology: DS1821+ (x86_64), DSM 7.0-41890 Update 0
   Plex Dir: /volume3/@apphome/PlexMediaServer/Plex Media Server
 Plex Token: zmWDR3yJw9yxfyqVWJij
Running Ver: 1.23.6.4881
 Online Ver: 1.24.0.4897 (Beta Channel)
   Released: 2021-08-02 10:50:50-06:00 (1+ days old)
             * Newer version found!

New Package: PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk
Package Age: 1+ days old (0+ required for install)

INSTALLING NEW PACKAGE:

2021-08-04 04:00:10 URL:https://downloads.plex.tv/plex-media-server-new/1.24.0.4897-411e7667f/synology-dsm7/PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk [115220480/115220480] -> "/volume3/Admin/syno.plexupdate-master/Archive/Packages/PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk" [1] {"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

{"error":{"code":0},"results":[{"action":"upgrade","beta":false,"betaIncoming":false,"error":{"code":0},"finished":true,"installReboot":false,"installing":true,"language":"enu","last_stage":"postupgrade","package":"PlexMediaServer","packageName":"Plex Media Server","pid":27587,"scripts":[{"code":0,"message":"","type":"preupgrade"},{"code":0,"message":"","type":"preuninst"},{"code":0,"message":"","type":"postuninst"},{"code":0,"message":"","type":"preinst"},{"code":0,"message":"

Note: If Plex cannot access your media, verify user PlexMediaServer is granted permission in Control Panel.


\nSet access to your media share(s) by performing the following steps:

\n1. Open Control Panel and select Shared Folder
\n2. Select the share which contains your media and click Edit
\n3. Click the Permissions tab
\n4. Change the dropdown from Local Users to System internal user
\n5. Check the Read/Write checkbox for the PlexMediaServer user
\n6. Click Save to confirm the new permissions
\n7. Repeat steps 2-6 for each share you want Plex Media Server to access
\n","type":"postinst"},{"code":0,"message":"","type":"postupgrade"}],"spk":"/volume3/Admin/syno.plexupdate-master/Archive/Packages/PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk","stage":"installed_and_stopped","status":"stop","success":true,"username":""}],"success":true}

{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

Update from: 1.23.6.4881
         to: 1.24.0.4897 succeeded!

NEW FEATURES:

FIXED FEATURES:

Nedlinin commented 3 years ago

@JD2005L : That is actually not an error just the standard output of the script. Notice each step lists "code":0 - this is a success in software land.

The printing of the changelog is just there for ease of use (in case you email the output of the script to yourself for instance).

JD2005L commented 3 years ago

Ok interesting, those large blocks of unformatted output just looked like the script was encountering issues to me, but if you say that's normal then sounds good. Thanks for your help.

trumpy81 commented 3 years ago

@JD2005L My apologies. I should have mentioned that my script updates are intended for the Plex packaging 2.0 Forum Preview version of Plex.

https://forums.plex.tv/t/dsm-7-packaging-2-0-forum-preview/732838

This package should be released to the public in the next week or so, fingers crossed, but if you wish to try it beforehand you may do so. The package is provided in the link above.

Just remember, you will NOT be able to update Plex until the package changes have been pushed to production. Monitor the Plex forum for announcement of that.

The errors are caused by the relocation of the Plex data folder, from the hidden @apphome/PlexMediaServer to the admin user accessible /volume1/PlexMediaServer.

Moving forward, /volume1/PlexMediaServer will be the default location of the Plex data folder on all Synology NAS running DSM 7.x

ChuckPa commented 3 years ago

If I may augment Trumpy,

I can come and post here when it's safe to release this.

The reason you must wait is because Packaging 2.0 is not backward compatible with the existing production.

The existing production (1.0) packages do not know anything about this new structure nor does it make any sense to retrofit it at this late date.

michealespinola commented 3 years ago

I'm back from vacation and am catching up on these conversations today. My notification are back on.