How to uninstall/reinstall using backup on MacOS?

Hello,

Currently running Plex on M1 Mac Mini. I starting having issues with 1.29x crashing constantly and the updates didn’t fix it. So I rolled back to 1.28.2.6151 - and it’s still crashing. I’m heading out of town and need it working reliably while I’m gone. Up until now, it’s been by far the most rock solid of any Plex setup I’ve had on Windows or Linux.

If I just delete from applications after having saved the plist file as it says in this article: https://support.plex.tv/articles/201539237-backing-up-plex-media-server-data/, then reinstall, and copy the backed up file, will that get me up and running again? Is there any chance that will actually help anything before I go do the trouble of doing that?

Is there anything else that could be causing the crashes? I just can’t pinpoint the issue.

Any info would really help. Thanks so much!

Server Version#: 1.28.2.6151
Player Version#: Latest on AppleTV and web interface

Yes it would get you back up and running if the current set of database files is not corrupt.
There are basically four parts to a PMS install:

  1. The application
  2. the plist file
  3. the plex media server data (database files)
  4. the media

The article you linked describes backing up (2) and (3) so you can restore those assuming (4) is intact. However, you have crashing when trying to start. That implies a part of (3) is corrupt. Therefore following that article doesn’t help you. If we find that (3) is corrupt, you could repair the database or restore the datatbase from scheduled backup.

We should solve why it’s crashing if you want to restore your old PMS and metadata from backup.
(If instead you just want to move past this and install PMS from scratch, tell us, because that’s fast)

debugging PMS crashing on a Mac

Let’s try and find out what’s going on so you can get out of town happy! :slight_smile:
Please open a Terminal.

  1. Quit out of PMS if it’s running by right clicking (2-fingered click) on it’s icon in Apple’s menu bar and choosing Quit from the context menu.
  2. Enable debug logging by issuing this command:
    defaults write com.plexapp.plexmediaserver logDebug -boolean TRUE
  3. We can start the app another way and get more feedback from it. Issue the following command, then copy & paste any output into a code block </> in your reply.
    "/Applications/Plex Media Server.app/Contents/MacOS/Plex Media Server"
  4. We can gather the logs that have been made. Issue these commands. This creates a PMSlogs.zip file in your home directory that you drag and drop into your reply:
cd
zip -rj PMSlogs ~/Library/Logs/"Plex Media Server"

After we see it trying to start and see the logs, we can plan the best way to fix it or plan to install anew from scratch.

Good luck!

@nibbles, you’re amazing! Awesome info and instructions. :slight_smile:

OK, did the first part, no problem. Did the second command to launch Plex and it seems to hang in the terminal. Is that what’s supposed to happen? The only way to get out of it is to close the terminal which will cancel the command (launching Plex) that’s currently running. Is that the next step or do I do something else? Not sure how to proceed so I can take next steps and get you the logs.

Also I need to clarify. Plex isn’t crashing on launch. It launches fine - either right after startup or reboot or even if I restart after it crashes. It primarily seems to crash after running for several hours then becoming idle (ie not actively watching/listening to media). So, often either late at night or in the AM, suddenly, Plex isn’t available and when I’ve checked, it’s not longer running (hence it’s crashed and closed at some point on its own).

Sorry I wasn’t sure what to do about the issue with the terminal. Please let me know if I just close it out, start another terminal, or what. Seems like it needs to be running to get the logs though, no? Thanks again!

OK, I hope this is what was needed. You asked if there was any output from the second command which launched Plex from the terminal. There was no output. It just launched and ran - keeping the terminal open (which is where I got stuck in my previous message). I looked around and figured out how to open a new terminal window so Plex could keep running via the first terminal window. So, I was able to use the next commands to get the logs generated while keeping Plex running. I hope that was the best thing to do.

Anyway, I’ve attached the logs. Please let me know what’s next! I can’t tell you how much I appreciate your help!!! Seriously, thank you.

PMSlogs.zip (1.1 MB)

Happy to help. Guess what?
When it launches and runs from the terminal like that it’s starting normally :slight_smile:
Thanks for clarifying when it crashes: after some idle time.
The tl;dr is check your Apple System Prefs → Energy Saver - your computer should not be allowed to sleep when PMS is running on the Mac.

Stuff about logs:
The method I gave for getting logs is best for when PMS is not running.
When it’s running it’s easier in Plex for Mac Settings → Troubleshooting → Download logs.
So either type is great in terms of what it collects on a Mac.

What we need most in your case of crashing after being idle is to gather those logs after it happens. I’ll check what you uploaded just now for a normal startup.

Okay your log is perfect, without any error on startup.
I’ll look again in the previous versions for when it goes down,
but it would help if knew the approximate time on your Mac’s clock.

In general when PMS does something weird overnight it could be

  • Apple putting the Mac to sleep
  • a PMS scheduled task encountering a badly encoded or corrupt media file.

The first one is the most common. the 2nd is hard to find lol.

@nibbles, you’re amazing! Thanks so much for the straightforward info. Sorry I didn’t get the logs quite right. I wasn’t sure if I closed the terminal if it would also close Plex because it said it still had a process running. It’s also great to know how best to download logs when Plex is running.

