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

[Bug]: Upgrading to 5.10.2 using EXE or in app check for update pops up a Windows installer help popup #3270

Open
6 tasks done
gdelia-pm opened this issue Dec 23, 2024 · 6 comments

Comments

@gdelia-pm
Copy link

Checks before filing an issue

Mattermost Desktop Version

5.10.2

Operating System

Windows 11

Mattermost Server Version

No response

Steps to reproduce

  1. Install 5.8
  2. Check for update in App
  3. When prompted to update and restart accept
  4. Mattermost will stop and an Windows Installer help popup will show. Your update will not proceed until you close that window
    image
  5. After closing the window the update will proceed.
    I can also reproduce this on a fresh install using just the exe.

Expected behavior

The pic in step 4 shouldn't pop up at all and the update should happen at step 3 and step 4 would open mattermost directly

Observed behavior

What should be silent installs or upgrades fully handled by mattermost get interrupted and require intervention to continue.

Log Output

[2024-12-23 16:27:31.011] [error] Logger Log level set to: info
[2024-12-23 16:27:31.129] [info]  [Config] Migrating config items successfully.
[2024-12-23 16:27:31.129] [error] Logger Log level set to: warning
[2024-12-23 16:27:31.129] [debug] [App.Config] handleConfigUpdate
[2024-12-23 16:27:31.129] [silly] [App.Config] handleConfigUpdate {
  version: 3,
  showTrayIcon: true,
  trayIconTheme: 'use_system',
  minimizeToTray: true,
  notifications: { flashWindow: 2, bounceIcon: true, bounceIconType: 'informational' },
  showUnreadBadge: true,
  useSpellChecker: true,
  enableHardwareAcceleration: true,
  autostart: true,
  hideOnStart: false,
  spellCheckerLocales: [],
  darkMode: false,
  lastActiveTeam: 0,
  downloadLocation: 'C:\\Users\\user\\Downloads',
  startInFullscreen: false,
  logLevel: 'warning',
  enableMetrics: true,
  autoCheckForUpdates: false,
  alwaysMinimize: true,
  helpLink: 'https://docs.mattermost.com/messaging/managing-desktop-app-servers.html',
  enableServerManagement: true,
  enableAutoUpdater: true,
  managedResources: [ 'trusted' ],
  allowedProtocols: [ 'mattermost', 'ftp', 'mailto', 'tel' ],
  appName: 'Mattermost'
}
[2024-12-23 16:27:31.130] [silly] [AppState] emitStatus
[2024-12-23 16:27:31.140] [debug] [App.Utils] handleUpdateMenuEvent
[2024-12-23 16:27:31.141] [debug] [DownloadsManager] hasDownloads
[2024-12-23 16:27:31.141] [debug] [ServerManager] getOrderedServers
[2024-12-23 16:27:31.144] [debug] [ServerManager] getOrderedServers
[2024-12-23 16:27:31.190] [debug] [App.Config] Config.handleUpdateTheme
[2024-12-23 16:27:31.190] [debug] [Config] set
[2024-12-23 16:27:31.190] [debug] [Config] setMultiple { darkMode: true }
[2024-12-23 16:27:31.191] [debug] [App.Config] handleDarkModeChange true
[2024-12-23 16:27:31.198] [debug] [MainWindow] Can't send dark_mode_change, will retry
[2024-12-23 16:27:31.198] [silly] [ServerDropdownView] updateDropdown
[2024-12-23 16:27:31.198] [silly] [DownloadsDropdown...] updateDownloadsDropdownMenu
[2024-12-23 16:27:31.198] [silly] [DownloadsDropdown...] updateDownloadsDropdownMenuItem {}
[2024-12-23 16:27:31.198] [silly] [DownloadsDropdown...] updateDownloadsDropdown
[2024-12-23 16:27:31.198] [silly] [DownloadsDropdown...] updateDownloadsDropdown
[2024-12-23 16:27:31.198] [verbose] [Config] Saving config data to file...
[2024-12-23 16:27:31.272] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost\\DefaultServerList',
  utf8: true
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1496530)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1498891)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
[2024-12-23 16:27:31.274] [debug] [RegistryConfig] Trying without UTF-8... {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost\\DefaultServerList'
}
[2024-12-23 16:27:31.282] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost\\DefaultServerList',
  utf8: true
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1496530)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1498891)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
[2024-12-23 16:27:31.282] [debug] [RegistryConfig] Trying without UTF-8... {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost\\DefaultServerList'
}
[2024-12-23 16:27:31.307] [info]  [App.Config] config.autostart has been configured: true
[2024-12-23 16:27:31.317] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost\\DefaultServerList',
  utf8: false
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1504188)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1506330)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
[2024-12-23 16:27:31.319] [debug] [App.Config] handleConfigUpdate
[2024-12-23 16:27:31.319] [silly] [App.Config] handleConfigUpdate {
  version: 3,
  showTrayIcon: true,
  trayIconTheme: 'use_system',
  minimizeToTray: true,
  notifications: { flashWindow: 2, bounceIcon: true, bounceIconType: 'informational' },
  showUnreadBadge: true,
  useSpellChecker: true,
  enableHardwareAcceleration: true,
  autostart: true,
  hideOnStart: false,
  spellCheckerLocales: [],
  darkMode: true,
  lastActiveTeam: 0,
  downloadLocation: 'C:\\Users\\user\\Downloads',
  startInFullscreen: false,
  logLevel: 'warning',
  enableMetrics: true,
  autoCheckForUpdates: false,
  alwaysMinimize: true,
  helpLink: 'https://docs.mattermost.com/messaging/managing-desktop-app-servers.html',
  enableServerManagement: true,
  enableAutoUpdater: true,
  managedResources: [ 'trusted' ],
  allowedProtocols: [ 'mattermost', 'ftp', 'mailto', 'tel' ],
  appName: 'Mattermost'
}
[2024-12-23 16:27:31.320] [debug] [MainWindow] Can't send reload-config, will retry
[2024-12-23 16:27:31.320] [silly] [ServerDropdownView] updateDropdown
[2024-12-23 16:27:31.320] [silly] [DownloadsDropdown...] updateDownloadsDropdownMenu
[2024-12-23 16:27:31.320] [silly] [DownloadsDropdown...] updateDownloadsDropdownMenuItem {}
[2024-12-23 16:27:31.320] [silly] [DownloadsDropdown...] updateDownloadsDropdown
[2024-12-23 16:27:31.320] [silly] [DownloadsDropdown...] updateDownloadsDropdown
[2024-12-23 16:27:31.320] [silly] [AppState] emitStatus
[2024-12-23 16:27:31.320] [silly] [ServerDropdownView] updateMentions { expired: {}, mentions: {}, unreads: {} }
[2024-12-23 16:27:31.321] [silly] [ServerDropdownView] updateDropdown
[2024-12-23 16:27:31.324] [debug] [App.Intercom] handleMainWindowIsShown {
  showWelcomeScreen: '[function] ()=>!(Boolean(!1)||h.A.hasServers())',
  showNewServerModal: '[function] ()=>!h.A.hasServers()',
  mainWindow: false
}
[2024-12-23 16:27:31.325] [debug] [App.Utils] handleUpdateMenuEvent
[2024-12-23 16:27:31.325] [debug] [DownloadsManager] hasDownloads
[2024-12-23 16:27:31.325] [debug] [ServerManager] getOrderedServers
[2024-12-23 16:27:31.327] [debug] [ServerManager] getOrderedServers
[2024-12-23 16:27:31.337] [silly] [ServerDropdownView] updateDropdown
[2024-12-23 16:27:31.337] [silly] [DownloadsDropdown...] updateDownloadsDropdownMenu
[2024-12-23 16:27:31.338] [silly] [DownloadsDropdown...] updateDownloadsDropdownMenuItem {}
[2024-12-23 16:27:31.338] [silly] [DownloadsDropdown...] updateDownloadsDropdown
[2024-12-23 16:27:31.338] [silly] [DownloadsDropdown...] updateDownloadsDropdown
[2024-12-23 16:27:31.339] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost\\DefaultServerList',
  utf8: false
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1504188)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1506330)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
[2024-12-23 16:27:31.356] [info]  [App.Config] config.autostart has been configured: true
[2024-12-23 16:27:31.391] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableServerManagement',
  utf8: true
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1496530)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1498891)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
[2024-12-23 16:27:31.391] [debug] [RegistryConfig] Trying without UTF-8... {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableServerManagement'
}
[2024-12-23 16:27:31.398] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableServerManagement',
  utf8: true
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1496530)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1498891)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
[2024-12-23 16:27:31.398] [debug] [RegistryConfig] Trying without UTF-8... {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableServerManagement'
}
[2024-12-23 16:27:31.416] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableServerManagement',
  utf8: false
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1504188)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1506330)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
[2024-12-23 16:27:31.423] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableServerManagement',
  utf8: false
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1504188)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1506330)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
[2024-12-23 16:27:31.465] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableAutoUpdater',
  utf8: true
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1496530)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1498891)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
[2024-12-23 16:27:31.465] [debug] [RegistryConfig] Trying without UTF-8... {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableAutoUpdater'
}
[2024-12-23 16:27:31.468] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableAutoUpdater',
  utf8: true
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1496530)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1498891)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
[2024-12-23 16:27:31.469] [debug] [RegistryConfig] Trying without UTF-8... {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableAutoUpdater'
}
[2024-12-23 16:27:31.487] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKLM',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableAutoUpdater',
  utf8: false
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1504188)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1506330)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
[2024-12-23 16:27:31.490] [debug] [RegistryConfig] There was an error accessing the registry for {
  hive: 'HKCU',
  key: '\\Software\\Policies\\Mattermost',
  name: 'EnableAutoUpdater',
  utf8: false
} k: QUERY command exited with code 1:
ERROR: The system was unable to find the specified registry key or value.
    at A (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1504188)
    at ChildProcess.<anonymous> (C:\Users\gdelia\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1506330)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
