File open instead of download, Mac client crashes

We recently made the switch from Slack to Mattermost Team Edition and so far things are working fine.

There are two issues though, which I’d like to address:

  • One of our users is on a Mac and is experiencing regular Mattermost client crashes whenever he uploads a document via the Mattermost client. Windows and Linux clients are fine.
  • When a file is shared, the only option is to download, followed by opening a file explorer, finding the file and opening it. Which is viewed by my users to be unnecessary complicated. Is there a way to offer a open dialog? In the same way a browser would show open or download whenever a file is downloaded from a web page? I checked if this feature is maybe blocked by a setting but didn’t find anything.

Mattermost Version: 5.19.0
Database Schema Version: 5.19.0
Database: postgres

Is this happening on browser or the desktop app?

Do you see any errors in the Mattermost logs or the console?

Which Mac version is the user on?

Thanks for getting back Amy.

Desktop app, need to check on the Mac version.
Had a look at the logs just now, greping for the Mac users id:

grep 8dswyysofib77ji8ehm6x35cea /opt/mattermost/logs/mattermost.log
{"level":"error","ts":1579770356.6272483,"caller":"mlog/log.go:174","msg":"Unable to upload file(s). Error reading or parsing request data.","path":"/api/v4/files","request_id":"wwm6g4jnjt8w8bdmpwrmye6r6o","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"POST","err_where":"uploadFileMultipartLegacy","http_code":500,"err_details":"client disconnected"}
{"level":"error","ts":1580314194.8105474,"caller":"mlog/log.go:174","msg":"Unable to upload file(s). Error reading or parsing request data.","path":"/api/v4/files","request_id":"1hjqeqrftjrc7f4z6xdtx4ujtr","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"POST","err_where":"uploadFileMultipartLegacy","http_code":500,"err_details":"client disconnected"}
{"level":"error","ts":1581563833.253907,"caller":"mlog/log.go:174","msg":"Failed to upgrade websocket connection","path":"/api/v4/websocket","request_id":"ao4hw9eja7dt9rmzg86q4pa9yw","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"GET","err_where":"connect","http_code":500,"err_details":""}
{"level":"error","ts":1581936358.5947247,"caller":"mlog/log.go:174","msg":"Failed to upgrade websocket connection","path":"/api/v4/websocket","request_id":"ywfnnc8xfid89qznyajymtrqfr","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"GET","err_where":"connect","http_code":500,"err_details":""}
{"level":"error","ts":1582083118.1039333,"caller":"mlog/log.go:174","msg":"Failed to upgrade websocket connection","path":"/api/v4/websocket","request_id":"5tz8oho7opdbmemzgqjc1stska","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"GET","err_where":"connect","http_code":500,"err_details":""}
{"level":"error","ts":1582168630.290813,"caller":"mlog/log.go:174","msg":"Failed to upgrade websocket connection","path":"/api/v4/websocket","request_id":"7qzk66qjbty39qdnf63htimdzy","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"GET","err_where":"connect","http_code":500,"err_details":""}
{"level":"error","ts":1582218686.6295214,"caller":"mlog/log.go:174","msg":"Failed to upgrade websocket connection","path":"/api/v4/websocket","request_id":"sd8tqsjk9pgr8ehs3i7sua36zr","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"GET","err_where":"connect","http_code":500,"err_details":""}
{"level":"error","ts":1583266462.5474863,"caller":"mlog/log.go:174","msg":"Encountered an error retrieving the status","path":"/api/v4/users/status/ids","request_id":"16nmw53rmpdoufh37mwocbknia","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"POST","err_where":"SqlStatusStore.GetByIds","http_code":500,"err_details":"dial tcp [::1]:5432: connect: connection refused"}
{"level":"error","ts":1583266522.537645,"caller":"mlog/log.go:174","msg":"Encountered an error retrieving the status","path":"/api/v4/users/status/ids","request_id":"opzdojpgaid5j88nha6f76b3hr","ip_addr":"","user_id":"8dswyysofib77ji8ehm6x35cea","method":"POST","err_where":"SqlStatusStore.GetByIds","http_code":500,"err_details":"dial tcp [::1]:5432: connect: connection refused"}

Does this provide a hint?

Which desktop app version is the user on?

Hello, @tomz

With reference to the question you have here:

What I understand from your suggestion here is to have some sort of Downloads status bar / manager to allow the users open the downloaded file directly from Mattermost. Is that right?

Perhaps you can also share some screen shots from your end so I can understand this better. Thanks.

Even simpler, that I am thinking of is to follow the way e.g. Firefox handle downloads:
When I press download the file gets saved in my OS tmp directory and the dialog below is shown:

I can now choose download, which will place the file in my default OS download folder, or “open with” which will let the OS deal with the file and pass it on to whatever local application is assigned to the file type in question.
The benefit of open is that I don’t need to manually switch applications and will get to see the file right away. If I don’t need it afterwards I close the app and the download in tmp will disappear whenever the OS cleans up the temp folder.

Chromium handles this slightly different, in that it doesn’t ask what you want to do with the document, but simply places it in the bottom left corner from where one can conveniently pass it over to the OS which will then open the associated application in the same way as in the Firefox example.

Had to split the message because apparently I am not allowed to post more than one picture?

Here’s what I got from my user:

It is the Mattermost client that crashes. My Mac is a Macbook Air 2018. Running MacOS Catalina
It only crashes under the specific situation of uploading documents.
Doesn’t happen all the time, just occasionally
Client version is 4.3.2

Would he be open to updating to desktop app v4.4.0 to see if the issue continues?

Absolutely, we ran the upgrade this morning and I asked him to alert me if the issue shows again so I can get on top the logs.
I’ll leave this thread open for a few more days and if things are quiet will mark your response as solution.
Thanks for helping me along!

Hello, @tomz

Since the download feature you are suggesting is not available on Mattermost by default, may I know if you are open to share this idea to the public as a suggestion in Mattermost Uservoice to allow other users to cast their votes and share their thoughts on this?

Interesting idea nevertheless. It saves the trouble of searching for the file in Finder / Windows explorer. :+1:

Hi Ahmad, just wanted to add my suggestion when I noticed this request seems to be sitting there for almost 3 years already? Check the comments as well.

Wanted to leave a comment nevertheless but couldn’t save it because it kept on complaining about the terms and services not being checked.

Hello, @tomz

I just posted a comment on the same suggestion but did not face any issues. May I know if you were logged in when you were posting the comment?

If not, can you sign up for one and confirm if you still observe the same problem? While I can understand that the suggestion has been open for quite a while, it means that there is not much public interest on this yet but your vote counts!

I can’t log on either. The moment I press the Post comment or sign up button the “terms” error shows no matter if the tick box is set or not.

I am using Firefox on Linux in case it matters…

Hi, @tomz

Just tested this on my end on Ubuntu 18.04.3 and Firefox 74.0 and I did not face any problem.

Can you try it out using other accounts? What about Private window?