desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Problems with group policy and auto update feature

Open rtfm98 opened this issue 2 years ago • 3 comments

I confirm (by marking "x" in the [ ] below: [x]):


Summary Disabling the auto update function doesn't work via group policies

Environment

  • Operating System: Windows 10 1809
  • Mattermost Desktop App version: 5.1.0
  • Mattermost Server version: 6.3.9

Steps to reproduce

  • distribute group policies as described in the docs and set "EnableAutoUpdater" to "0"
  • start desktop client

Expected behavior

  • no "update available" popup and icon in the right corner

Observed behavior

  • "update available" popup and icon in the right corner

With gpresult, we confirmed that the group policy is distributed and active. We checked via regedit that the registry key is set as follows:

Path: HKEY_LOCAL_MACHINE\Software\Policies\Mattermost Key: EnableAutoUpdater Value: 0

In the user context HKEY_CURRENT_USER we didn't find any entry like this, though.

In C:\Users\censored\AppData\Roaming\Mattermost\logs\main.log I found this error multiple times:

[2022-09-09 14:17:28.796] [info]  Found version 5.1.1 (url: 5.1.1/mattermost-desktop-setup-5.1.1-win.exe)
[2022-09-09 14:17:28.828] [info]  [Mattermost] available version 5.1.1
[2022-09-09 14:17:29.014] [info]  Log level set to: info
[2022-09-09 14:17:34.166] [info]  [<censored>___T...] finished loading https://<censored>/
[2022-09-09 14:17:35.817] [error] error: ProcessUncleanExitError: ADD command exited with code 1:
FEHLER: Die Registrierungsbearbeitung wurde vom Administrator deaktiviert.
    at mkErrorMsg (C:\Program Files\Mattermost\Desktop\resources\app.asar\index.js:51742:10)
    at ChildProcess.<anonymous> (C:\Program Files\Mattermost\Desktop\resources\app.asar\index.js:52354:10)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

Also, in C:\Users\censored\AppData\Roaming\Mattermost\config.json the auto update setting is configured as follows:

"autoCheckForUpdates": true,

When I manually set this to "false", the popups disappear. But unfortunately this isn't a sustainable solution for my whole company.

Possible fixes n/a

rtfm98 avatar Sep 12 '22 06:09 rtfm98

I don't speak German, but a quick Google translate reveals the error: ERROR: Registry editing has been disabled by the administrator.

Digging a bit, looks like the issue is coming from our registry library. My recommendation here would be to contact your system administrator to figure out why you're unable to access the registry at all, since reading shouldn't be restricted here (especially when trying to read Group Policy).

devinbinnie avatar Sep 12 '22 15:09 devinbinnie

Hey @devinbinnie, thanks for your answer! I'll get in touch with our responsible department and check this out.

rtfm98 avatar Sep 13 '22 16:09 rtfm98

Addendum:

I tried some stuff with a private virtual machine (with admin rights) running Windows 10 Pro (which has group policy support) and I feel that the issue described above might not have something to do with my company's computer config.

first try

  • installed v5.1.0 via msi installer
  • configured mattermost client (added one server)
  • stopped mattermost client
  • defined GPO's afterwards
  • started mattermost client

result: "update v5.1.1 available" popup and icon in the upper right corner Via regedit I confirmed that the registry key is set as described in the initial post.

main.log:

[2022-09-13 19:29:16.090] [info]  Log level set to: info
[2022-09-13 19:29:16.963] [info]  Checking for update
[2022-09-13 19:29:17.702] [info]  [censored___TAB_MESSAGING] finished loading https://censored.de/
[2022-09-13 19:29:18.519] [info]  Found version 5.1.1 (url: 5.1.1/mattermost-desktop-setup-5.1.1-win.exe)
[2022-09-13 19:29:18.642] [info]  [Mattermost] available version 5.1.1

second try

  • uninstalled v5.1.0
  • removed AppData under C:\Users\censored\AppData\Roaming\Mattermost
  • defined GPO's afterwards
  • installed v5.1.0 via msi installer
  • started mattermost client

same result as above

main.log:

[2022-09-13 19:40:28.318] [info]  Checking for update
[2022-09-13 19:40:28.592] [info]  Log level set to: info
[2022-09-13 19:40:28.670] [info]  config.autostart has been configured: true
[2022-09-13 19:40:28.815] [info]  Generated new staging user ID: censored_ID
[2022-09-13 19:40:30.268] [info]  Found version 5.1.1 (url: 5.1.1/mattermost-desktop-setup-5.1.1-win.exe)
[2022-09-13 19:40:30.377] [info]  [Mattermost] available version 5.1.1

Am I missing something?

rtfm98 avatar Sep 13 '22 18:09 rtfm98

@rtfm98 The MSI fix was included in v5.2, has your issue been resolved?

devinbinnie avatar Nov 30 '22 15:11 devinbinnie

@devinbinnie Thanks for the follow-up. v5.2 is currently being packed into a SCCM package, so I can't answer your question right now. As soon as we deployed v5.2 and there is an actual update available, I'll come back to it.

rtfm98 avatar Nov 30 '22 15:11 rtfm98

@devinbinnie Hi again, we deployed v5.2.1 and I can confirm that the "update available" popup is gone (even though v5.2.2 is available) 👍

rtfm98 avatar Dec 23 '22 07:12 rtfm98