tellytv / telly

An IPTV proxy
MIT License
760 stars 104 forks source link

Error when trying to add video provider in 1.5.0 #188

Closed BEisem closed 6 years ago

BEisem commented 6 years ago

telly release with the issue:

telly, version 1.5.0 (branch: HEAD, revision: 110d00f4ce86ca36f33d140472a3d15488f7cb84) build user: root@c051c41c0081 build date: 20180906-08:27:00 go version: go1.10.3

Operating environment (Docker/Windows/Linux/QNAP, etc.):

MacOS 10.12.6

Description of problem:

When I try to add a video provider in the web ui, I get the following error in the terminal:

POST /api/video_sources HTTP/1.1
Host: 192.168.7.59:6077
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Connection: keep-alive
Content-Length: 173
Content-Type: application/json
Cookie: organizrLanguage=en; _pk_id.1.8859=6858c188c0bae486.1512347158.459.1536238504.1536238504.; _pk_ses.1.8859=*; organizrToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjRmMWcyM2ExMmFhIn0.eyJpc3MiOiJPcmdhbml6ciIsImF1ZCI6Ik9yZ2FuaXpyIiwianRpIjoiNGYxZzIzYTEyYWEiLCJpYXQiOjE1MzYwODYwMzUsImV4cCI6MTUzNjY5MDgzNSwidXNlcm5hbWUiOiJiZWlzZW1hbiIsImdyb3VwIjoiQWRtaW4iLCJncm91cElEIjowLCJlbWFpbCI6ImJpbmthdGxAbWUuY29tIiwiaW1hZ2UiOiJodHRwczpcL1wvd3d3LmdyYXZhdGFyLmNvbVwvYXZhdGFyXC9iMzJlNDYzMTZkZWRmMjg0NWZjMzZiNWI1OThjMWQyMj9zPTEwMCZkPW1tIiwidXNlcklEIjoxfQ.rno2WglJVBxg1as_jkhIcXBdsWKT8WyWeAgX1xet6fc; _ga=GA1.1.1404227841.1510454771; blu_ray_com_new_releases_view=thumb; imdb_box_office_view=thumb; imdb_top_dvd_rentals_view=thumb; late_view=list; snatched_view=list; soon_view=thumb; suggest_view=thumb; advanced_toggle_checked=1; wanted_view=list; manage_view=thumb
Origin: http://192.168.7.59:6077
Referer: http://192.168.7.59:6077/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15

runtime error: index out of range
/usr/local/go/src/runtime/panic.go:502 (0x402b568)
/usr/local/go/src/runtime/panic.go:28 (0x402a3ad)
/go/src/github.com/tellytv/telly/internal/videoproviders/m3u.go:73 (0x47087ca)
/go/src/github.com/tellytv/telly/internal/videoproviders/m3u.go:25 (0x470762c)
/go/src/github.com/tellytv/telly/internal/videoproviders/main.go:39 (0x470890f)
/go/src/github.com/tellytv/telly/internal/api/video_source.go:32 (0x4751dc3)
/go/src/github.com/tellytv/telly/internal/api/utils.go:85 (0x475520a)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/context.go:108 (0x46210b2)
/go/src/github.com/tellytv/telly/vendor/github.com/zsais/go-gin-prometheus/middleware.go:358 (0x47312fb)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/context.go:108 (0x46210b2)
/go/src/github.com/tellytv/telly/internal/api/utils.go:55 (0x47548d1)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/context.go:108 (0x46210b2)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/recovery.go:48 (0x4631ff9)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/context.go:108 (0x46210b2)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/gin.go:361 (0x46290c5)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/gin.go:326 (0x4628912)
/usr/local/go/src/net/http/server.go:2694 (0x432491b)
/usr/local/go/src/net/http/server.go:1830 (0x4320a70)
/usr/local/go/src/runtime/asm_amd64.s:2361 (0x4057030)
mrmiles156 commented 6 years ago

I have also had a similar issue, I'm new to all this but when adding a video provider the following errors occur

INFO[2018-09-06T20:55:58+01:00] telly is preparing to go live (version=1.5.0, branch=HEAD, revision=110d00f4ce86ca36f33d140472a3d15488f7cb84)
DEBU[2018-09-06T20:55:58+01:00] creating webserver routes
INFO[2018-09-06T20:55:58+01:00] telly is live and on the air!
INFO[2018-09-06T20:55:58+01:00] Broadcasting from http://localhost:6077/
INFO[2018-09-06T20:55:58+01:00] EPG URL: http://localhost:6077/epg.xml

2018/09/06 20:59:41 [Recovery] 2018/09/06 - 20:59:41 panic recovered:
POST /api/video_sources HTTP/1.1
Host: localhost:6077
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Connection: keep-alive
Content-Length: 127
Content-Type: application/json
Origin: http://localhost:6077
Referer: http://localhost:6077/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36

runtime error: index out of range
/usr/local/go/src/runtime/panic.go:502 (0x42d1b6)
/usr/local/go/src/runtime/panic.go:28 (0x42bf94)
/go/src/github.com/tellytv/telly/internal/videoproviders/m3u.go:73 (0xb27861)
/go/src/github.com/tellytv/telly/internal/videoproviders/m3u.go:25 (0xb266c3)
/go/src/github.com/tellytv/telly/internal/videoproviders/main.go:39 (0xb279a6)
/go/src/github.com/tellytv/telly/internal/api/video_source.go:32 (0xb6f42a)
/go/src/github.com/tellytv/telly/internal/api/utils.go:85 (0xb728e1)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/context.go:108 (0xa3be09)
/go/src/github.com/tellytv/telly/vendor/github.com/zsais/go-gin-prometheus/middleware.go:358 (0xb517d2)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/context.go:108 (0xa3be09)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/recovery.go:48 (0xa4d2d0)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/context.go:108 (0xa3be09)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/gin.go:361 (0xa441cc)
/go/src/github.com/tellytv/telly/vendor/github.com/gin-gonic/gin/gin.go:326 (0xa43a19)
/usr/local/go/src/net/http/server.go:2694 (0x729002)
/usr/local/go/src/net/http/server.go:1830 (0x725087)
/usr/local/go/src/runtime/asm_amd64.s:2361 (0x4579c0)


I'm adding an external MU3 file

I'm running this on windows 10

robbiet480 commented 6 years ago

Issue was due to unexpected stream URLs in the Iris M3U. Now, if we have this issue, we will log the invalid line and continue with parsing (implemented at 1a9ef91f248515927468e4fc8fca318ecccdf193)