desktop: [Bug]: Downloading an SVG leads to error "Failed to get thumbnail from local thumbnail cache reference"
Checks before filing an issue
- This issue doesn’t reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
- I have checked the issue tracker and have not found an issue that matches the one I’m filing.
- This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
- This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.com/suggestions/.
- This issue reproduces on the most recent stable version, or the most recent prerelease version of the Mattermost Desktop App.
- I have read the contribution guidelines.
Mattermost Desktop Version
5.9.0
Operating System
Windows 11 x64
Mattermost Server Version
EE 9.5.6
Steps to reproduce
- Navigate to a chat with SVG images attached
- Click on the
Downloadicon of that SVG image
Expected behavior
- SVG is successfully downloaded
- No error message is shown and Mattermost does not need to restart
Observed behavior
- SVG is successfully downloaded (yes, actual download works)
- An error message is shown (see below) and Mattermost has to be restarted
Log Output
Application: Mattermost 5.9.0
Platform: Windows_NT 10.0.22631 x64
Error: Failed to get thumbnail from local thumbnail cache reference
at C.formatDownloadItem (C:\Users\martin\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:258206)
at C.upsertFileToDownloads (C:\Users\martin\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:255614)
at C.doneEventController (C:\Users\martin\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:256970)
at DownloadItem.<anonymous> (C:\Users\martin\AppData\Local\Programs\mattermost-desktop\resources\app.asar\index.js:2:254776)
at Object.onceWrapper (node:events:634:26)
at DownloadItem.emit (node:events:519:28)
Additional Information
- Tested on the web interface (current Firefox) and the issue does not show up there.
- Downloading a different file type (JSON) works, no issues.
- Downloading an image (PNG) works as well. But here the UX is different, as I first have to click on the image to show it and, when it’s shown, I can click the download button shown at the top-right.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 22 (6 by maintainers)
My Desktop Mattermost crash too when I try to download a png or jpeg file but the error is different, I don’t know if this is related to the same issue.
I’m on Manjaro with kernel 6.10 Mattermost 5.9.0 Desktop
@Annavar-satish that is a different issue and got solved via #3129, as stated by @devinbinnie before. That fix is not released yet though (we are still at 5.9.0, 5.9.1 and 5.10.0 should contain the fix).
FWIW this seems to be an error internal to Windows, that seems to be hard crashing: https://github.com/electron/electron/blob/main/shell/common/api/electron_api_native_image_win.cc#L69
So just catching it seems to be the best option.
Well I tested that SVG and it doesn’t seem to be that particular file, so I’m guessing it is some strange issue in the Chromium image cache…we can probably just add a crash catch there and just not load a thumbnail if it fails.
Ticket here: https://mattermost.atlassian.net/browse/MM-61919
I am Facing the same issue while downloading the jpg,svg etc., Mattermost Desktop Version 5.9.0
Operating System x86_64 GNU/Linux
Mattermost Server Version CE 9.11.1
Electron Version 31.6.0-2
Looks like Issues with the electron version