Ferdi: Icon of self hosted Rocket.Chat not visible in sidebar

Created on 1 Sep 2020  路  9Comments  路  Source: getferdi/ferdi

" are comments from us and won't be
visible in your bug report, so please don't put any text in them.
-->
Bug description:

When adding a new Rocket.Chat service, the icon in the sidebar disappears shortly after. The same happens after a restart of Ferdi.
Setting a custom icon also doesn't work, instead the preview in the setting shows a white image (tested with multiple images and formats).

Steps to reproduce:

  1. Go to 'Add new service'
  2. Select 'Rocket.Chat'
  3. Switch to 'Self hosted'
  4. Enter address of self-hosted Rocket.Chat
  5. (Optional: add custom icon)
  6. Click on 'Save service'
  7. The Rocket.Chat icon in the sidebar disappears (after a few seconds)
  8. (Optional: if custom icon was set -> icon shows up as completely white in the preview)

Expected behavior

Rocket.Chat icon should not disappear. Custom icon should preview the actual icon.

Screenshots

Environment:

  • Operating System: Windows 10 2004
  • Ferdi Version: 5.5.0
  • Server: Without account

bug

Most helpful comment

Sorry, yeah, you are totally right.
Reopening this to let the devs fix it for a future release.

All 9 comments

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

This issue is happening because the favorite icon is getting setup with double slashes in the favorite icon path.

Debugging Ferdi with dev tools I see the path to the favorite icon is marked as: https://chat.server.name//assets/favicon_192.png

Notice the // in the path. Removing that in the DOM fixes it.

Fixed that by changing line 29 of rocket.chats recipe webview.js from
ipcRenderer.sendToHost('avatar', `${window.location.protocol}//${window.location.host}/${response.icons[0].src}`);
to
ipcRenderer.sendToHost('avatar', `${window.location.protocol}//${window.location.host}${response.icons[0].src}`);

Got that idea from: https://github.com/meetfranz/recipe-rocketchat/blob/master/webview.js

Further if you want to use a custom icon, just comment that line.

Thank you very much, that fixed it!

@Firnor Sure closing that issue? - I don't know if it will be fixed then..

Sorry, yeah, you are totally right.
Reopening this to let the devs fix it for a future release.

I think this is a duplicate of #780. @vantezzen

Thank you for reporting duplicated @LongJohn-Silver, it really helps keeping our issues clean!

@vantezzen It's nothing!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AP-Hunt picture AP-Hunt  路  3Comments

adithshenoy picture adithshenoy  路  3Comments

ammarmalhas picture ammarmalhas  路  3Comments

sschaefa picture sschaefa  路  3Comments

yourcontact picture yourcontact  路  3Comments