iptv-proxy
iptv-proxy copied to clipboard
error unmarshalling JSON
Seeing this in the Feb 7th Docker build:
2022/03/01 16:51:47 [iptv-proxy] 2022/03/01 - 16:51:47 | 10.0.5.55 | xtream cache API m3u file [GIN] 2022/03/01 - 16:51:48 | 500 | 568.289666ms | 10.0.5.55 | GET "/get.php?username=test&password=test&type=m3u_plus&output=ts" Error #01: error unmarshaling json: json: invalid use of ,string struct tag, trying to unmarshal unquoted value into xtreamcodes.FlexInt [GIN] 2022/03/01 - 16:53:26 | 500 | 538.754145ms | 10.0.5.55 | GET "/xmltv.php?username=test&password=test" Error #01: error unmarshaling json: json: invalid use of ,string struct tag, trying to unmarshal unquoted value into xtreamcodes.FlexInt
Happens with both the XMLTV and the get.php calls from clients - anything I can do / look at? 99% sure the authentication/endpoint details are correct
Hello, I need to investigate again the go.xtream-code package again..etc
do you think you can try to get some JSON data from your API provider?
We should write unit tests on the xtream package to try to cover all the test...etc
So this provider uses HTTPS for it's XC endpoints...Assuming that the XC back end is the same across providers, I can wireshark a non-https set of calls and then try them against this provider. What's the best way to get the logs to you?
The best way, it's to add a debug mode here: https://github.com/tellytv/go.xtream-codes
to trace easily the JSON payload...etc (TLS or not)
I'll make a docker image with dev tag to try it on your side...etc
Thank you! For the idiots out there (me included), would that mean using a different image in the docker create statement? I currently use:
docker.pkg.github.com/pierre-emmanuelj/iptv-proxy/iptv-proxy:latest-amd64
What would be the dev one, as all of ones listed here:
https://github.com/pierre-emmanuelJ/iptv-proxy/releases
Seem to be production ones?
Could this be of help? Similar error: iptv-proxy | Error #01: json: cannot unmarshal array into Go struct field SeriesEpisode.episodes.info of type struct { Audio xtreamcodes.FFMPEGStreamInfo "json:"audio""; Bitrate xtreamcodes.FlexInt "json:"bitrate""; Duration string "json:"duration""; DurationSecs xtreamcodes.FlexInt "json:"duration_secs""; MovieImage string "json:"movie_image""; Name string "json:"name""; Plot string "json:"plot""; Rating xtreamcodes.FlexFloat "json:"rating""; ReleaseDate string "json:"releasedate""; Video xtreamcodes.FFMPEGStreamInfo "json:"video"" }
Just started using iptv-proxy today for xtream so I can't say if it was working before but mainly the client gives a very generic error when trying to view TV shows/series while live seems to work.
So in an attempt to give you a little more to go on, I pulled the JSON from the player_api.php from some of the services I use. 'interestingly' the two that fail are HTTPS, but I think that could just be coincidence at this point. I've removed the URLs, username/password and subscription dates (they're just unixtime integers):
Works:`
{"user_info":{"username":"<snip>","password":"<snip>","message":"Welcome To Best IPTV Service Provider","auth":1,"status":"Active","exp_date":"<snip>","is_trial":"0","active_cons":"0","created_at":"<snip>","max_connections":"1","allowed_output_formats":["m3u8","ts","rtmp"]},"server_info":{"url":"<snip>","port":"900","https_port":"8080","server_protocol":"http","rtmp_port":"8081","timezone":"UTC","timestamp_now":1646575372,"time_now":"2022-03-06 14:02:52","process":true}}
{"user_info":{"username":"<snip>","password":"<snip>","message":"Enjoy.!!","auth":1,"status":"Active","exp_date":"<snip>","is_trial":"0","active_cons":"0","created_at":"<snip>","max_connections":"4","allowed_output_formats":["m3u8","ts","rtmp"]},"server_info":{"xui":true,"version":"1.5.12","revision":2,"url":"<snip>","port":"80","https_port":"443","server_protocol":"http","rtmp_port":"2092","timestamp_now":1646575379,"time_now":"2022-03-06 14:02:59","timezone":"UTC"}}
Does not work:
{"user_info":{"username":"<snip>","password":"<snip>","message":"Welcome to MytvDigital","auth":1,"status":"Active","exp_date":"<snip>","is_trial":"0","active_cons":0,"created_at":"<snip>","max_connections":"1","allowed_output_formats":["m3u8","ts","rtmp"]},"server_info":{"xui":true,"version":"1.4.16","revision":3,"url":"<snip>","port":"80","https_port":"443","server_protocol":"https","rtmp_port":"8880","timestamp_now":1646575363,"time_now":"2022-03-06 14:02:43","timezone":"Europe\/London"}}
{"user_info":{"username":"<snip>","password":"<snip>","message":"Welcome to Future of Streaming","auth":1,"status":"Active","exp_date":"<snip>","is_trial":"0","active_cons":0,"created_at":"<snip>","max_connections":"2","allowed_output_formats":["m3u8","ts","rtmp"]},"server_info":{"xui":true,"version":"1.5.12","revision":2,"url":"<snip>","port":"80","https_port":"443","server_protocol":"https","rtmp_port":"8880","timestamp_now":1646575351,"time_now":"2022-03-06 14:02:31","timezone":"UTC"}}
Any news on this? Any way I can help? :)
Some xtreamcodes.FlexInt
(integer OR string representing an integer) are missing here then, I can fix it then
BTW: I think I'll fork the repo go.xtream-codes
to be more reactive on bugfix...etc
Also getting this in a different spot:
Error #01: json: cannot unmarshal object into Go value of type []xtreamcodes.Category
Hi! Got similar error too: Error #01: error unmarshaling json: unexpected end of JSON input
I'm having the same issue.
Error #01: error unmarshaling json: json: invalid use of ,string struct tag, trying to unmarshal unquoted value into xtreamcodes.FlexInt
Is there any update on the fix for this?
I've got the same issue know.
I thought it was coming from my attempts with nginx and 3 backends, but even in the original variant without nginx it doesn't work now.
Seems like its a handful issues that's all related to this, like #111, 114 & 137.
I’m getting this error now.
Error #01: error unmarshaling json: json: invalid use of ,string struct tag, trying to unmarshal unquoted value into xtreamcodes.FlexInt
Did the debug docker image get created? What does anyone need, happy to provide data.
Le jeu. 8 déc. 2022, 11:43, Conny Ankargren @.***> a écrit :
Seems like its a handful issues that's all related to this, like #111 https://github.com/pierre-emmanuelJ/iptv-proxy/issues/111, 114 & 137.
— Reply to this email directly, view it on GitHub https://github.com/pierre-emmanuelJ/iptv-proxy/issues/114#issuecomment-1342510474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKESUY2FWPHZUPFSGZKZXTWMG3WZANCNFSM5PUTI5CA . You are receiving this because you commented.Message ID: @.***>
Hi all,
Same issue here, been happening for a few weeks now.
"Error #01: error unmarshaling json: json: invalid use of ,string struct tag, trying to unmarshal unquoted value into xtreamcodes.FlexInt"
Seems to be throwing this when getting categories (live/movie/tv).
Happy to provide any further logs or try a new version of the proxy, already tried rolling back to a previous version but no joy.