Well, the best of a bad situation just happened to happen. We stopped watching Plex around 1:45am and took our pups outside. By around 2:15am when I happened to check, it had crashed - as it does. So, we have approximately a 1/2 hour window to check in the logs. I’m hoping that helps.

Here’s the log. I didn’t reopen Plex but ran the command you gave to gather logs, post crash. I’m hoping that’s what you’re looking for.

As far the Mac mini, it’s never been set to allow it to sleep and I’ve never had these crashes before. In fact, till this recent issue, it’s been by far the most stable Plex platform. I’ll double check to make sure settings didn’t change but I’m thinking the more likely issue, unfortunately, is the PMS scheduled task. :frowning:

Please let me know if you need anything else or if you needed me to restart Plex before sending more logs. I wasn’t sure which way would have what you needed (gathering the logs prior to opening Plex, as I’ve done or if it needed to be reopened to give you the info needed int he logs)…but I’m hoping this is it. Thanks again, so so much!

PMSlogs(0).zip (1.4 MB)

Great will have a look now at the logs.

btw do you have a photos library? can you screenshot its Edit → Add folders screen for it so we can see the folders you have in your library?

still working on my gifs :man_shrugging:

don't look at me

folders

@nibbles - awesome! Thanks for checking those. :slight_smile:

What are you wanting to see on the screenshot? Movies? TV? All folders? Let me know and I can grab you a screenshot. How will that info help, just out of curiosity?

Just a shot of only your Photos library settings, folder tab, like this:

and let us know if you can see your photos in plex.
PMS crashes when or just after scanning this in your logs.

Oh, got it. Sorry, I thought you were asking if I had Apple Photos so could I use that to edit a screenshot - rather than Photos library.

Honestly, I don’t know where the folder in Photos came from - maybe a default in Plex on MacOS? I didn’t ever add this folder because I don’t use the folder that’s added.

I’m uploading the image but I scrubbed out the username (sorry, I know that weird but I never know posting on public forums if posting your computer user name is a security issue). If you need that info, I can send it to you in a DM/PM or send you the unredacted version. Just let me know.

So, one thought. If that’s what’s causing the crash, can I just delete the Photos library from Plex for now since it’s not really setup (currently empty) anyway? I plan to get that all squared away with my photos after the trip sometime this winter, anyway. If that would solve the crashing before we leave, I’d be the happiest person. Having one thing settled would be amazing. It’s been a really rough week.

I would nuke that photos library you’re not using.

By default when installing a new PMS on a Mac, it offers to make a photo’s library.
No worries.

Sorry, I missed the question about if I can see my photos in Plex. When I went to the Photos library, it says “Empty”. And I don’t actually have any photos in the folder that got added somehow (I don’t use the folder that’s currently added to the Photos library and wondered if it was a default add?). I honestly don’t remember if I had the photos library fully setup on the Mac Mini PMS. I know I did on our older Linux install but I might have just forgotten, thinking I had.

@nibbles, done! Photos library gone. Funnily enough. In the few minutes it took me to type the replies and send the screenshot, Plex crashed again. Fingers crossed that Photos library is the issue. I can setup again later on and actually add my photos. But I certainly don’t need it for now. Hopefully, this is it! I can’t thank you enough for your help. I’ll post back with an update once I know if this fixes it. :slight_smile:

crashy mac emojii.

I also noticed one of the last logs timestamped was from com.plexapp.plugins.WebTools
Are you using the newer webtools-ng?
Don’t tell dane, but I would remove any plugins while trying to get back to stability.
The other log that’s being accessed during the crash time is com.plexapp.plugins.trakttv.log
That has error messages in it, but I am dumbo I don’t know what trakttv is.

1 Like

@nibbles - another crash. :frowning: Super sad. I’ve attached the latest logs below. I don’t know the exact time of the crash but it was between my last post and about 3:45am EDT (about 15 minutes before this post, if your timezone makes that easier to figure).

Now, I’ve really run into a problem. I cannot uninstall either Webtools or the Trakt.tv plugin. Every time I’ve tried Plex gives me an error in a red box and says “cannot uninstall plugin”. You’re anything but a dumbo!! Trakt.tv is a service that sort of “remembers” your play states, media, etc. the idea being that (if everything works right), you can sync your play states, watched states, etc even on a new install - or across multiple servers or services. But one of the other of the plugins are clearly causing the issues. How can I force an uninstall? I’m really stumped. Ideas? Thanks again. :slight_smile:

PMSlogs.zip (1.9 MB)

I’ve never run plugins, but I suppose you stop PMS then delete the .bundle file.
Sort of the opposite of a manual plugin install.

@nibbles - thanks so much for that. I wondered if that would work. Clearly something went wrong in the later updates with those two plugins.

In answer to your question, I don’t think I was using the Webtools version you mentioned - I think I might have been using an older version. I can play around with that once we’re back home.

Both plugins have been deleted. There are a couple of other showing in the plugins folder (audiobooks, and I think fan art covers) which I’ve currently left in there but Plex is showing that no plugins are installed now - so maybe those extras were from the Webtools collection and now that it’s gone, the others aren’t recognized? Anyway, we’ll see if there is any improvement with the crashing now.

