mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.03k stars 829 forks source link

[Bug]: since v5.9.0 - MainWindow failed to load renderer/index.html #3218

Open iva-5-middleware opened 22 hours ago

iva-5-middleware commented 22 hours ago

Checks before filing an issue

Mattermost Desktop Version

5.9.0

Operating System

Windows 10 x64

Mattermost Server Version

9.11.4

Steps to reproduce

Expected behavior

Observed behavior

Log Output

# Currently, we have about 5-10 people who experience this problem
# The following log entry occurs in every logfile:

[2024-11-19 10:01:36.737] [error] [MainWindow] failed to load Error: ERR_FAILED (-2) loading 'mattermost-desktop://renderer/index.html'
    at rejectAndCleanup (node:electron/js2c/browser_init:2:78713)
    at finishListener (node:electron/js2c/browser_init:2:78875)
    at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:79262)
    at WebContents.emit (node:events:519:28)
[2024-11-19 10:01:36.964] [error] [MainWindow] failed to load Error: ERR_FAILED (-2) loading 'mattermost-desktop://renderer/index.html'
    at rejectAndCleanup (node:electron/js2c/browser_init:2:78713)
    at finishListener (node:electron/js2c/browser_init:2:78875)
    at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:79262)
    at WebContents.emit (node:events:519:28)

# I found the mentioned URL in this file only: https://github.com/mattermost/desktop/blob/fad05fd774b7195e006477634516e0d664598ca8/src/main/windows/mainWindow.ts#L141
# The catch statement in L143 would fit to the error message above. But why does it fail to load the index.html?
# git blame shows that the localURL line was last changed on 2024-07-18. We directly updated from 5.8.0 (start of rollout 2024-07-05) to 5.9.0 (start of rollout 2024-11-19, because of some troubles). We had to skip 5.8.1, because we had many problems with this version and in the meantime, 5.9.0 had been released, which also caused many problems at first, but together with the software distribution team we were able to fix them. The mentioned problem here didn't occur in our tests right before the rollout, so I don't understand what is happening here.

Additional Information

No response

devinbinnie commented 15 hours ago

@iva-5-middleware Does the app work if you install it manually from the GitHub release? Sounds like there are missing files from the deployment. FWIW we are investigating issues with the MSI and SCCM right now.

iva-5-middleware commented 12 hours ago

@devinbinnie Thanks for your fast reply! Unfortunately, we are not allowed to install .msi or .exe files ourself, sorry. I read a few jira tickets and community entries regarding the problems with sccm/distribution systems, but I'm wondering why the most of our users don't have this problem after the update.

I checked the install log for v5.9.0 on my computer and can confirm the error messages mentioned in https://mattermost.atlassian.net/browse/MM-60416 :

Action start 09:11:06: InstallInitialize.
MSI (s) (D8:5C) [09:11:06:235]: Doing action: removeExeInstaller
MSI (s) (D8:5C) [09:11:06:235]: Note: 1: 2205 2:  3: ActionText 
Action ended 09:11:06: InstallInitialize. Return value 1.
MSI (s) (D8:5C) [09:11:06:237]: Note: 1: 1721 2: removeExeInstaller 3: C:\Program Files\mattermost-desktop\ 4: C:\Program Files\mattermost-desktop\Uninstall Mattermost.exe /S 
MSI (s) (D8:5C) [09:11:06:237]: Note: 1: 2205 2:  3: Error 
MSI (s) (D8:5C) [09:11:06:237]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1721 
Action start 09:11:06: removeExeInstaller.
Info 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: removeExeInstaller, location: C:\Program Files\mattermost-desktop\, command: C:\Program Files\mattermost-desktop\Uninstall Mattermost.exe /S 
MSI (s) (D8:5C) [09:11:06:237]: Doing action: WixCloseApplicationsDeferred
MSI (s) (D8:5C) [09:11:06:237]: Note: 1: 2205 2:  3: ActionText 
Action ended 09:11:06: removeExeInstaller. Return value 1.

But I didn't have the mentioned problems after the update while others did.

Sometimes, it's sufficient to just close and restart the app. Sometimes, a windows reboot is required. But sometimes, even that doesn't fix the problem. Next, I will try to move the %appdata%\Mattermost folder away. And if that doesn't help, maybe a complete reinstall of the app via SCCM will? We will see.

Cheers.

devinbinnie commented 11 hours ago

So the problem is happening intermittently? Sounds like you might have an issue with disk access then. If the app is able to load probably sometimes but not other times, there's likely a hardware fault at play. There could be some issue with configuration as well, I'd work with your system admin to see if either of those two issues could be causing this.