mstinaff / PMS_Updater

Shell script for updating the Plex Media Server inside the FreeNAS Plex plugin
MIT License
439 stars 91 forks source link

Segmentation fault while updating #69

Closed eliuha closed 8 months ago

eliuha commented 1 year ago

Running the script from BSD Jail on True NAS


# ./PMS_Updater.sh -v
Using URL https://plex.tv/api/downloads/5.json
Searching https://plex.tv/api/downloads/5.json for the FreeBSD download URL .....Segmentation fault
Could not find a FreeBSD download link on page https://plex.tv/api/downloads/5.json?channel=plexpass&X-Plex-Token=<token masked>
Logan-Fouts commented 1 year ago

I too am receving this error when running that script. However, there are many duplicates of this issue. Hopefully a fix will appear soon enough. Ive tried options mentioned in other issues but none have worked as of yet. :disappointed:

eliuha commented 1 year ago

A workaround for me was manually downloading the tar and installing it using the -l option, but that's not the best way we could do

MAGICCC commented 1 year ago

I don't really understand why https://github.com/mstinaff/PMS_Updater/blob/master/PMS_Updater.sh#L152 would fail sometimes... Any help would be appreciated

adostrom commented 1 year ago

I have been getting this error, too.

lordviceroy commented 11 months ago

I realize this probably won't be super helpful, but I had this issue a while back, and I vaguely recall it being somehow related to the URL/domain that the script was using to fetch the update. In the interim, eliuha's suggestion of manually downloading the update and using -l should work for most people.

That aside, I see a bunch of stale PR's that got auto closed, so this script might not be maintained at the moment. If someone figures out a fix, consider forking it.

KirkKirk commented 11 months ago

A workaround for me was manually downloading the tar and installing it using the -l option, but that's not the best way we could do

@eliuha Could you kindly provide a detailed explanation of this process, broken down step by step? Thanks

davidsch1992 commented 11 months ago

@KirkKirk The script is working for me now on my TrueNAS machine.

Here is a guide to do it manually:

Manual update with PMS script

MAGICCC commented 11 months ago

That aside, I see a bunch of stale PR's that got auto closed, so this script might not be maintained at the moment. If someone figures out a fix, consider forking it.

Yes because I added a GitHub action for it, issues which are years old without updates can be closed. At the moment my installations are working fine with this script. Do not hasitate to help the community with updating parts of the script if you see some issues

Lerwox commented 11 months ago

I solved this issue with the installation of CURL. Segmentation fault was caused by the Certificate Authority of CloudFlare that was not a part of original FreeBSD CAs

MAGICCC commented 11 months ago

@Lerwox Could you try to run fetch with --no-verify-peer parameters? fetch --no-verify-peer -o /tmp URL

Maybe we can add a parameter to ignore SSL certs (yes it's not nice)

Lerwox commented 11 months ago

@MAGICCC I solved the problem by installing curl (pkg install curl), which added CloudFlare's Certificate Authority. Unfortunately, I don't have a backup to test with --no-verify-peer, sorry.

I'd like to point out that I installed CURL but I don't use it, I didn't change anything in the script. However, installing CURL added the missing CA to the jail files. So, whether it's wget, curl or fetch, it works now

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.