Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling record: true on HomeKit video stream results in crash #1489

Open
hazcod opened this issue Nov 30, 2024 · 0 comments
Open

Enabling record: true on HomeKit video stream results in crash #1489

hazcod opened this issue Nov 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working panic

Comments

@hazcod
Copy link

hazcod commented Nov 30, 2024

Hi, trying to get an Aqara G4 doorbell to work over HomeKit and recording. (timeline in Hassio>Homekit)
When adding record: true to my streams, it crashes with a nil reference.

Go2RTC Config:

streams:
  doorbell: homekit://xxxx:33151?device_id=94:41:B9:ED:BD:7B&device_public=ef8a5e.....
  record: true

api:
  listen: "127.0.0.1:1984" # localhost

rtsp:
  listen: "127.0.0.1:8554" # localhost

webrtc:
  listen: ":8555" # external TCP/UDP port

And logs:

14:39:59.096 INF go2rtc platform=linux/arm64 revision=dbe9e4a version=1.9.7
14:39:59.098 INF config path=/config/go2rtc.yaml
14:39:59.101 INF [rtsp] listen addr=:8554
14:39:59.103 INF [api] listen addr=:1984
14:39:59.110 INF [webrtc] listen addr=:8555/tcp
18:00:13.701 ERR github.com/AlexxIT/go2rtc/internal/homekit/api.go:52 > error="hap: wrong PIN format: "
18:00:44.577 ERR github.com/AlexxIT/go2rtc/internal/homekit/api.go:52 > error="hap: Server pairing method is unavailable"
18:09:22.067 INF go2rtc platform=linux/arm64 revision=dbe9e4a version=1.9.7
18:09:22.068 INF config path=/config/go2rtc.yaml
18:09:22.070 INF [api] listen addr=:1984
18:09:22.070 INF [rtsp] listen addr=:8554
18:09:22.071 INF [webrtc] listen addr=:8555/tcp
16:51:21.355 INF go2rtc platform=linux/arm64 revision=dbe9e4a version=1.9.7
16:51:21.357 INF config path=/config/go2rtc.yaml
16:51:21.360 INF [rtsp] listen addr=:8554
16:51:21.361 INF [api] listen addr=:1984
16:51:21.368 INF [webrtc] listen addr=:8555/tcp
17:11:46.350 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp 127.0.0.1:8554->127.0.0.1:51910: i/o timeout"
17:12:38.670 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp [::1]:8554->[::1]:38354: i/o timeout"
17:12:38.669 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp [::1]:8554->[::1]:59802: i/o timeout"
17:12:38.681 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp [::1]:8554->[::1]:59790: i/o timeout"
17:12:38.669 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp [::1]:8554->[::1]:41600: i/o timeout"
17:12:38.681 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp [::1]:8554->[::1]:57890: i/o timeout"
17:12:38.669 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp [::1]:8554->[::1]:57902: i/o timeout"
17:24:02.385 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp 127.0.0.1:8554->127.0.0.1:46802: i/o timeout"
17:30:34.187 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:241 > error="read tcp 127.0.0.1:8554->127.0.0.1:51046: i/o timeout"
fatal error: concurrent map read and map write

goroutine 583 [running]:
github.com/AlexxIT/go2rtc/pkg/srtp.(*Server).handle(0x40002821e0)
	github.com/AlexxIT/go2rtc/pkg/srtp/server.go:83 +0xd4
created by github.com/AlexxIT/go2rtc/pkg/srtp.(*Server).AddSession in goroutine 612
	github.com/AlexxIT/go2rtc/pkg/srtp/server.go:47 +0x164

goroutine 1 [chan receive, 36 minutes]:
github.com/AlexxIT/go2rtc/pkg/shell.RunUntilSignal()
	github.com/AlexxIT/go2rtc/pkg/shell/shell.go:77 +0x7c
main.main()
	github.com/AlexxIT/go2rtc/main.go:94 +0x2c8

goroutine 20 [IO wait, 13 minutes]:
internal/poll.runtime_pollWait(0x7f69cdbf28, 0x72)
	runtime/netpoll.go:345 +0xa0
internal/poll.(*pollDesc).wait(0x7?, 0x8?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x28
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0x400019a080)
	internal/poll/fd_unix.go:611 +0x250
net.(*netFD).accept(0x400019a080)
	net/fd_unix.go:172 +0x28
net.(*TCPListener).accept(0x4000048240)
	net/tcpsock_posix.go:159 +0x28
net.(*TCPListener).Accept(0x4000048240)
	net/tcpsock.go:327 +0x2c
net/http.(*Server).Serve(0x40001ac000, {0x931318, 0x4000048240})
	net/http/server.go:3260 +0x2a8
github.com/AlexxIT/go2rtc/internal/api.listen({0x805fab, 0x3}, {0x806cc3, 0x5})
	github.com/AlexxIT/go2rtc/internal/api/api.go:103 +0x190
created by github.com/AlexxIT/go2rtc/internal/api.Init in goroutine 1
	github.com/AlexxIT/go2rtc/internal/api/api.go:72 +0x494

goroutine 21 [IO wait]:
internal/poll.runtime_pollWait(0x7f69cdc020, 0x72)
	runtime/netpoll.go:345 +0xa0
internal/poll.(*pollDesc).wait(0x6?, 0x0?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x28
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0x4000226380)
	internal/poll/fd_unix.go:611 +0x250
net.(*netFD).accept(0x4000226380)
	net/fd_unix.go:172 +0x28
net.(*TCPListener).accept(0x40000a0300)
	net/tcpsock_posix.go:159 +0x28
net.(*TCPListener).Accept(0x40000a0300)
	net/tcpsock.go:327 +0x2c
github.com/AlexxIT/go2rtc/internal/rtsp.Init.func1()
	github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:64 +0x4c
created by github.com/AlexxIT/go2rtc/internal/rtsp.Init in goroutine 
@AlexxIT AlexxIT added bug Something isn't working panic labels Dec 1, 2024
@AlexxIT AlexxIT self-assigned this Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working panic
Projects
None yet
Development

No branches or pull requests

2 participants