multi-scrobbler: bug: Cannot start polling because Plex prerequisite data could not be built
Please check existing knowledge before opening an issue
- I have checked the FAQ and documentation
- I have searched through existing issues and discussions.
Describe the Bug
I initially had scrobbling from Plex working fine, however recently I’ve been unable to get Plex started as a source. I have double checked my token and can’t figure out where my configuration might be incorrect, especially since it initially worked and my environment has not changed. edit: it seems as though my environment HAS changed, in that when MS was working I was on an older version of Plex Media Server. I’m going to try reverting and see if that resolves the issue.
I tried following the issue here: https://github.com/FoxxMD/multi-scrobbler/issues/218 because it seemed sort of similar, but I am logged in and not a local user, on multi-scrobbler >0.8.8, and my token is active and working in other applications.
here is my config:
[
{
"name": "PlexApi",
"enable": true,
"clients": [],
"data": {
"token": "MYPLEXTOKEN",
"url": "http://192.168.1.178:32400"
},
"options": {
"logPayload": true,
"logFilterFailure": "debug"
}
}
]
Platform
Docker
Versions
- multi-scrobbler 0.9.6 on docker
- plex media server 1.41.9.9912 on docker
Logs
[2025-06-28 21:58:34.740 -0500] ERROR : [App] [Sources] [Plex - PlexApi] Cannot start polling because Plex prerequisite data could not be built
Error: Cannot start polling because Plex prerequisite data could not be built
at PlexApiSource.onPollPostAuthCheck (CWD/src/backend/sources/PlexApiSource.ts:212:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PlexApiSource.poll (CWD/src/backend/sources/AbstractSource.ts:314:14)
caused by: Error: Unable to get server libraries
at PlexApiSource.buildLibraryInfo (CWD/src/backend/sources/PlexApiSource.ts:186:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PlexApiSource.onPollPostAuthCheck (CWD/src/backend/sources/PlexApiSource.ts:209:13)
at async PlexApiSource.poll (CWD/src/backend/sources/AbstractSource.ts:314:14)
caused by: SDKValidationError: Response validation failed: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
0,
"art"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
0,
"composite"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
0,
"thumb"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
1,
"art"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
1,
"composite"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
1,
"thumb"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
2,
"art"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
2,
"composite"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
2,
"thumb"
],
"message": "Required"
}
]
at safeParse (CWD/node_modules/@lukehagar/plexjs/src/lib/schemas.ts:49:16)
at matchFunc (CWD/node_modules/@lukehagar/plexjs/src/lib/matchers.ts:272:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async libraryGetAllLibraries (CWD/node_modules/@lukehagar/plexjs/src/funcs/libraryGetAllLibraries.ts:106:20)
at async unwrapAsync (CWD/node_modules/@lukehagar/plexjs/src/sdk/types/fp.ts:44:13)
at async PlexApiSource.buildLibraryInfo (CWD/src/backend/sources/PlexApiSource.ts:182:31)
at async PlexApiSource.onPollPostAuthCheck (CWD/src/backend/sources/PlexApiSource.ts:209:13)
at async PlexApiSource.poll (CWD/src/backend/sources/AbstractSource.ts:314:14)
caused by: ZodError: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
0,
"art"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
0,
"composite"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
0,
"thumb"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
1,
"art"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
1,
"composite"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
1,
"thumb"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
2,
"art"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
2,
"composite"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"object",
"MediaContainer",
"Directory",
2,
"thumb"
],
"message": "Required"
}
]
at get error [as error] (CWD/node_modules/zod/lib/types.js:55:31)
at ZodEffects.parse (CWD/node_modules/zod/lib/types.js:160:22)
at <anonymous> (CWD/node_modules/@lukehagar/plexjs/src/lib/matchers.ts:274:42)
at safeParse (CWD/node_modules/@lukehagar/plexjs/src/lib/schemas.ts:47:15)
at matchFunc (CWD/node_modules/@lukehagar/plexjs/src/lib/matchers.ts:272:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async libraryGetAllLibraries (CWD/node_modules/@lukehagar/plexjs/src/funcs/libraryGetAllLibraries.ts:106:20)
at async unwrapAsync (CWD/node_modules/@lukehagar/plexjs/src/sdk/types/fp.ts:44:13)
at async PlexApiSource.buildLibraryInfo (CWD/src/backend/sources/PlexApiSource.ts:182:31)
at async PlexApiSource.onPollPostAuthCheck (CWD/src/backend/sources/PlexApiSource.ts:209:13)
Additional Context
I do have webhooks enabled for Plex for use in Watchstate, but I have never had them set up for use with MS.
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 18 (5 by maintainers)
Commits related to this issue
- fix(Plex): Bump plexjs version to fix response validation #314 — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix(plex): Ignore library response validation As temporary fix for #314 — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix(Plex): Bump plexjs version to fix response validation #314 — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix(plex): Ignore library response validation As temporary fix for #314 — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix(plex): Temporary fix for library response validation #314 Catches and ignores outdated validation from @lukehagar/plexjs if we can verify raw value contains the required objects https://github.c... — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix(Plex): Bump plexjs version to fix response validation #314 — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix(plex): Ignore library response validation As temporary fix for #314 — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix(plex): Temporary fix for library response validation #314 Catches and ignores outdated validation from @lukehagar/plexjs if we can verify raw value contains the required objects https://github.c... — committed to FoxxMD/multi-scrobbler by FoxxMD a year ago
- fix: Update getAllLibraries with new response PMS 1.41.9.9961 removed image-related fields from response FoxxMD/multi-scrobbler#314 — committed to FoxxMD/plex-api-spec by FoxxMD a year ago
@FoxxMD Ah, sorry for the red herring. Looks like the TrueNAS Plex app was mislabeled. Checking the actual server logs yielded 1.41.9.9961. 😓
I have another data point for you on this bug. I’m running stable Plex (1.41.8.9834) and started observing this error after restarting my Plex server (no version change, just a container restart). I’ve tried running pr-317, and it does not seem to fix the issue.
Same error. Will downgrade to stable and make sure to keep versions in line for this one. Thanks for trying to band-aid it 😃
It’s likely that the response validation the version of the plex client library MS uses, @lukehagar/plexjs, is not compatible with the newer PMS version. I’m also on 1.41.8.9834.
I’ll bump the library version and see if it works with my current version, then i’ll need users to test that it works with
1.41.9.9912as well @bustedlawnchair @HStep20