Comments (15)
Hmm, it seems to be able to parse your movies libraries fine and choke on your tv library, is your frontend server for plex doing compression? could you try running the following commands and then try to sync
docker exec -ti watchstate console servers:edit --key 'options.client.headers.Accept-Encoding' --set '' -- plx
docker exec -ti watchstate console servers:edit --key 'options.client.http_version' --set '1.0' -- plx
from watchstate.
My server sits behind a reverse proxy, Caddy.
But when I tested the server I used both the direct http address and also the https link.
My current set is as below using http and when I ran those commands, I get the same error.
Here is my servers.yaml
plx:
type: plex
url: 'http://192.168.2.107:32400'
token: <removed>
uuid: <removed>
user: <removed>
import:
enabled: true
export:
enabled: true
webhook:
import: true
push: true
match:
user: true
uuid: true
token: <removed>
options:
client:
headers:
Accept-Encoding: ''
http_version: '1.0'
[2022-04-22T17:10:21+00:00] logger.INFO: [M: 38.71M] Parsing Successful plx - (Movies) - (movie:3) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.07M] Finished Parsing plx - (Movies) - (movie:3) (1011 objects) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.06M] Parsing Successful plx - (Movies 4K) - (movie:2) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.07M] Finished Parsing plx - (Movies 4K) - (movie:2) (7 objects) response.
[2022-04-22T17:10:22+00:00] logger.INFO: [M: 38.06M] Parsing Successful plx - (TV Shows) - (episode:4) response.
In Parser.php line 368:
[JsonMachine\Exception\SyntaxErrorException]
Malformed UTF-8 characters, possibly incorrectly encoded '}' At position 0.
Exception trace:
at /app/vendor/halaxa/json-machine/src/Parser.php:368
JsonMachine\Parser->error() at /app/vendor/halaxa/json-machine/src/Parser.php:220
JsonMachine\Parser->getIterator() at /app/src/Libs/Servers/PlexServer.php:631
App\Libs\Servers\PlexServer->App\Libs\Servers\{closure}() at /app/src/Commands/State/ImportCommand.php:252
App\Commands\State\ImportCommand->process() at /app/src/Commands/State/ImportCommand.php:96
App\Commands\State\ImportCommand->App\Commands\State\{closure}() at /app/src/Command.php:84
App\Command->single() at /app/src/Commands/State/ImportCommand.php:96
App\Commands\State\ImportCommand->runCommand() at /app/src/Command.php:22
App\Command->execute() at /app/vendor/symfony/console/Command/Command.php:291
Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:989
Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:299
Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at /app/src/Libs/Initializer.php:117
App\Libs\Initializer->runConsole() at /app/console:66
state:import [-r|--redirect-logger] [-m|--memory-usage] [-f|--force-full] [--proxy PROXY] [--no-proxy NO-PROXY] [--timeout TIMEOUT] [-s|--servers-filter [SERVERS-FILTER]] [--import-unwatched] [--stats-show] [--stats-filter [STATS-FILTER]] [--mapper-direct] [-c|--config CONFIG]
from watchstate.
Alright, could you please try running this command to see plex response, it seems something happening in tv response,
curl -v -H "Accept: application/json" -H "X-Plex-Token: YOUR_PLEX_TOKEN_HERE" 'http://192.168.2.107:32400/library/sections/4/all?type=4&sort=addedAt:asc&includeGuids=1' 2>&1 | tee response.log
it should save a log in your directory called response.log, please edit the log to remove your plex token, after that please attached it here or send it to me at (ws-contact at arabcoders.net)
i need to see the response headers and body from plex to determine why the json parser is failing on this specific library.
from watchstate.
Ok. Just sent you the response log via email.
from watchstate.
I've successfully parsed your given response, the only thing i noticed that might be a problem is there is invalid UTF-8 characters in your payload. i can probably fix that, and you are still using the old plex agents. which most likely will cause you problems in the future however they are "kinda" supported right now i'll see what i can do. i'll let you know once i have something hopefully by later today or tomorrow.
from watchstate.
i pushed possible fix for this issue, in an hour i want you to switch to arabcoders/watchstate:dev-latest
pull the new container and restart after that try importing
from watchstate.
Ok. Will try and report back in an hour.
I checked my plex agents and they seem to be using the new agents. There is no option to upgrade like stated in the plx server site. My agents are.. The TV agent is : Plex TV Series and movies is : Plex Movie.
Are these are the correct agents?
Thx
from watchstate.
Indeed those are correct new agents, however it seems you possibly forgot to run full meta refresh on library. Anyway, the dev build is out try now and report back if it fixes your problem.
from watchstate.
I've refreshed my Plex libraries and downloaded new dev image. But still same.
Also ran db list against plx server, and see a small set of watched status.
Any way to get a count from db and compare plx vs jellyfin?
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (3x11) - The Q and the Grey]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (3x7) - Sacred Ground]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (4x6) - The Raven]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Star Trek: Voyager - (4x8) - Year of Hell, Part 1]. Not watched.
[2022-04-22T19:10:52+00:00] logger.DEBUG: Ignoring plx - (TV Shows) - (episode:4) - [Warehouse 13 - (1x5) - Elements]. Not watched.
[2022-04-22T19:10:52+00:00] logger.ERROR: Unable to parse plx - (TV Shows) - (episode:4) response. [(file: /app/vendor/halaxa/json-machine/src/Parser.php), (line: 368), (kind: JsonMachine\Exception\SyntaxErrorException), (error: Malformed UTF-8 characters, possibly incorrectly encoded '}' At position 0.)]
[2022-04-22T19:10:52+00:00] logger.NOTICE: Finished waiting HTTP Requests.
[2022-04-22T19:10:52+00:00] logger.INFO: No changes detected.
┌─────────┬───────┬─────────┬────────┐
│ Type │ Added │ Updated │ Failed │
├─────────┼───────┼─────────┼────────┤
│ Movie │ 0 │ 0 │ 0 │
├─────────┼───────┼─────────┼────────┤
│ Episode │ 0 │ 0 │ 0 │
└─────────┴───────┴─────────┴────────┘
from watchstate.
Ok, i pushed another fix to dev-latest should be done building in <30min after that pull restart and try again. if that also does not work, im afraid im out of ideas it's clearly one an item that is not valid UTF as you can see from the log it can parse some items and then bails.
from watchstate.
it seems this file "/home/media/TVShows/Show.Title/Season.04/ShowTitle s04e20 - Vis � Vis NTSC DVD x264 DD5.1-JCH.mkv" causing the problems. it's the character between vis and Vis it's incorrectly encoded do you not use media manger like sonarr ?
Star Trek: Voyager S04E20
from watchstate.
nevermind, please try next build. it seems i messed up.
from watchstate.
@MagnuM2K the new builds are out, please try and report again pull and restart and try to import, now it should ONLY ignore the malformed item instead of bailing out completely on all other items.
from watchstate.
That seemed to have done the trick.
Now that I know which file was causing the issue, I've rename it as well.
Thx!
from watchstate.
Np. glad it worked for you.
from watchstate.
Related Issues (20)
- [BUG] Unable to run state:import for Jellyfin HOT 9
- [BUG] Emby backend:library:unmatched returning movie folders even though the movies are matched HOT 4
- [BUG] ERROR 429 with Plex user tokens HOT 16
- [BUG] Newly added media to server B overrides watched on server A HOT 12
- [BUG] New install restart loops HOT 1
- [BUG] Jellyfin configuration stopped working - 11/11 update HOT 1
- [BUG] progress not syncing to plex HOT 2
- [BUG] Errors during caddy bootup HOT 1
- Unable to sync progress state for external user. Watch state works fine. HOT 1
- [BUG] this is not working HOT 11
- [BUG] Webhook token Unify command is missing HOT 2
- Plex is not updating its watch progress despite successful watch progress update HOT 21
- [BUG] Cannot export to Jellyfin HOT 7
- [BUG] Jellyfin import includes wrong remote date HOT 4
- [BUG] Error Log missing entries HOT 2
- Export process job stopped working some versions back - not sure which ?
- Plex sync issue (Error 550} HOT 1
- [BUG] WebUI Backends plex doesn't show user, uuid fields
- [BUG] Using unquoted spaced value for environment variable fail HOT 1
- Can't export to plex HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchstate.