Server updater bug

I completely removed acronis and it still failed. Then I tried again and it worked. the difference is when it worked, channels dvr was scanning my library and when it failed it was idle.

The click and hold is acted upon by the web browser you're using at the time.
Not sure if it still works, but SHIFT-click also used to work. Yep, just tried it.
I just use the :gear: dropdown to select Stable vs Pre-Release

I've also seen it update and the browser still displays the old version until the page is refreshed (mostly in Firefox, sometimes in Brave).

previously tried drop down also. will only work if server is not idle ie: scanning library or in use.

What happens when you do it while it's idle?
Have you checked the browser dev tools network inspector to see if the browser is sending the update command to the server API? PUT /updater/check/prerelease

If it is idle, I get "browser refresh needed" and endlessly refreshing shows the old version also the latest folder disappears in the install dir. log shows error renaming access denied. but it works if channels is scanning my library.

Ahh, so there's still the "permission" issue.
The server is downloading the newest version, but can't create the latest link to it.
Not sure if Channels DVR uses links in Windows, but mklink /d creates a symbolic directory link.

don't think it links, just renames. there is no permission issue as it works when scanning. my guess is it is trying to rename before it deletes the old folder.

Can you paste log snippet from working vs not working

2024/01/21 23:09:48.256369 [DBG] Scheduling wake timer for guide data in 10h41m41.7436301s
2024/01/21 23:10:37.247248 [M3U] Refreshed lineup for pluto with 372 channels
2024/01/21 23:10:37.428352 [M3U] Refreshed lineup for samsung with 327 channels
2024/01/21 23:10:37.440130 [M3U] Refreshed lineup for stirr with 27 channels
2024/01/21 23:11:15.375763 [SYS] Downloading new version v2024.01.22.0049
2024/01/21 23:11:22.554332 [SYS] Error checking for update: rename C:\ProgramData\ChannelsDVR\2024.01.22.0049 C:\ProgramData\ChannelsDVR\latest: Access is denied.
2024/01/21 23:12:13.942141 [SYS] Downloading new version v2024.01.22.0049
2024/01/21 23:12:18.224864 [SYS] Error checking for update: rename C:\ProgramData\ChannelsDVR\2024.01.22.0049 C:\ProgramData\ChannelsDVR\latest: Access is denied.
2024/01/21 23:13:28.281877 [HTTP] | 200 | 4.2813ms | 127.0.0.1 | PUT "/debug/http"
2024/01/21 23:13:28.309461 [HTTP] | 200 | 19.482ms | 127.0.0.1 | GET "/settings"
2024/01/21 23:13:28.348585 [HTTP] | 200 | 18.5251ms | 127.0.0.1 | GET "/settings"
2024/01/21 23:13:33.693849 [HTTP] | 200 | 0s | 127.0.0.1 | GET "/updater"
2024/01/21 23:13:38.973268 [HTTP] | 200 | 0s | 127.0.0.1 | PUT "/updater/check/prerelease"
2024/01/21 23:13:39.124270 [SYS] Downloading new version v2024.01.22.0049
2024/01/21 23:13:42.035163 [HTTP] | 200 | 0s | 127.0.0.1 | GET "/updater"
2024/01/21 23:13:43.042926 [HTTP] | 200 | 0s | 127.0.0.1 | GET "/updater"
2024/01/21 23:13:43.650107 [SYS] Error checking for update: rename C:\ProgramData\ChannelsDVR\2024.01.22.0049 C:\ProgramData\ChannelsDVR\latest: Access is denied.
2024/01/21 23:13:44.050799 [HTTP] | 200 | 0s | 127.0.0.1 | GET "/updater"
2024/01/21 23:13:48.787967 [HTTP] | 200 | 9.2897ms | 127.0.0.1 | GET "/log"
2024/01/21 23:13:56.282520 [HTTP] | 200 | 141.0843ms | 192.168.1.40 | GET "/dvr/recordings/upnext"
2024/01/21 23:13:58.131763 [HTTP] | 200 | 1.9920383s | 192.168.1.40 | GET "/devices/ANY/guide?time=1705896834&duration=28800"
2024/01/21 23:14:37.841786 [HTTP] | 200 | 3.8338ms | 127.0.0.1 | GET "/log"
2024/01/21 23:14:37.849437 [HTTP] | 200 | 10.3411ms | 127.0.0.1 | GET "/log"
2024/01/21 23:14:39.260166 [HTTP] | 200 | 3.8085ms | 127.0.0.1 | GET "/log"
2024/01/21 23:14:40.852541 [HTTP] | 200 | 3.845ms | 127.0.0.1 | GET "/log"
2024/01/21 23:14:40.859042 [HTTP] | 200 | 3.1953ms | 127.0.0.1 | GET "/log"
2024/01/21 23:14:42.249118 [HTTP] | 200 | 3.7839ms | 127.0.0.1 | GET "/log"
2024/01/21 23:15:33.351246 [HTTP] | 200 | 4.2724ms | 127.0.0.1 | GET "/log"
2024/01/21 23:15:46.484905 [HTTP] | 200 | 2m37s | 127.0.0.1 | GET "/dvr/events/subscribe"
2024/01/21 23:15:59.593159 [HTTP] | 200 | 5.9586ms | 127.0.0.1 | GET "/dvr"
2024/01/21 23:15:59.593159 [HTTP] | 200 | 3.21ms | 127.0.0.1 | GET "/dvr"
2024/01/21 23:15:59.614663 [HTTP] | 200 | 9.9809ms | 127.0.0.1 | GET "/log"
2024/01/21 23:15:59.631459 [HTTP] | 200 | 12.9039ms | 127.0.0.1 | GET "/log"
2024/01/21 23:16:02.086551 [HTTP] | 200 | 2.1584ms | 127.0.0.1 | GET "/dvr"
2024/01/21 23:16:02.093177 [HTTP] | 200 | 1.0769ms | 127.0.0.1 | GET "/remote/nat"
2024/01/21 23:16:02.126826 [HTTP] | 200 | 26.7631ms | 127.0.0.1 | GET "/settings"
2024/01/21 23:16:02.130698 [HTTP] | 200 | 0s | 127.0.0.1 | GET "/remote/tailscale"
2024/01/21 23:16:02.155827 [HTTP] | 200 | 64.8116ms | 127.0.0.1 | GET "/remote"
2024/01/21 23:16:02.224176 [HTTP] | 200 | 120.9951ms | 127.0.0.1 | GET "/bonjour"
2024/01/21 23:16:02.252334 [HTTP] | 200 | 163.5252ms | 127.0.0.1 | GET "/system"
2024/01/21 23:16:03.780027 [HTTP] | 200 | 1.6945498s | 127.0.0.1 | GET "/troubleshoot"
2024/01/21 23:16:03.793546 [HTTP] | 200 | 2.1388ms | 127.0.0.1 | GET "/status"
2024/01/21 23:16:03.806633 [HTTP] | 200 | 527.2ยตs | 127.0.0.1 | GET "/auth"
2024/01/21 23:16:22.021310 [SYS] Downloading new version v2024.01.22.0049
2024/01/21 23:16:46.305197 [SYS] Update downloaded and verified successfully.
2024/01/21 23:17:07.521810 [SYS] Bonjour service stopped.
2024/01/21 23:17:07.574094 [DVR] Recording engine stopped.
2024/01/21 23:17:08.599845 [SYS] Goodbye.
2024/01/21 23:17:08.819873 [SYS] Starting Channels DVR v2024.01.22.0049 (windows-x86_64 pid:9848) in C:\ProgramData\ChannelsDVR\data
2024/01/21 23:17:10.741101 [SYS] Started HTTP Server on 8089
2024/01/21 23:17:11.273098 [HDR] Found 2 devices

hello

We are testing a fix based on your observation that it doesn't work when idle. I will let you know when its pushed to prerelease.

thanks

1 Like

is it ready?

1 Like

Got the same thing over here. Hopefully, a new version will help fix this so I too am waiting for that

We would like some assistance in testing out a fix. This is going to be a slightly involved process to get it to work.

Option 1

  1. Make a backup of your DVR
  2. Make a copy of C:\ProgramData\ChannelsDVR\latest
  3. Stop the DVR service
  4. Download https://cdn.channelsdvr.net/2024.01.25.1914/channels-dvr.exe-windows-x86_64 and replace C:\ProgramData\ChannelsDVR\latest\channels-dvr.exe
  5. Start the DVR service
  6. Attempt to do an update to the latest version
  7. Submit diagnostics and make note of the ID

Option 2

If that didn't allow you to upgrade, try this next:

  1. Stop the DVR service
  2. Download https://cdn.channelsdvr.net/2024.01.25.2354/channels-dvr.exe-windows-x86_64 and replace C:\ProgramData\ChannelsDVR\latest\channels-dvr.exe
  3. Start the DVR service
  4. Attempt to do an update to the latest version
  5. Submit diagnostics and make note of the ID

Please let us know if either of these worked for you.

1 Like

option 1

2024/01/27 15:32:24.738551 [SYS] Downloading new version v2024.01.26.1803
2024/01/27 15:32:34.258824 [SYS] Error checking for update: rename C:\ProgramData\ChannelsDVR\2024.01.26.1803 C:\ProgramData\ChannelsDVR\latest: Access is denied.

option 2:

2024/01/27 15:39:19.793960 [SYS] Created database snapshot: backup-20240127.203918
2024/01/27 15:39:19.795585 [SYS] Removing old backup backup-20240113.215334
2024/01/27 15:39:41.649443 [SYS] Downloading new version v2024.01.26.1803
2024/01/27 15:39:50.111264 [SYS] Update downloaded and verified successfully.
2024/01/27 15:39:50.855588 [SYS] Created database snapshot: backup-20240127.203950
2024/01/27 15:39:50.857203 [SYS] Removing old backup backup-20240114.215934
2024/01/27 15:39:50.869058 [SYS] Shutting down for upgrade from v2024.01.25.2354 to v2024.01.26.1803
2024/01/27 15:39:51.721285 [SYS] Bonjour service stopped.
2024/01/27 15:39:51.804079 [DVR] Recording engine stopped.
2024/01/27 15:39:52.844395 [SYS] Goodbye.
2024/01/27 15:39:53.282063 [SYS] Starting Channels DVR v2024.01.26.1803 (windows-x86_64 pid:31668) in C:\ProgramData\ChannelsDVR\data
2024/01/27 15:39:54.909173 [SYS] Started HTTP Server on 8089
2024/01/27 15:39:55.432938 [HDR] Found 2 devices

2 Likes

@techpro2004 That's great news!

I believe that if you try to upgrade again, it will fail again (because v2024.01.26.1803 does not have the fix), so if you could go through the steps of Option 2 again, the latest build that has just shipped will have the fix and should resolve your issues going forward.

Thanks. What was the issue?

1 Like

It appears there's something about some versions of Windows where it will report back to a parent process that a child process has finished running when, in fact, it has not completely finished.

We added support for a check before we upgrade to make sure that the new binary can run successfully and that check was running into this issue.

1 Like

thanks. Glad it is resolved.

2 Likes