Closed jackwilsdon closed 2 months ago
I do think it's due to a Plex upgrade. I'm able to reproduce as well but haven't had issues in the past. Though it could also be something internal about how Plex decides to send the payload because this was accounted for in the past but I changed it. Plex seems to be waffling between sending the json as a single file or as a nested file within an array. In the past it was an array, then it was a regular file, now it's back to an array :shrug:
I've added code to defensively check for both types of structures it can send which should fix this issue.
You should be able to pull foxxmd/multi-scrobbler:pr-192
soon or use the https://github.com/FoxxMD/multi-scrobbler/tree/GH-191/plex-formdata-fix branch now
Yep that has fixed it, thanks!
Please check the FAQ before submitting a bug report.
Describe the bug The Plex source causes
multi-scrobbler
to crash.To Reproduce Steps to reproduce the behavior:
multi-scrobbler
crashes.Expected behavior multi-scrobbler correctly scrobbles from Plex.
Logs If possible reproduce the issue with debug logging ON
Versions (please complete the following information): Provide version information for any related sources/clients.
c6cf288
Additional context Here's the structure of the webhook request triggering the issue:
I'm not sure how
mimetype
is ending upundefined
here: https://github.com/FoxxMD/multi-scrobbler/blob/a1443594f7a508a8b580c8234a11e35719f6e8c3/src/backend/sources/PlexSource.ts#L280The docs for
formidable
seem to suggest it can be null: https://www.npmjs.com/package/formidable#fileI'm also seeing this under Node.js v18.20.4. Weirdly I didn't have this issue when I first set up
multi-scrobbler
a few days ago, so I'm not sure what has changed (I may have updated Plex?).