Lost all movies from plex suddenly

Server Version#: 1.25.9.5673-bf5697c5d
Player Version#:

Hi guys, I recently realised that I lost all of my movies from my movies library.
My plex setup is in docker and I’ve re-instated the containers numerous times.
I even renamed my old config files, created a new blank config folder, but when I tried adding my movies folder, it only found 1 movie from the library.
Weirdly, I can’t remove the library from plex once they’re added.
When I go inside the docker container, I can see the all the movie subfolders within the “movie” parent folder, and I can see all the files within each of the subfolder.

I can’t understand why this is happening.
Has anyone experience the same issue?

I’m down to the last resort of re-installing the debian O/S that my docker sits in…
help please. thanks

Try a library scan and post your logs.

I noticed that with the recent updates Plex can no longer see files in certain subfolders. I haven’t dug through logs yet but from observation it looks to be pretty random. Plex had previously had no issues with said subfolders.

@Sucalakafufu Ill repeat what I said: Try a library scan and post your logs.

If all naming is still per Plex standard, 99% of the issues are permissions.

Please make certain permissions are 755 on the directory and 644 on the file.

Yeah wasn’t able to get to that until now. I just attached my logs if that helps.
Plex Media Server Logs_2022-04-02_18-31-06.zip (1.8 MB)

Actually running this on Windows for me. Permissions are the same from before.

For my library, specific subfolders started to not get recognized even though Plex had them scanned and added previous to the update. As far as I know, nothing changed besides updating Plex.

Edit: To clarify, my issues are with subfolders in my TV Library. My Movie Library seems to be functioning normally.

It would have really helped if you had DEBUG logging on,

I don’t know Windows (You’re in the Linux part of the forum)

What I did find is:

path specified: "X:\TV\Seeding\Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264\Whose.Line.Is.It.Anyway.S02E07.Greg.Proops.Josie.Lawrence.Paul.Merton.Sandi.Toksvig.Tony.Slattery.Mike.McShane.4OD.WEBRip.AAC2.0.x264.mkv"
Apr 02, 2022 10:58:14.813 [16684] ERROR - Exception caught determining whether we could skip 'Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264' ~ Null value not allowed for this type
Apr 02, 2022 10:58:14.828 [16684] ERROR - Couldn't get size of file "X:\TV\Seeding\Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264\Whose.Line.Is.It.Anyway.S02E07.Greg.Proops.Josie.Lawrence.Paul.Merton.Sandi.Toksvig.Tony.Slattery.Mike.McShane.4OD.WEBRip.AAC2.0.x264.mkv": boost::filesystem::file_size: The system cannot find the path specified: "X:\TV\Seeding\Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264\Whose.Line.Is.It.Anyway.S02E07.Greg.Proops.Josie.Lawrence.Paul.Merton.Sandi.Toksvig.Tony.Slattery.Mike.McShane.4OD.WEBRip.AAC2.0.x264.mkv"
Apr 02, 2022 10:58:16.071 [16684] WARN - Scanner: episode range for '"X:\TV\sonarr\Paw Patrol [S8.E09-E0]- Ultimate Rescue Pups Save the Opening Ceremonies && Ultimate Rescue Pups Save the Adventure Bay Games.mkv"' is invalid (epStart: 9, epEnd: 0)

It looks like the file name length is too long??

The name is being truncated and a NULL character is being found in that name.

Apr 02, 2022 10:58:14.813 [16684] ERROR - Exception caught determining whether we could skip 'Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264' ~ Null value not allowed for this type

Just grabbed another log with DEBUG on.

My fault on the Windows side of things. I can move this if needed.

I took a look at the logs with DEBUG logging on. This is on one of the subfolders that gets ignored. I guess the database has 0 entries for this subfolder. I noticed this happens on most of the subfolders that are not showing up in Plex.
Plex Media Server Logs_2022-04-02_21-30-05.zip (2.1 MB)

Apr 02, 2022 21:27:23.820 [13368] DEBUG - Scanner: Processing directory X:\TV\TV\Grey's Anatomy\Season 18 (parent: yes)
Apr 02, 2022 21:27:23.866 [13368] DEBUG - Directory had 14 files, database had 0 files, can't skip.
Apr 02, 2022 21:27:23.906 [13368] DEBUG - Activity: updated activity a9244869-70d6-47a9-b99d-f4291b459505 - completed 85.1% - Scanning TV

I see you’re using sonarr.

Is sonarr setting file permissions?

Did the file get removed or moved by Sonarr?

I know you’re on windows and spaces require quoting when you access them via the command line (just like Linux does) but think I found it

This name:

X:\TV\sonarr\Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264\Whose.Line.Is.It.Anyway.S02E07.Greg.Proops.Josie.Lawrence.Paul.Merton.Sandi.Toksvig.Tony.Slattery.Mike.McShane.4OD.WEBRip.AAC2.0.x264.mkv

is 265 characters long.

Isn’t the MAXPATH length in Windows 255 characters?

If so, then I recommend you consider restructuring your media storage and trimming some of characters on those names else it will continue to get worse.

[chuck@glockner ~.2004]$ wc dummy
  1   1 265 dummy
[chuck@glockner ~.2005]$ cat dummy
X:\TV\sonarr\Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264\Whose.Line.Is.It.Anyway.S02E07.Greg.Proops.Josie.Lawrence.Paul.Merton.Sandi.Toksvig.Tony.Slattery.Mike.McShane.4OD.WEBRip.AAC2.0.x264.mkv

Naming convention is:

Top-dir/
   Series/
     Season/
        Series - SxxExx - Optional title.ext

You appear to have extra there which you don’t need when using Sonarr.

I use sonarr myself. Please observe how I let Sonarr do the work

[chuck@glockner tv2.2012]$ pwd
/vol/media/tv2
[chuck@glockner tv2.2013]$ tree 7\ Days/
7 Days/
├── Season 01
│   ├── 7 Days - S01E01 - Pilot (1).mkv
│   ├── 7 Days - S01E02 - Pilot (2).mkv
│   ├── 7 Days - S01E03 - The Gettysburg Virus.mkv
│   ├── 7 Days - S01E04 - Come Again.mkv
│   ├── 7 Days - S01E05 - Vows.mkv
│   ├── 7 Days - S01E06 - Doppleganger (1).mkv

New log:
Plex Media Server Logs_2022-04-03_00-43-33.zip (4.7 MB)

Everything in my Sonarr directory is actually more of a temp storage space. Sonarr is set not to organize that directory. I have other scripts that organize, encode, and copy files into “X:\TV\TV”.

I did notice that Sonarr error. I just renamed all of those files with filebot. I am now seeing the same “database had 0 files” output for the “X:\TV\sonarr” subdirectories that I renamed. These directories are displaying as trashed in Plex:

Apr 03, 2022 00:38:38.226 [7436] DEBUG -   * Scanning X:\TV\sonarr\Whose.Line.Is.It.Anyway.(UK)\Season 1
Apr 03, 2022 00:38:38.228 [7436] DEBUG - Scanner: Processing directory X:\TV\sonarr\Whose.Line.Is.It.Anyway.(UK)\Season 1 (parent: yes)
Apr 03, 2022 00:38:38.282 [7436] DEBUG - Directory had 13 files, database had 0 files, can't skip.

Here is one of the paths in “X:\TV\TV” that is having the issue as well:

PS X:\TV\TV> tree .\Walker\ /f
Folder PATH listing for volume MEDIA
Volume serial number is 000000FB 6ED0:4166
X:\TV\TV\WALKER
├───Season 1
│       Walker [S1.E01]- Pilot.mp4
│       Walker [S1.E02]- Back in the Saddle.mp4
│       Walker [S1.E03]- Bobble Head.mp4
│       Walker [S1.E04]- Don’t Fence Me In.mp4
│       Walker [S1.E05]- Duke.mp4
│       Walker [S1.E06]- Bar None.mp4
│       Walker [S1.E07]- Tracks.mp4
│       Walker [S1.E08]- Fine Is a Four Letter Word.mp4
│       Walker [S1.E09]- Rule Number 17.mp4
│       Walker [S1.E10]- Encore.mp4
│       Walker [S1.E11]- Freedom.mp4
│       Walker [S1.E12]- A Tale of Two Families.mp4
│       Walker [S1.E13]- Defend the Ranch.mp4
│       Walker [S1.E14]- Mehar's Jacket.mp4
│       Walker [S1.E15]- Four Stones in Hand.mp4
│       Walker [S1.E16]- Bad Apples.mp4
│       Walker [S1.E17]- Dig.mp4
│       Walker [S1.E18]- Drive.mp4
│
└───Season 2
        Walker [S2.E01]- They Started It.mp4
        Walker [S2.E02]- The One Who Got Away.mp4
        Walker [S2.E03]- Barn Burner.mp4
        Walker [S2.E04]- It's Not What You Think.mp4
        Walker [S2.E05]- Partners and Third Wheels.mp4
        Walker [S2.E06]- Douglas Fir.mp4
        Walker [S2.E07]- Where Do We Go From Here.mp4
        Walker [S2.E08]- Two Points for Honesty.mp4
        Walker [S2.E09]- Sucker Punch.mp4
        Walker [S2.E10]- Nudge.mp4
        Walker [S2.E11]- Boundaries.mp4
        Walker [S2.E12]- Common Ground.mp4
Apr 03, 2022 00:35:45.781 [7436] DEBUG - Scanner: Processing directory X:\TV\TV\Walker\Season 2 (parent: yes)
Apr 03, 2022 00:35:45.820 [7436] DEBUG - Directory had 12 files, database had 0 files, can't skip.

I did some extra testing and it looks like if I add a new file to a subdirectory, all of the files in that subdirectory are no longer recognized by Plex after the next scan.

I wonder if one of the newest updates had something that messes with subdirectories.

@Sucalakafufu can you provide a screenshot of the library => Edit => Add folders screen for that library?

Are you using Sonarr to set permissions?

If not, you need to. Sonarr will write files using its username (which doesn’t grant PMS access). It will then change the directory permissions.

Setting directory permissions 755 and file permissions 644 will allow PMS to read them.

Be advised, it does turn off the Synology ACLs (may be an issue for other programs).

Under DSM 6, we could easily add to user groups and avoid these issues.
Under DSM 7, no such capability exists as DSM 7 isolates every program from the users and each other.

Here is one example of where Plex knows the file exists but somewhere, permissions higher up are blocking it -OR- the file was moved somewhere without Scan Files being performed to update PMS.

I suspect the file got moved without PMS being updated prior to attempting to play it

Apr 03, 2022 00:38:32.988 [16296] ERROR - Couldn't find the file to stream: X:\TV\showRSS\Killing.Eve.S04E07.720p.WEB.h264-GOSSIP[rarbg]\Killing.Eve.S04E07.720p.WEB.h264-GOSSIP.mkv

I don’t think Sonarr has a permissions option for Windows. The permissions on the folders are correct and have never been an issue with Plex before the update. I am not using a Synology for storage.

All errors outside of the “X:TV\TV” directory can be ignored. I apologize if that is confusing in the logs. “X:\TV\showrss” is another automated directory. Files get put here then renamed. I currently have “Empty trash” turned off on scans as I troubleshoot so Plex will still have these errors until I empty the trash.

image

The library where I would focus is “X:\TV\TV” if we are looking through logs. Permissions have not changed since before the Plex update and suddenly Plex does not like subfolders after adding a new file to them. If you do not add or remove anything from a subfolder, Plex still remembers all files.

Can you provide an example of something under X:\TV\TV that is missing from the logs you pointed to?

