emacs-slack icon indicating copy to clipboard operation
emacs-slack copied to clipboard

emacs-slack freezing Emacs: "no message in [channel], fetching from server"

Open ieure opened this issue 4 years ago • 10 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Connect to Slack.
  2. Run slack-select-rooms, and select some rooms.
  3. Some work fine; others cause Emacs to become unresponsive for an extensive period of time (30s+). C-g can interrupt whatever emacs-slack is doing, but it's only operational for a few seconds before freezing again. Emacs must be kill -9'd to recover.

Backtrace I have no backtrace, since Emacs is hung. The last thing I see in the echo area is "No message in [channel], fetching from server." Debugging assistance welcomed.

Expected behavior The rooms should get pulled up and Emacs shouldn't freeze.

Environment:

  • OS: Debian 10 "buster"
  • Emacs Version: 26.1
  • emacs-slack Version: Initially d53a57a. Replicated on 5d5497a this morning.

Additional context This started happening on or around Thursday, 2020-07-16.

ieure avatar Jul 20 '20 15:07 ieure

Followup: This seems to be related to inline images. I set slack-render-image-p to nil, and am able to pull up all the rooms I expect.

ieure avatar Jul 20 '20 15:07 ieure

I don't have a useful backtrace either (sorry), but I can confirm the same issue and that (setq slack-render-image-p nil) prevents it for me. Mine seems to completely freeze up and even mashing of esc and C-g don't resolve it... that might be because I'm using exwm so Emacs is my window manager, though.

chasecaleb avatar Jul 29 '20 16:07 chasecaleb

I don't have a useful backtrace either (sorry), but I can confirm the same issue and that (setq slack-render-image-p nil) prevents it for me. Mine seems to completely freeze up and even mashing of esc and C-g don't resolve it... that might be because I'm using exwm so Emacs is my window manager, though.

High five, EXWM buddy.

ieure avatar Jul 29 '20 19:07 ieure

Interestingly I can't reproduce this anymore, even though I'm still on the same version of this package. I suspect it's because I upgraded to the Emacs 27.1 release (was previously on 26.whatever-was-latest), since Emacs 27 no longer uses imagemagick for image rendering, but I haven't taken the time to revert to 26 to verify.

chasecaleb avatar Aug 14 '20 20:08 chasecaleb

still happens for me even after setting slack-render-image-p to nil. is there a way to clear the cache, possibly that is it. i'm on develop branch with spacemacs, using latest 27.1 emacs-plus.

andrew-hm avatar Jan 13 '21 19:01 andrew-hm

I believe the issues is with third party apps in slack, for instance StatusHero. In one example there were 2 unread messages from StatusHero in a channel which lead to this issue. Is there a way to block third party messages perhaps to see if that fixes it?

andrew-hm avatar Jan 13 '21 22:01 andrew-hm

the patch from https://github.com/yuya373/emacs-slack/pull/532 is helping some of the issues, so it appears to be related to apps and bots, sigh. anyway to ignore them?

andrew-hm avatar Jan 14 '21 06:01 andrew-hm

Using elp profiler to find the slow bit leads me to slack-image.el/slack-image-shrink as the possible culprit. Can anyone else reproduce this?

(I’m on a Mac with a custom-compiled-with-xwidgets-but-otherwise-vanilla Emacs.)

coconutpalm avatar Apr 28 '21 18:04 coconutpalm

I think I may have just run into this issue (at least can't open a channel with "no message in [channel], fetching from server", but setting slack-render-image-p to nil didn't work around it as I still can't open that channel. I'm using Emacs 27.2 and emacs-slack from Guix. In addition, I also see messages like Error Download File: nil (error connection-failed connect :host emoji.slack-edge.com :service 443) error, url: https://emoji.slack-edge.com/T0F120PC5/bowtie/f3ec6f2bb0.png

jackhill avatar Oct 07 '21 15:10 jackhill

Actually, updating to the latest commit seems to have fixed this for me now (and with slack-render-image-p set to 1). Maybe it's time for another release?

jackhill avatar Oct 07 '21 15:10 jackhill