mattermost / desktop

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

[Bug]: HDR video playback breaking electron renderer on Darwin #3146

Closed antonbuks closed 4 weeks ago

antonbuks commented 4 weeks ago

Checks before filing an issue

Mattermost Desktop Version

5.9.0

Operating System

macOS Sonoma 14.4

Mattermost Server Version

community

Steps to reproduce

upload any hdr mov video and try to preview

Expected behavior

video plays like in web

Observed behavior

renderer seems to be having issues and shows and blank page

Log Output

[2024-03-11 15:58:45.662] [error] Logger Log level set to: info
[2024-03-11 15:58:45.745] [warn]  [Config] Failed to load configuration file from the filesystem. Using defaults.
[2024-03-11 15:58:45.745] [info]  [Config] Migrating config items successfully.
[2024-03-11 15:58:45.751] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-03-11 15:58:45.809] [info]  [App.Utils] MAS: No files to migrate, skipping
[2024-03-11 15:58:45.821] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-03-11 15:58:45.822] [error] [MainWindow] Error: ENOENT: no such file or directory, open '/Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data/Library/Application Support/Mattermost/bounds-info.json'
    at Object.openSync (node:fs:603:3)
    at Object.func [as openSync] (node:electron/js2c/asar_bundle:2:2131)
    at Object.readFileSync (node:fs:471:35)
    at Object.readFileSync (node:electron/js2c/asar_bundle:2:9462)
    at MainWindow.getSavedWindowState (/Applications/Mattermost.app/Contents/Resources/app.asar/index.js:55606:51)
    at MainWindow.init (/Applications/Mattermost.app/Contents/Resources/app.asar/index.js:55409:36)
    at MainWindow.show (/Applications/Mattermost.app/Contents/Resources/app.asar/index.js:55533:14)
    at initializeAfterAppReady (/Applications/Mattermost.app/Contents/Resources/app.asar/index.js:384:23)
    at initialize (/Applications/Mattermost.app/Contents/Resources/app.asar/index.js:146:9)
[2024-03-11 15:58:45.846] [info]  [ServerDropdownView] init
[2024-03-11 15:58:45.852] [warn]  [i18nManager] Failed to set new language en-GB
[2024-03-11 15:58:45.852] [warn]  [i18nManager] Failed to set new language CH
[2024-03-11 15:58:45.903] [error] [App.Utils] clearAppCache TypeError: Object has been destroyed
[2024-03-11 15:58:46.156] [info]  [ModalView] [welcomeScreen] preloading with /Applications/Mattermost.app/Contents/Resources/app.asar/desktopAPI.js
[2024-03-11 16:00:20.045] [error] Logger Log level set to: info
[2024-03-11 16:00:20.110] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-03-11 16:00:20.170] [info]  [App.Utils] MAS: No files to migrate, skipping
[2024-03-11 16:00:20.194] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-03-11 16:00:20.240] [info]  [ServerDropdownView] init
[2024-03-11 16:00:20.247] [warn]  [i18nManager] Failed to set new language en-GB
[2024-03-11 16:00:20.247] [warn]  [i18nManager] Failed to set new language CH
[2024-03-12 08:47:56.700] [error] Logger Log level set to: info
[2024-03-12 08:47:56.795] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-03-12 08:47:56.871] [info]  [App.Utils] MAS: No files to migrate, skipping
[2024-03-12 08:47:56.917] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-03-12 08:47:56.959] [info]  [ServerDropdownView] init
[2024-03-12 08:47:56.966] [warn]  [i18nManager] Failed to set new language en-GB
[2024-03-12 08:47:56.966] [warn]  [i18nManager] Failed to set new language CH
[2024-03-15 14:54:19.458] [error] Logger Log level set to: info
[2024-03-15 14:54:19.549] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-03-15 14:54:19.606] [info]  [App.Utils] MAS: No files to migrate, skipping
[2024-03-15 14:54:19.618] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-03-15 14:54:19.649] [info]  [ServerDropdownView] init
[2024-03-15 14:54:19.657] [warn]  [i18nManager] Failed to set new language en-GB
[2024-03-15 14:54:19.657] [warn]  [i18nManager] Failed to set new language CH
[2024-05-01 14:32:12.935] [error] Logger Log level set to: info
[2024-05-01 14:32:13.023] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-05-01 14:32:13.080] [info]  [App.Utils] MAS: No files to migrate, skipping
[2024-05-01 14:32:13.091] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-05-01 14:32:13.112] [info]  [ServerDropdownView] init
[2024-05-01 14:32:13.121] [warn]  [i18nManager] Failed to set new language en-GB
[2024-05-01 14:32:13.121] [warn]  [i18nManager] Failed to set new language CH
[2024-05-01 14:32:13.155] [info]  [ServerDropdownView] init
[2024-05-01 14:32:13.419] [error] [App.Utils] clearAppCache TypeError: Object has been destroyed
[2024-07-04 11:13:45.110] [error] Logger Log level set to: info
[2024-07-04 11:13:45.197] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-07-04 11:13:47.191] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-07-04 11:13:47.219] [info]  [ServerDropdownView] init
[2024-07-04 11:13:47.260] [warn]  [i18nManager] Failed to set new language en-GB
[2024-07-04 11:13:47.260] [warn]  [i18nManager] Failed to set new language CH
[2024-07-04 11:13:47.330] [error] [App.Utils] clearAppCache TypeError: Object has been destroyed
[2024-07-04 11:13:48.910] [error] [WebContentsEventM...] [community] [TAB_MESSAGING] [renderer] Uncaught (in promise) Error: Not authorized