I can’t thank you enough for your help troubleshooting this. Seriously. :slight_smile:

1 Like

@nibbles, I thought we finally had it working correctly but just now, while we were watching, it crashed again. This is different because the other times, the server was idle. Is there any chance you could take a look at the logs and see if you find an issue? The crashed happened within the last hour or so (between roughly 3:15am–4:15am EDT). Sorry to bother you again but I’m completely stumped! Here are the logs:

PMSlogs.zip (3.0 MB)

@nibbles, ugh. Another crash - this time while idle again. I’m desperately hoping to find out what’s doing this or I won’t have Plex working for half a day when we head out tomorrow.

Do you think I need to do a full reinstall? I just hate to lose all our play/watch states. But I also don’t know if there is an issue which would mean that a reinstall using the backed up plist file would just perpetuate the problems. Not sure exactly when it crashed this time but here’s the latest post crash logs. Thanks so much for your help!

PMSlogs.zip (2.9 MB)

Morning. PMS stores everything on a Mac in
~/Library/Application Support/Plex Media Server
If you copy that somewhere safe, you can do a complete uninstall then just run a new install for now. If you do the new install in a way that doesn’t try to create Video Preview Thumbnails, sonic analysis, Loudness analysis, or Intro detection, your system will rapidly assimilate your library of media and be ready to use when you go away (would be the hope). You can always come back to your previous install and restore it. The plist can be recreated. It’s worth mentioning again that the one folder holds everything PMS needs to run like before short of being reclaimed.

If you try instead to fix this crash, I’d remove all the plugins for now.
I’ll read the two logs quickly to see if something is obvious.

EDIT: first zip, the Plex Media Server.log suddenly ends mid playback of Joanna! No reason given. If you are the person with Crash Logging disabled, turn it back on in PMS Settings.

EDIT2: Most recent logs from a half hour ago post show something that’s not obvious in the last file to be logged to, the com.plexapp.system.log. Just like your plugins come in a .bundle file, there is a system.bundle that sits atop of all other bundles, and the log file I mentioned and snipped below tells us what the system.bundle is doing.

Your com.plexapp.system.log just says stopping plug-in at 4:48am. So it’s being told to stop. I don’t know what can do that. So enable crash logging, and remove any plug-in you added for now. It turn out the when PMS crashes and you grab zip -rj logs, you grab the latest Crash Log too which can be a more detailed version than Plex receives. I’ve seen a Plex employee ask for that so good job with your log captures. :+1:

2022-10-26 04:18:17,283 (17278b000) :  DEBUG (peerservice:233) - Updating existing server Mac-mini (6d14bf03f33085c26b4ddd1a9ce8058d4ecaf728)
2022-10-26 04:18:17,284 (17278b000) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/sections'
2022-10-26 04:18:17,289 (17278b000) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/channels/all'
2022-10-26 04:48:34,528 (1006dc580) :  INFO (pipeinterface:87) - Stopping plug-in
2022-10-26 05:16:17,268 (1737bb000) :  DEBUG (runtime:1156) - Starting timed thread named 'invalidation_timer'

EDIT3: at the moment, your crash logs are from a year ago, and they look like this:

when you enable crash logging, and you zip the logs before restarting pms, the latest crash log will not be zero bytes I’ve been told. okay good luck!

EDIT4: I think you asked somewhere how to safely find previous versions. For a Mac you can find them on this website. If you run a shasum on the file you download and it matches the official zip file, you’re good. Many of us have the official ones still, and here are the recent ones, where the (1) file is the file I just downloaded from that website, and you can see it matches my original

$ shasum *universal*.zip
13775031f5d1fc7253ff15b654fe8efebc12e989  PlexMediaServer-1.28.0.5973-52ca4217f-universal.zip
96b2538fa1e13a91570125342afaff4d9c52732e  PlexMediaServer-1.28.0.5998-adb79ff3b-universal.zip
2cf82b505fe43a888164eb0d3bd1f33a8f546a4c  PlexMediaServer-1.28.2.6151-914ddd2b3-universal (1).zip
2cf82b505fe43a888164eb0d3bd1f33a8f546a4c  PlexMediaServer-1.28.2.6151-914ddd2b3-universal.zip
39ea9ef5e7250741a484ec1e8f232b49415632d4  PlexMediaServer-1.29.0.6244-819d3678c-universal.zip
6996616a39676d66b257d77e0b482cb646d7adda  PlexMediaServer-1.29.1.6241-d3d56053f-universal.zip
149ff0ea72f1424a823248ef729d5387086346b4  PlexMediaServer-1.29.1.6260-420892357-universal.zip
26db83a63dee4f96b3a7e9d4d7b96bba9e7af9cb  PlexMediaServer-1.29.2.6269-052339d54-universal.zip
d3f43c998bf02950a2037f4993e5e1feee15ef40  PlexMediaServer-1.29.2.6273-2b1f0cbcd-universal.zip
$ 

I never downloaded any olderr x86_64.zip files. So I can’t hash them for you guys, but someone else can.