@Sucalakafufu

  1. My apologies. Don’t know how I got “Syno” in my head.
  2. What are you using for storage?

I would like to break this out as it’s Windows in a Linux & Docker thread.

and this is a Windows issue you’re reporting – to which I can be of no effective help other than the full path length (possible error) which I found.

What happens if you change the paths such that the total length is < 260 characters?
Does it start to work again?

Naming Files, Paths, and Namespaces - Win32 apps | Microsoft Learn.

In editions of Windows before Windows 10 version 1607, the maximum length for a path is MAX_PATH, which is defined as 260 characters . In later versions of Windows, changing a registry key or using the Group Policy tool is required to remove the limit.Jan 4, 2021

Ref: (from above)

X:\TV\sonarr\Whose.Line.Is.It.Anyway.(UK).S01-S10.SD.WEBRip.PDTV-MiXED\Whose.Line.Is.It.Anyway.S02.576p.4OD.WEBRip.AAC2.0.x264\Whose.Line.Is.It.Anyway.S02E07.Greg.Proops.Josie.Lawrence.Paul.Merton.Sandi.Toksvig.Tony.Slattery.Mike.McShane.4OD.WEBRip.AAC2.0.x264.mkv

is 265 characters long.

A post was split to a new topic: Plex does not see media files

From my previous post:

Here is one of the paths in “X:\TV\TV” that is having the issue:

PS X:\TV\TV> tree .\Walker\ /f
Folder PATH listing for volume MEDIA
Volume serial number is 000000FB 6ED0:4166
X:\TV\TV\WALKER
├───Season 1
│       Walker [S1.E01]- Pilot.mp4
│       Walker [S1.E02]- Back in the Saddle.mp4
│       Walker [S1.E03]- Bobble Head.mp4
│       Walker [S1.E04]- Don’t Fence Me In.mp4
│       Walker [S1.E05]- Duke.mp4
│       Walker [S1.E06]- Bar None.mp4
│       Walker [S1.E07]- Tracks.mp4
│       Walker [S1.E08]- Fine Is a Four Letter Word.mp4
│       Walker [S1.E09]- Rule Number 17.mp4
│       Walker [S1.E10]- Encore.mp4
│       Walker [S1.E11]- Freedom.mp4
│       Walker [S1.E12]- A Tale of Two Families.mp4
│       Walker [S1.E13]- Defend the Ranch.mp4
│       Walker [S1.E14]- Mehar's Jacket.mp4
│       Walker [S1.E15]- Four Stones in Hand.mp4
│       Walker [S1.E16]- Bad Apples.mp4
│       Walker [S1.E17]- Dig.mp4
│       Walker [S1.E18]- Drive.mp4
│
└───Season 2
        Walker [S2.E01]- They Started It.mp4
        Walker [S2.E02]- The One Who Got Away.mp4
        Walker [S2.E03]- Barn Burner.mp4
        Walker [S2.E04]- It's Not What You Think.mp4
        Walker [S2.E05]- Partners and Third Wheels.mp4
        Walker [S2.E06]- Douglas Fir.mp4
        Walker [S2.E07]- Where Do We Go From Here.mp4
        Walker [S2.E08]- Two Points for Honesty.mp4
        Walker [S2.E09]- Sucker Punch.mp4
        Walker [S2.E10]- Nudge.mp4
        Walker [S2.E11]- Boundaries.mp4
        Walker [S2.E12]- Common Ground.mp4
Apr 03, 2022 00:35:45.781 [7436] DEBUG - Scanner: Processing directory X:\TV\TV\Walker\Season 2 (parent: yes)
Apr 03, 2022 00:35:45.820 [7436] DEBUG - Directory had 12 files, database had 0 files, can't skip.

I am currently using Stablebit Drivepool with drives connected to the actual server.

All good thanks for that.

Same issue exists even after changing the path. The path length issue is in my Sonarr “X:\TV\sonarr” directory. The subfolder issue also exists in my “X:\TV\TV” directory which does not have the path length issue.