mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[Issue]: Invalid Json in response #3675
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#3675
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yenon on GitHub (Mar 18, 2022).
Please describe your bug
Querying the /Sessions endpoint of the REST-API can result in invalid JSON responses. The offending property is "SupportsPersistentIdentifier", which on my current testing setup may have the value of:
true* Connection #0 to host 192.168.178.117 left intact
without string quotes. This will result in some json-librarys failing to parse the response.
Jellyfin Version
10.7.7
if other:
No response
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
[2022-03-18 02:03:36,496] INFO in _internal: 127.0.0.1 - - [18/Mar/2022 02:03:36] "POST / HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
StopIteration: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/yenon/PycharmProjects/Notifier/venv/lib/python3.10/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Please attach any screenshots here
No response
Code of Conduct
offending JSON section:
@nielsvanvelzen commented on GitHub (Mar 18, 2022):
I do not believe this malformed JSON is generated by the server. It might be caused by your HTTP client or something. A quick search pointed to this StackOverflow question about a similar issue: https://stackoverflow.com/questions/61880928/what-does-connection-0-to-host-example-com-left-intact-mean
@yenon commented on GitHub (Mar 19, 2022):
Might be the case, i'm not too familiar with python, flask and requests. I had some odd json-parsing errors too, and must have stumbled on this with curl.