[2024-12-23 16:27:31.490] [debug] [Config] loadRegistry { registryData: { servers: [] } }
[2024-12-23 16:27:31.491] [debug] [App.Config] handleConfigUpdate
[2024-12-23 16:27:31.492] [silly] [App.Config] handleConfigUpdate {
  version: 3,
  showTrayIcon: true,
  trayIconTheme: 'use_system',
  minimizeToTray: true,
  notifications: { flashWindow: 2, bounceIcon: true, bounceIconType: 'informational' },
  showUnreadBadge: true,
  useSpellChecker: true,
  enableHardwareAcceleration: true,
  autostart: true,
  hideOnStart: false,
  spellCheckerLocales: [],
  darkMode: true,
  lastActiveTeam: 0,
  downloadLocation: 'C:\\Users\\user\\Downloads',
  startInFullscreen: false,
  logLevel: 'warning',
  enableMetrics: true,
  autoCheckForUpdates: false,
  alwaysMinimize: true,
  helpLink: 'https://do

Additional Information

No response

@devinbinnie
Copy link
Member

@gdelia-pm I'm unable to reproduce this. I do see a quick flashing window that might the same as the one you're seeing, but it is immediately dismissed for me. I'm also on Windows 11. Is this consistently reproducible for you, ie. are you able to reinstall v5.8 and try upgrading again, and see if it happens consistently?

@gdelia-pm
Copy link
Author

Yup it's happening consistently. Just tested on a test vm (newly deployed, pretty much nothing on it. If I push 5.8 to it and our config, then in app do the check for updates > Download updates > restart and update I see that window pop up and the install doesn't proceed until I close the window.
One note that may be abnormal, we install the app as the user without admin rights.

@gdelia-pm
Copy link
Author

I think i can see a potential cause for this. With procmon running I see an attempt to run msixec /x and it looks like the GUID is being found programmatically. My org has constrained language mode enforced for powershell and it looks like there's an a attempt to use objects that are blocked in constrained language mode to determine what guid to uninstall.

Can you try to reproduce with constrained language mode enabled and as a non admin user?

https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/

Parent PID: 9808, Command line: "C:\Windows\system32\msiexec.exe" /x New-Object : Cannot create type. Only core types are supported in this language mode.
At line:1 char:14
+ $Installer = New-Object -ComObject WindowsInstaller.Installer; $MMPro ...
+              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (:) [New-Object], PSNotSupportedException
    + FullyQualifiedErrorId : CannotCreateComTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
 
You cannot call a method on a null-valued expression.
At line:1 char:64
+ ... .Installer; $MMProduct = $Installer.ProductsEx('', '', 7) | Where-Obj ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
 
 /qn, 

@devinbinnie
Copy link
Member

Okay so I wasn't able to reproduce your exact issue, but I got something arguably worse. In my case the application kept saying that Mattermost was open and I had to close it to continue the update. Of course MM was closed, and the update failed.

Seems as though the case for constrained language might be something we have to work around a bit. I'll make a ticket to try and look at this.

However, given the environment you're in I'd recommended having your system administrator install Mattermost for you via the MSI and have them update for you as needed.

@gdelia-pm
Copy link
Author

Lol I'm the admin 🤣

It's fine we'll just stick on 5.8 until release 5.11 is ready. The reason we're using user based installs because when we tried to swap to a machine install with the msi and setting things via the GPO config we found that notifications required manual approval from each user which wasn't tenable. We've been told that would be fixed with the target feb release of 5.11, so we can just wait and test that out.

@devinbinnie
Copy link
Member

Lol I'm the admin 🤣

It's fine we'll just stick on 5.8 until release 5.11 is ready. The reason we're using user based installs because when we tried to swap to a machine install with the msi and setting things via the GPO config we found that notifications required manual approval from each user which wasn't tenable. We've been told that would be fixed with the target feb release of 5.11, so we can just wait and test that out.

Lol for sure, we should have that out for v5.11 so stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants