diericx / bevy

Self hosted software for distibuted video streaming using BitTorrent
75 stars 6 forks source link

Unhandled Rejection (TypeError): Cannot read property 'duration' of undefined #48

Closed eyal1izhaki closed 3 years ago

eyal1izhaki commented 3 years ago

300 MB from the movie has been downloaded.. But i can't watch it on the frontend client

Error on frontend client:

Unhandled Rejection (TypeError): Cannot read property 'duration' of undefined DurationFromServer.getDuration src/components/VideojsPlugins/DurationFromServer/index.js:67 64 | this.infoHash, 65 | this.fileIndex 66 | );

67 | return plugin.setCachedDuration(url, metadata.format.duration); 68 | } 69 | } 70 |

Error on backend server:

adata?url=http://localhost:8080/v1/torrents/torrent/9c5b54f0d757d69596d9f5422cb4b63cb40279ea/stream/0" 2020/11/01 18:05:43 WARNING: Could not format time string, falling back to 0 2020/11/01 18:05:43 [-ss 00:00:00 -i http://localhost:8080/v1/torrents/torrent/9c5b54f0d757d69596d9f5422cb4b63cb40279ea/stream/0 -f ismv -c:v libx264 -c:a libmp3lame -maxrate 1G -vf scale=iw:ih -threads 0 -preset veryfast -tune zerolatency -map 0:v:0 -map 0:a:0 -movflags frag_keyframe+empty_moov]

2020/11/01 18:05:43 [Recovery] 2020/11/01 - 18:05:43 panic recovered: GET /v1/transcoder/from_url?url=http://localhost:8080/v1/torrents/torrent/9c5b54f0d757d69596d9f5422cb4b63cb40279ea/stream/0&res=iw:ih&max_bitrate=1G HTTP/1.1 Host: localhost:8080 Accept: / Accept-Encoding: identity;q=1, *;q=0 Accept-Language: en-US,en;q=0.9 Connection: keep-alive Range: bytes=0- Referer: http://192.168.1.102:3000/movie Sec-Fetch-Dest: video Sec-Fetch-Mode: no-cors Sec-Fetch-Site: cross-site User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36

runtime error: invalid memory address or nil pointer dereference /usr/lib/go-1.13/src/runtime/panic.go:199 (0x44d58f) panicmem: panic(memoryError) /usr/lib/go-1.13/src/runtime/signal_unix.go:394 (0x44d3e0) sigpanic: panicmem() /usr/lib/go-1.13/src/os/exec.go:159 (0xa34c4f) (ProcessState).Sys: return p.sys() /usr/lib/go-1.13/src/os/exec.go:159 (0xa34c4c) (ProcessState).Sys: return p.sys() /home/ubuntu/projects/iceetime/internal/app/http/transcoder.go:56 (0xa34c44) (HTTPHandler).addTranscoderGroup.func1: status := cmdFF.ProcessState.Sys().(syscall.WaitStatus) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161 (0xa10a27) (Context).Next: c.handlersc.index /root/go/pkg/mod/github.com/gin-contrib/sessions@v0.0.3/sessions.go:52 (0xa2c983) Sessions.func1: c.Next() /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161 (0xa10a27) (Context).Next: c.handlersc.index /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/recovery.go:83 (0xa222f7) RecoveryWithWriter.func1: c.Next() /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161 (0xa10a27) (Context).Next: c.handlersc.index /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/logger.go:241 (0xa21763) LoggerWithConfig.func1: c.Next() /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161 (0xa10a27) (Context).Next: c.handlersc.index /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/gin.go:409 (0xa19b03) (Engine).handleHTTPRequest: c.Next() /root/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/gin.go:367 (0xa193b7) (Engine).ServeHTTP: engine.handleHTTPRequest(c) /usr/lib/go-1.13/src/net/http/server.go:2802 (0x6bfb67) serverHandler.ServeHTTP: handler.ServeHTTP(rw, req) /usr/lib/go-1.13/src/net/http/server.go:1890 (0x6bbd4b) (conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req) /usr/lib/go-1.13/src/runtime/asm_arm64.s:1128 (0x46432b) goexit: MOVD R0, R0 // NOP

[GIN] 2020/11/01 - 18:05:43 | 500 | 6.561713ms | 127.0.0.1 | GET "/v1/transcoder/from_url?url=http://localhost:8080/v1/torrents/torrent/9c5b54f0d757d69596d9f5422cb4b63cb40279ea/stream/0&res=iw:ih&max_bitrate=1G" panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4d147c]

goroutine 30025 [running]: os.(Process).signal(0x0, 0xdda900, 0x13019a0, 0x0, 0x0) /usr/lib/go-1.13/src/os/exec_unix.go:56 +0x24 os.(Process).Signal(...) /usr/lib/go-1.13/src/os/exec.go:131 os.(Process).kill(...) /usr/lib/go-1.13/src/os/exec_posix.go:59 os.(Process).Kill(...) /usr/lib/go-1.13/src/os/exec.go:116 github.com/diericx/iceetime/internal/app/http.(HTTPHandler).addTranscoderGroup.func1.1(0x40002cc3c0, 0x40000d6f20) /home/ubuntu/projects/iceetime/internal/app/http/transcoder.go:50 +0x80 created by github.com/diericx/iceetime/internal/app/http.(HTTPHandler).addTranscoderGroup.func1 /home/ubuntu/projects/iceetime/internal/app/http/transcoder.go:48 +0x464 exit status 2