[2024-07-04 15:02:31.818] [error] [WebContentsEventM...] [community] [TAB_MESSAGING] [renderer] Uncaught (in promise) Error: No Permissions to Channel

[2024-07-04 20:12:43.231] [error] [WebContentsEventM...] [community] [TAB_MESSAGING] [renderer] com.mattermost.calls: TypeError: Failed to fetch
[2024-07-04 20:12:43.275] [error] [WebContentsEventM...] [community] [TAB_MESSAGING] [renderer] com.mattermost.calls: TypeError: Failed to fetch
[2024-07-04 20:12:43.280] [error] [WebContentsEventM...] [community] [TAB_MESSAGING] [renderer] Uncaught (in promise) TypeError: Failed to fetch
[2024-09-19 12:30:41.728] [error] Logger Log level set to: info
[2024-09-19 12:30:41.821] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-09-19 12:30:41.873] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-09-19 12:30:41.900] [info]  [ServerDropdownView] init
[2024-09-19 12:30:41.938] [warn]  [i18nManager] Failed to set new language en-GB
[2024-09-19 12:30:41.938] [warn]  [i18nManager] Failed to set new language CH
[2024-09-19 12:30:43.443] [error] [WebContentsEventM...] [community] [TAB_MESSAGING] [renderer] Uncaught (in promise) Error: Not authorized

[2024-09-19 13:35:31.982] [error] Logger Log level set to: info
[2024-09-19 13:35:32.070] [warn]  [App.Initialize] Current working directory is /Users/antonbuksa/Library/Containers/Mattermost.Desktop/Data, changing into /Applications/Mattermost.app/Contents/MacOS
[2024-09-19 13:35:32.213] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-09-19 13:35:32.242] [info]  [ServerDropdownView] init
[2024-09-19 13:35:32.300] [warn]  [i18nManager] Failed to set new language en-GB
[2024-09-19 13:35:32.301] [warn]  [i18nManager] Failed to set new language CH
[2024-09-19 13:35:32.561] [error] [App.Utils] clearAppCache TypeError: Object has been destroyed

Additional Information

Here is an example of the issue on the latest mattermost app store release using a small 2sec quicktime mov video I shot on iphone and airdropped to my mac:

Kapture 2024-09-19 at 14 10 00

Tested on multiple quicktime videos from different devices and the only similarity is they are all HDR enabled.

The video in react context is actually fully functional and will play (you can hear sound) if you click on the grey area where it's supposed to be and hitting ESC will actually close this full grey overlay and the app is usable again. The preview can be inspected via the web dev tool and turning the display from block to none will also "unbreak" the app, I think indicating that there is an issue with the electron renderer when the video is in the dom

I suspect it's maybe something to do with chromium or streaming or both. Also can't seem to reproduce while running electron locally. I also tested on a windows device using the same video and was not able to reproduce but I don't know if this has something to do with having an HDR enabled display since my windows does not.

devinbinnie commented 4 weeks ago

@antonbuks This is more than likely an Electron issue, not a Mattermost Desktop App issue. Can you try going through their bug process? If it doesn't reproduce using a fiddle, then let us know.

antonbuks commented 4 weeks ago

@devinbinnie I will try yeah but I am a bit short on time atm not sure when I can get to it. If you got some extra time you can open it and I could help out with info, should be a straight forward repro

devinbinnie commented 4 weeks ago

@antonbuks I am quite busy myself so I don't have time either. Sorry. Going to close this one and feel free to open one with Electron when you have time.

antonbuks commented 4 weeks ago

sounds good