matterhorn-chat / matterhorn

A feature-rich Unix terminal client for the Mattermost chat system
BSD 3-Clause "New" or "Revised" License
1.03k stars 75 forks source link

Issues sending attachments #773

Open THinnerichs opened 2 years ago

THinnerichs commented 2 years ago

Dear Matterhorn team, I couldn't find anything in the manuals and docs this time, too, so any information is highly welcome: While using Matterhorn, I am struggling to send attachments. I am able to select the attachment and it displays 1 attachment ... above the message box. However, it does not send the attachment, but just the text when pressing Enter/return afterwards. Am I missing some configuration again?

Thank you very much for your help!

jtdaugherty commented 2 years ago

Hi @THinnerichs - which version of Matterhorn are you using? And how large is the attachment you are trying to send?

THinnerichs commented 2 years ago

Hey @jtdaugherty, thank you very much for the quick response! Attachments tried were ranging from 1kb to 2mb, nothing fancy. Matterhorn version:

matterhorn 50200.17.0 (develop@8661bff)
 using mattermost-api 50200.13.0 (HEAD@273adac)
jtdaugherty commented 2 years ago

@THinnerichs when you attempt to send the message, does it contain any text at all? Or just the attachment?

THinnerichs commented 2 years ago

Sorry, for the delayed response, @jtdaugherty . I tried a reinstallation, went through my configs, and re-skimmed the docs in the mean time. Nothing new.

I tried both, but both fail. If I send attachment + text, only the text is sent.

jtdaugherty commented 2 years ago

Hm, that's really strange. Can you tell me which version of Mattermost the server is running? (This can be obtained from the official web client for that server.)

jtdaugherty commented 1 year ago

@THinnerichs it's been a while and I wanted to follow up again. Any chance you could find out what version of the server you were using when this happened? If we can't get any clues about this, I'd like to close it and re-open later if it happens again. Thanks!

THinnerichs commented 1 year ago

Hey @jtdaugherty, Sorry again for the delayed reply. Server mattermost version is 7.2.0-1, for one of the servers, but it happens on 3 different ones. I thus think its a client-side, i.e. Matterhorn, issue. I didn't mention earlier that I am using Arch myself, which apparently does not seem to be officially supported by Matterhorn. Still the same issue. :)

jtdaugherty commented 1 year ago

No problem at all. Thanks for letting me know. I asked about the server version because it helps us track down whether Matterhorn has an incompatibility that we don't know about, not because I'm eager to blame the server. :) If you could get the versions of the other servers where you experienced this, that would also be very helpful.

nlhomme commented 1 year ago

Hello @jtdaugherty,

I wanted to let you know that I encounter the same issue with mattermost server 7.9.1 and matterhorn 50200.17.0 with iTerm2 on macOS 13.3 :)

Regards

jtdaugherty commented 1 year ago

@nlhomme I know it has been a while, but I'm wondering if you could provide more information. I have not been able to reproduce this problem. Do you get any error messages when the attachment fails to send? Or do you just see a text-only post with no attachments?

A request for you: could you run matterhorn with -l log.txt, send a message with an attachment, and then post the log file here? That might help us spot what is going on under the hood.

nlhomme commented 1 year ago

Hello,

Here is the log file: log.txt

Here is the file I tried to send: bob-kelso

The file is located at /Users/nilho/Pictures/Memes/bob-kelso.jpg:

ls -lh /Users/nilho/Pictures/Memes/bob-kelso.jpg
-rwxrw-r--@ 1 nilho  staff   8,6K 15 sep  2020 /Users/nilho/Pictures/Memes/bob-kelso.jpg

I used this method to send the file: https://github.com/matterhorn-chat/matterhorn/blob/master/docs/UserGuide.md?plain=1#L187

jtdaugherty commented 1 year ago

Thanks, @nlhomme. I looked at the log file you posted, but judging by that, no messages were posted at all in the session that generated that log file. For each posted message we should see a line containing this:

[LogAPI] [*] Function: submitRequest, event: HttpRequest POST "/posts" Nothing
nlhomme commented 1 year ago

I swear I did the actions :p

jtdaugherty commented 1 year ago

I don't mean to say that you didn't - only that the log doesn't provide the evidence. I was really confused by that but wasn't sure what to do. You could attempt another round of logging while posting an attachment and check the log for the lines I mentioned, I suppose.