Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to fetch watchlist: Malformed message body: Invalid JSON #158

Closed
maxnatamo opened this issue Jun 19, 2024 · 8 comments · Fixed by #159
Closed

Unable to fetch watchlist: Malformed message body: Invalid JSON #158

maxnatamo opened this issue Jun 19, 2024 · 8 comments · Fixed by #159

Comments

@maxnatamo
Copy link

Hello,

I noticed my Plex watchlist never got reflected into Radarr and Sonarr, and it seemed to be cause by invalid JSON being returned from Plex:

2024-06-19T23:15:34.258953953+02:00 21:15:34.258 [io-compute-0] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON
2024-06-19T23:15:44.619825803+02:00 21:15:44.618 [io-compute-0] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON
2024-06-19T23:15:55.001647281+02:00 21:15:55.001 [io-compute-1] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON
2024-06-19T23:16:05.458917958+02:00 21:16:05.458 [io-compute-1] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON
2024-06-19T23:16:15.867620815+02:00 21:16:15.864 [io-compute-0] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON
...

Is this a known issue? Any solutions?

Redacted log found here: https://pastebin.com/hWW88vae

@rstrblstr
Copy link

Also happening to me. Tried updating to the latest version and its still occurring.

00:36:45.346 [io-compute-0] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON
00:36:45.573 [io-compute-3] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.MalformedMessageBodyFailure: Malformed message body: Invalid JSON

@nylonee
Copy link
Owner

nylonee commented Jun 20, 2024

Think Plex has changed their API for accessing friends watchlists. I'll take a look today

@nylonee
Copy link
Owner

nylonee commented Jun 20, 2024

It looks like watchlist RSS feeds have either changed the way you can fetch the json version, or removed that functionality completely.

When I try to hit this using cURL:

curl --location 'https://rss.plex.tv/REDACTED' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'

I end up getting XML back rather than json. An example of what I used to expect is here: https://github.com/nylonee/watchlistarr/blob/main/src/test/resources/watchlist.json

I'll keep digging, the easiest thing would be to find out if we can still access this data in JSON structure, otherwise I'll have to do an XML implementation instead.

@nylonee
Copy link
Owner

nylonee commented Jun 20, 2024

Got it, adding ?format=json to the URL fixes the issue and gives me JSON again

@nylonee nylonee mentioned this issue Jun 20, 2024
3 tasks
@maxnatamo
Copy link
Author

While I think most of the issue has been fixed, I'm still seeing some errors in the logs:

2024-06-21 17:32:36.096624+02:0015:32:36.095 [io-compute-0] WARN  PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.client.UnexpectedStatus: unexpected HTTP status: 500 Internal Server Error for request GET https://rss.plex.tv/[[REDACTED]]?format=json

When opening the link in a browser, the response is returns fine.

Some items also seems to not be added from the watchlist, although, that's mostly likely because they're not even returned in the JSON response.

@bunkabee
Copy link

bunkabee commented Jun 22, 2024

I am also having this issue after re-pulling the latest version.

02:56:55.521 [io-compute-2] WARN PlexTokenSync$ - Unable to fetch watchlist from Plex: org.http4s.client.UnexpectedStatus: unexpected HTTP status: 500 Internal Server Error for request GET https://rss.plex.tv/[[redacted]]?format=json

@AhmedNSidd
Copy link

AhmedNSidd commented Jun 22, 2024

Getting the same error here. As mentioned above, I can see the watchlist fine when the link is opened up in the browser.

EDIT: Since this issue has been closed, I'll open a new issue for this... #161

@nylonee
Copy link
Owner

nylonee commented Jun 22, 2024

Thanks all, let's track this problem in the new issue that @AhmedNSidd raised #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants