Stderr: panic: runtime error: index out of range [1] with length 1

Hello,

My channels service on Ubuntu is in a restart loop due to a panic. A suggestion in the past was to rebuild the database but I am not sure how that is done without access to the web interface. Any suggestions would be greatly appreciated.

$ sudo systemctl status channels-dvr
ā— channels-dvr.service - Channels DVR
Loaded: loaded (/etc/systemd/system/channels-dvr.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2026-01-29 21:10:56 EST; 725ms ago
Process: 79523 ExecStart=/home/jack/channels-dvr/latest/channels-dvr (code=exited, status=1/FAILURE)
Main PID: 79523 (code=exited, status=1/FAILURE)
CPU: 168ms

$ tail -n 200 /home/jack/channels-dvr/data/channels-dvr.log
2026/01/29 20:51:48.960191 [SYS] Started HTTP Server on 8089
2026/01/29 20:51:49.893903 [HDR] Found 1 devices
2026/01/29 20:51:50.170905 [DVR] Waiting 20h8m10s until next job 1769810400-5 Alaska State Troopers
2026/01/29 20:52:00.449712 [SYS] Starting Channels DVR v2025.12.28.0239 (linux-x86_64 pid:58082) in /home/jack/channels-dvr/data
2026/01/29 20:52:00.463968 [SYS] Started HTTP Server on 8089
2026/01/29 20:52:01.396927 [HDR] Found 1 devices
2026/01/29 20:52:01.640614 [DVR] Waiting 20h7m58s until next job 1769810400-5 Alaska State Troopers
2026/01/29 20:52:11.949134 [SYS] Starting Channels DVR v2025.12.28.0239 (linux-x86_64 pid:58414) in /home/jack/channels-dvr/data
2026/01/29 20:52:11.963703 [SYS] Started HTTP Server on 8089
2026/01/29 20:52:12.894713 [HDR] Found 1 devices
2026/01/29 20:52:13.133842 [DVR] Waiting 20h7m47s until next job 1769810400-5 Alaska State Troopers
2026/01/29 20:52:23.442502 [SYS] Starting Channels DVR v2025.12.28.0239 (linux-x86_64 pid:58749) in /home/jack/channels-dvr/data
2026/01/29 20:52:23.456338 [SYS] Started HTTP Server on 8089
2026/01/29 20:52:24.388241 [HDR] Found 1 devices
2026/01/29 20:52:24.613560 [DVR] Waiting 20h7m35s until next job 1769810400-5 Alaska State Troopers
2026/01/29 20:52:34.942901 [SYS] Starting Channels DVR v2025.12.28.0239 (linux-x86_64 pid:59077) in /home/jack/channels-dvr/data
2026/01/29 20:52:34.956687 [SYS] Started HTTP Server on 8089
2026/01/29 20:52:35.890026 [HDR] Found 1 devices
2026/01/29 20:52:36.112116 [DVR] Waiting 20h7m24s until next job 1769810400-5 Alaska State Troopers
2026/01/29 20:52:46.445269 [SYS] Starting Channels DVR v2025.12.28.0239 (linux-x86_64 pid:59405) in /home/jack/channels-dvr/data
2026/01/29 20:52:46.459292 [SYS] Started HTTP Server on 8089
2026/01/29 20:52:47.392412 [HDR] Found 1 devices
2026/01/29 20:52:47.618749 [DVR] Waiting 20h7m12s until next job 1769810400-5 Alaska State Troopers
2026/01/29 20:52:47.714011 stderr: panic: runtime error: index out of range [1] with length 1
2026/01/29 20:52:47.714032 stderr:
^^^^^^^^
2026/01/29 20:52:57.945639 [SYS] Starting Channels DVR v2025.12.28.0239 (linux-x86_64 pid:59733) in /home/jack/channels-dvr/data
2026/01/29 20:52:57.961609 [SYS] Started HTTP Server on 8089
2026/01/29 20:52:58.893303 [HDR] Found 1 devices
2026/01/29 20:52:59.137938 [DVR] Waiting 20h7m1s until next job 1769810400-5 Alaska State Troopers
2026/01/29 20:53:09.443053 [SYS] Starting Channels DVR v2025.12.28.0239 (linux-x86_64 pid:60064) in /home/jack/channels-dvr/data

Have you tried restoring from a backup by chance?
http://YOUR_IP:8089/restore

I did not have a backup. I had just set this up about a month ago after Channels on my RPi also died. The RPi is fine, and given its no longer supported I moved onto an Intel NUC/i5's on Ubuntu and hadn't taken that wise precaution yet to backup. I looked at the shell history and the setup was followed correctly so something happened after to Channels, perhaps a solar flare. Perms and accounts were correct. Nuke'd from orbit and reinstalled its working fine again now. Only variation is no internal disk, external usb only. Thanks for the idea!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.