Ombi-app / Ombi

Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
http://ombi.io
GNU General Public License v2.0
3.64k stars 391 forks source link

Plex User Import stopped working. #5114

Closed Jimmy062006 closed 1 month ago

Jimmy062006 commented 1 month ago

Summary

I noticed that importing new plex users does not work.

It seems that the endpoint used to import users has been depreciated.

plex.tv/pms/friends/all/

<Response code="410" status="This endpoint was deprecated and removed">
<script/>
</Response>

Ombi Version

4.43.16

What platform(s) does this occur on?

Docker, Windows, Linux

What database are you using?

SQLite (Default)

Relevant log output

2024-05-14 14:55:45.562 +01:00 [ERR] Job Plex.IPlexUserImporter threw an exception.
Quartz.SchedulerException: Job threw an unhandled exception.
 ---> System.InvalidOperationException: There is an error in XML document (2, 2).
 ---> System.InvalidOperationException: <Response xmlns=''> was not expected.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPlexFriends.Read5_MediaContainer()
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
   at Ombi.Api.Api.DeserializeXml[T](String receivedString) in /home/runner/work/Ombi/Ombi/src/Ombi.Api/Api.cs:line 95
   at Ombi.Api.Api.Request[T](Request request, CancellationToken cancellationToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Api/Api.cs:line 90
   at Ombi.Api.Plex.PlexApi.GetUsers(String authToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Api.Plex/PlexApi.cs:line 203
   at Ombi.Schedule.Jobs.Plex.PlexUserImporter.ImportPlexUsers(UserManagementSettings userManagementSettings, List`1 allUsers, PlexServers server) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs:line 104
   at Ombi.Schedule.Jobs.Plex.PlexUserImporter.Execute(IJobExecutionContext job) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs:line 79
   at Ombi.Schedule.QuartzJobRunner.Execute(IJobExecutionContext context) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/QuartzJobRunner.cs:line 25
   at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken)
   --- End of inner exception stack trace --- [See nested exception: System.InvalidOperationException: There is an error in XML document (2, 2).
 ---> System.InvalidOperationException: <Response xmlns=''> was not expected.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPlexFriends.Read5_MediaContainer()
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
   at Ombi.Api.Api.DeserializeXml[T](String receivedString) in /home/runner/work/Ombi/Ombi/src/Ombi.Api/Api.cs:line 95
   at Ombi.Api.Api.Request[T](Request request, CancellationToken cancellationToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Api/Api.cs:line 90
   at Ombi.Api.Plex.PlexApi.GetUsers(String authToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Api.Plex/PlexApi.cs:line 203
   at Ombi.Schedule.Jobs.Plex.PlexUserImporter.ImportPlexUsers(UserManagementSettings userManagementSettings, List`1 allUsers, PlexServers server) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs:line 104
   at Ombi.Schedule.Jobs.Plex.PlexUserImporter.Execute(IJobExecutionContext job) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs:line 79
   at Ombi.Schedule.QuartzJobRunner.Execute(IJobExecutionContext context) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/QuartzJobRunner.cs:line 25
   at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken)]
BEASTbaT commented 1 month ago

I am having the same issue. Was about the create the same issue here

tidusjar commented 1 month ago

That sucks. Will take a look

tidusjar commented 1 month ago

We don't actually use plex.tv/pms/friends/all/, so must be something else

tidusjar commented 1 month ago

Seems to be working for me.

What's the response when you put this in the browser?

https://plex.tv/api/users?X-Plex-Token=AUTHTOKEN

There's sensitive info in there so feel free to either redact the user data by replacing it with REDACTED or PM me on Discord or email tidusjar@gmail.com

BEASTbaT commented 1 month ago

Sent you a discord friend request using this ID: tidusjar

BEASTbaT commented 1 month ago

This was resolved by properly updating Ombi. The apt repo is not completely up to date. Download the latest release from Github and update Ombi manually then test again. It worked for me after this.

Jimmy062006 commented 1 month ago

I didn't use apt to update it in the first please I downloaded the tar.

I will try it again now though as there is a new version anyway.

Jimmy062006 commented 1 month ago

Just to report back this is now working correctly.