[Bug]: Update fails on directories with non-ascii characters
Checks before filing an issue
- [x] This issue doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
- [x] I have checked the issue tracker and have not found an issue that matches the one I'm filing. This should include closed issues.
- [x] This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
- [x] This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.com/suggestions/.
- [x] This issue reproduces on the most recent stable version, or the most recent prerelease version of the Mattermost Desktop App.
- [x] I have read the contribution guidelines.
Mattermost Desktop Version
5.10.2
Operating System
Windows 10 x64
Mattermost Server Version
EE 9.11.5
Steps to reproduce
- Have a user directory containing non-ascii characters, p. ex. c:\Users\Sören Bernstein\
- Accept in-app Update message
- Wait for it to complete download and try to update
- Get Error-Message
- App closes / crashes
Expected behavior
Finding the correctly downloaded file and update the app
Observed behavior
Got Error-Message, App closes / crashes afterwards. On restart, no update was performed.
Log Output
[2025-02-17 08:12:21.908] [error] Logger Log level set to: info
[2025-02-17 08:12:22.067] [error] Logger Log level set to: error
[2025-02-17 08:25:40.615] [error] [UpdateManager] Cannot download differentially, fallback to full download: Error: sha512 checksum mismatch, expected 76bH/sPjBguqdh07fJ2khBRw4gO1Utunrp2mKjNr2JDRz0RHLMc8QIjborhDp7sFBvIPwXA2NUh1RnURxTxqSw==, got WDXss7JCAitCk4zEigrtT7ILVqevrfYo1bRl9ueSKO7zJ6OlMvncz9EP8alu/PJ4/KiAmZ+5eaNZlMCCjQ8Cxw==
at t.newError (C:\Users\Sören Bernstein\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:948842)
at w.validate (C:\Users\Sören Bernstein\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:955388)
at WriteStream.<anonymous> (C:\Users\Sören Bernstein\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1023557)
at WriteStream.emit (node:events:519:28)
at emitCloseNT (node:internal/streams/destroy:147:10)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
[2025-02-17 08:26:04.357] [error] [UpdateManager] Error: Error: LiteralPath of C:\Users\S�ren Bernstein\AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-5.11.0-win.exe is different than C:\Users\Sören Bernstein\AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-5.11.0-win.exe
at C:\Users\Sören Bernstein\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1051190
at ChildProcess.exithandler (node:child_process:414:7)
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)
[2025-02-17 08:26:04.358] [error] [UpdateManager] There was an error while trying to update Error: LiteralPath of C:\Users\S�ren Bernstein\AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-5.11.0-win.exe is different than C:\Users\Sören Bernstein\AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-5.11.0-win.exe
at C:\Users\Sören Bernstein\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1051190
at ChildProcess.exithandler (node:child_process:414:7)
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)
Additional Information
Update worked a few versions ago flawlessly. Seems to be some kind of encoding error.
Duplicated by #3380
Same issue with the Ukrainian language folder. Manual downloading from GitHub and manual installation helped to update a desktop client.
uncaughtException-1757530518295.txt Application: Mattermost 5.13.0 Platform: Windows_NT 10.0.26100 x64 Error: LiteralPath of C:\Users\ \AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-5.13.1-win.exe is different than C:\Users\Богдан\AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-5.13.1-win.exe at C:\Users\Богдан\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:599918 at ChildProcess.exithandler (node:child_process:408:7) at ChildProcess.emit (node:events:518:28) at maybeClose (node:internal/child_process:1101:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5)
I have the same issue trying to update to 6.0.1 from the in-application updater.
My username has an "ø" in it, and that is converted to an "o" in the path that is compared.
Application: Mattermost 5.12.1
Platform: Windows_NT 10.0.26100 x64
Error: LiteralPath of C:\Users\MyUserWithO\AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-6.0.1-win.exe is different than C:\Users\MyUserWithØ\AppData\Local\mattermost-desktop-updater\pending\temp-mattermost-desktop-setup-6.0.1-win.exe
at C:\Users\MyUserWithØ\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:1134445
at ChildProcess.exithandler (node:child_process:407:7)
at ChildProcess.emit (node:events:518:28)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)