yuya373 / emacs-slack

slack client for emacs
1.11k stars 117 forks source link

Messages from Desktop and Browser Slack Appear Blank in Emacs #484

Closed jasonmj closed 4 years ago

jasonmj commented 4 years ago

Describe the bug The latest update to Slack has caused messages in Emacs Slack to appear blank. The username is shown, but the message is absent.

To Reproduce Steps to reproduce the behavior:

  1. Log into Slack through Emacs.
  2. Generate a new message from the Slack website or desktop app.
  3. A new message will appear in Emacs Slack, but the text will be missing.

Expected behavior Messages should appear, but they do not.

Environment:

Additional context The issue first appeared last week. (October 21 - 25)

nicklan commented 4 years ago

I am also experiencing this, which basically makes emacs-slack useless. just updated and all incoming messages are blank.

I need my emacs slack, please fix this! :)

nicklan commented 4 years ago

Okay, more useful info:

I downgraded to a previously working version (20190803), and it's still broken. This suggests to me that some other dependency being updated broken things. Looking at the commits that makes sense. I don't see how what changed in the recent commits could effect things

nicklan commented 4 years ago

I've also tried downgrading: websocket, request, emojify, and circe, but to no avail. are there any other packages that I might have updated that slack depends on?

custoz commented 4 years ago

Hi, same problem here on the following environment (but I guess it is not relevant)

nicklan commented 4 years ago

@yuya373 any ideas here? this makes emacs-slack unusable, and i'm sad to have to use the webui again. i'm happy to help test anything you can think of, but i'm not sure what else to check at this point.

thanks!

matthew-piziak commented 4 years ago

I can also reproduce. Note: the messages which are blank in Slack buffers are visible in Slack Log, which implies that they're making it down from the API, and that they're getting successfully parsed into elisp structures. However, something is preventing them from being displayed properly in Slack buffers.

jamesaimonetti commented 4 years ago

Current theory (having this issue too) is that slack-buffer-message-text is not properly creating the message text (it returns just the username while the message object contains the full text:

trying to insert #s(slack-user-message message unbound C0T7FC98B 1574182465.168300 that's funny nil nil nil nil nil nil nil nil nil (nil) nil   nil 0 nil 0 nil U0T8R2Z8C unbound unbound)

inserting into lui darren 

This is me logging message then text in slack-buffer-insert.

yuya373 commented 4 years ago

I can also reproduce. I wrote aaa using dot list format below the text area, Slack treat it as rich_text. And the message has different structure from normal message. (:type "rich_text") in :blocks is not implemented yet, it is not displayed properly. I will fix this in the near future.

new wysiwyg? text area message structure
スクリーンショット 2019-11-20 2 18 38 (:client_msg_id "1228f21b-3474-4926-a43b-24e6cadbaa55" :suppress_notification :json-false :type "message" :text "• aaa" :user "U1013370U" :team "T100W6508" :blocks ((:type "rich_text" :block_id "gPtH" :elements ((:type "rich_text_list" :elements ((:type "rich_text_section" :elements ((:type "text" :text "aaa")))) :style "bullet" :indent 0)))) :user_team "Txxxxx" :source_team "Txxxxx" :channel "D1A45PX44" :event_ts "1574183833.000400" :ts "1574183833.000400")
yuya373 commented 4 years ago

For now, we can disable blocks completely and render plain text message by 7d071035ce6e1b47f8152c6fa73e186902595738, c9db148fb89561c359d0edf4a037516c08930745

(slack-register-team
  ...
  :disable-block-format t)
matthew-piziak commented 4 years ago

The workaround works for me. Thank you @yuya373! :pray:

nicklan commented 4 years ago

Unfortunately setting :disable-block-format t doesn't seem to make a difference for me (running melpa slack-20191019.1858, which appears to include the relevant commits).

nicklan commented 4 years ago

In case it's of any use, this is the format I get in the slack log for messages showing up as blank:

(:client_msg_id "[id]" :type "message" :text "[text]" :user "[id]" :ts "1574200705.001900" :team "[id]" :blocks ((:type "rich_text" :block_id "rafj5" :elements ((:type "rich_text_section" :elements ((:type "text" :text "[text]")))))) :reactions nil :attachments nil :pinned_to nil :channel "[channel]")

similar to what you posted above, but not exactly the same

greenfieldt commented 4 years ago

Unfortunately setting :disable-block-format t doesn't seem to make a difference for me (running melpa slack-20191019.1858, which appears to include the relevant commits).

@nicklan I don't think 20191019.1858 has the change. I have that version installed and had to merge the commits (which fixed the problem). But now I see that melpa has a 20191119.1737 (which I haven't tried) but I assume probably would have the fix

AdamBark commented 4 years ago

I just upgraded from MELPA and it looks like the workaround fixes it here. Thanks @yuya373 !

nicklan commented 4 years ago

@greenfieldt ohh nice, yep. I don't understand how to read the melpa status page then, since it listed that older version but the most recent commit. ohh well, with the newest version and that setting, things are back.

Thanks!

jamesaimonetti commented 4 years ago

Confirming latest update + disable-block-format fixed the display issue. Thanks @yuya373!

jasonmj commented 4 years ago

Thanks @yuya373. Very happy to be able to use Emacs Slack again :)

I'm inclined to close this ticket unless there's more you'd aimed to cover regarding rich text message handling?

yuya373 commented 4 years ago
jonathanwilner commented 4 years ago

hi @yuya373 , this issue still occurs for me, both with code from master, as well as from melpa, with :disable-block-format in the :configuration . I am on Mac OS X using Emacs 26. Any help would be greatly appreciated!

jonathanwilner commented 4 years ago

and @yuya373 - bizzarely, the text comes through clearly via the alert mechanism, but is blank in the actual buffer.

ieure commented 4 years ago

I'm still experiencing the issue as well. Using commit 009e48b via straight.el and

(slack-register-team :name "EmployerName"
                     :default t
                     :disable-block-format t
                     :token "redacted")