AlexxIT/go2rtc · error
yandex: can't get snapshot url for device
Error message
yandex: can't get snapshot url for device: %s
What it means
Yandex GetSnapshotURL guard: the deviceID was not found among any household's devices returned by GetDevices (device id appended). Either the ID is wrong, the device is not shared with this account, or the devices list is stale.
Solutions
- Verify the device ID matches one from GetDevices()
- Confirm the Yandex account has access (sharing) to that camera
- Refresh the session/devices list if it may be stale
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/yandex/session.go:153 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/8640c9af65ccf999.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/yandex/session.go:153
for _, household := range data.Households {
devices = append(devices, household.All...)
}
return devices, nil
}
func (s *Session) GetSnapshotURL(deviceID string) (string, error) {
devices, err := s.GetDevices()
if err != nil {
return "", err
}
for _, device := range devices {
if device.Id == deviceID {
return device.Parameters.SnapshotUrl, nil
}
}
return "", errors.New("yandex: can't get snapshot url for device: " + deviceID)
}
func (s *Session) WebrtcCreateRoom(deviceID string) (*Room, error) {
csrf, err := s.GetCSRF()
if err != nil {
return nil, err
}
req, err := http.NewRequest(
"POST", "https://iot.quasar.yandex.ru/m/v3/user/devices/"+deviceID+"/webrtc/create-room",
strings.NewReader(`{"protocol":"whip"}`),
)
if err != nil {
return nil, err
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("X-CSRF-Token", csrf)View on GitHub (pinned to c245815e75)