EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

[BUG] Attachments sometimes fail to render on initial loads.

Open Spiral-Memory opened this issue 11 months ago • 12 comments

Description:

Attachments don't render properly on the first deployment without visiting the RC app first.

Steps to reproduce:

  1. Deploy Embedded Chat.
  2. Immediately send multiple different attachments such as photos/videos, etc.
  3. Notice that they won't render properly.

Expected behavior:

Attachments should render properly.

Actual behavior:

Attachments render only when you first visit Rocket Chat and then refresh the EC app.

Note: I'm unsure whether this issue is related to Embedded Chat or Rocket Chat. Also, the issue is hard to reproduce, so not attaching a video.

Spiral-Memory avatar Mar 23 '24 16:03 Spiral-Memory

@Spiral-Memory Great find! I had this issue for a long time...any idea why the files won't render?

JeffreytheCoder avatar Mar 23 '24 19:03 JeffreytheCoder

Nope.. but if you just open rc once and refresh ec. It will start to render..

Why it happens is unknown !

Spiral-Memory avatar Mar 23 '24 19:03 Spiral-Memory

Nope.. but if you just open rc once and refresh ec. It will start to render..

Why it happens is unknown !

I did this but it still doesn't render on my side...could you share a screen recording?

JeffreytheCoder avatar Mar 24 '24 06:03 JeffreytheCoder

Sometimes, that happens too 😂 but it mostly works..

Spiral-Memory avatar Mar 24 '24 06:03 Spiral-Memory

The exact cause is unknown !

Spiral-Memory avatar Mar 24 '24 06:03 Spiral-Memory

I found out the issue - I disabled the Settings -> File Upload -> Protect Uploaded Files and the files render perfectly :)

file-not-rendered

I'm updating the Readme so that EC contributors are aware of this

JeffreytheCoder avatar Mar 24 '24 06:03 JeffreytheCoder

Hey, but why ? Why will i disable the option to protect uploaded files ?

Let's not keep it in readme.. it's a vague solution with no explanation involved. also the issue happens even if we login with admin account on EC. Let's keep the solution here to keep track.

Spiral-Memory avatar Mar 24 '24 06:03 Spiral-Memory

Check out this existing issue in RC-Electron.

Basically, the download link is opened in the default browser, not in the RC client (EC in our case). This is why in your case, you must log into RC in the browser before being authenticated to see the files.

Looks like this is an unsolved issue since 2016...so disabling the file protection option is a workaround for now

JeffreytheCoder avatar Mar 24 '24 07:03 JeffreytheCoder

Great find, in my opinion, let's keep this issue and solution here.. or maybe I'll ask to include it in the FAQ.. Keeping it in readme won't be good in my opinion !

Spiral-Memory avatar Mar 24 '24 07:03 Spiral-Memory

well it's better to let more people know about this issue and the workaround...putting this on the FAQ is a good idea

JeffreytheCoder avatar Mar 24 '24 07:03 JeffreytheCoder

Awesome !

Spiral-Memory avatar Mar 24 '24 07:03 Spiral-Memory

Good find @JeffreytheCoder !

sidmohanty11 avatar Mar 24 '24 11:03 sidmohanty11