Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot delete widget in web interface #12941

Open
christianlupus opened this issue Mar 31, 2020 · 8 comments
Open

Cannot delete widget in web interface #12941

christianlupus opened this issue Mar 31, 2020 · 8 comments

Comments

@christianlupus
Copy link

christianlupus commented Mar 31, 2020

Description

I recently setup an internal matrix homeserver with riot-web attached. During first plays with the rooms I found 2 widgets (jitsi) that I cannot remove permanently.

Unfortunately, I cannot tell where these widgets came from. Yesterday there was only one widget that I added and that I could remove without problems.

Steps to reproduce

  • Simply click on Remove for everyone within the menu of one of the widgets.
  • After confirmation in an overlayed dialog the widget is gone.
  • Some (~20) seconds later a new dialog appears telling me An error ocurred whilst trying to remove the widget from the room and the widget gets reloaded.

Logs being sent: yes

Version information

  • Platform: web (desktop not tested)

For the web app:

  • Browser: Firefox 73.0.1
  • OS: Arch Linux
  • URL: riot.aes-sb.de
  • Riot version: using docker image vectorim/riot-web:develop (aka d9fbbe16968c-react-2bf4513b44e7-js-21908aea6cb4), same happens for the :latest image

Additional information

Console log states

Failed to delete widget Error: "Timed out waiting for widget ID dimension-jitsi-1585408471205 to appear"
  • It could be related to Can't Delete Existing Widgets #9827 (which describes a problem on desktop, not web).
  • Personal impression is that the problem is related with the riot app that was connected with the HS and that reported an open call all the time. The user (a colleague of mine, I do not know what he did exactly) reported issues there. Potential issue
  • The room ID is !BDLITNyAGlAbOgFLNl:aes-sb.de that caused the issues
@turt2live
Copy link
Member

Looks like the server is a bit slow and failing to send the updated widget back down to the client. That should happen within 20 seconds, but for some reason isn't.

@christianlupus
Copy link
Author

It is interesting that I can create new widgets and remove them without issues. I can also remove all widgets from other users except for those two.

Additionally, my collegue tells me that he cannot see the wdgets causing the problems in the room.

One more remark (I am unsure, if this is ov relevance here): This is a screenshot of the integrations settings in the named room after clicking on Jitsi:
Screenshot_2020-04-04 Riot #aes aes-sb de
I expanded the lower two jitsi instances. Note these are pointing to the jitsi.riot.im domain. The correct domain is the one with aes in it as with the new jitsi widget preconfigured.
What surprises me here is that they are both called the same: undefined.

@0xdevalias
Copy link

While the root cause is likely different here, I added a widget with /addwidget https://www.devalias.net just to see what would happen, and now it doesn't show up under the list of widgets on the sidebar, nor does there seem to be a slash command to remove it, but when I look in the chat settings -> advanced -> dev tools -> active widgets, I can see that it is listed there:

{
	"data": {},
	"name": "Custom Widget",
	"type": "m.custom",
	"url": "https://www.devalias.net/",
	"creatorUserId": "@REDACTED:beeper.com",
	"id": "!REDACTED%3Abeeper.com_%REDACTED%3Abeeper.com_REDACTED",
	"roomId": "!REDACTED:beeper.com",
	"eventId": "REDACTED",
	"_isEmojiBody": null
}

Is there any way to manually remove this? Even if it's by sending a custom event/etc?

@t3chguy
Copy link
Member

t3chguy commented Nov 28, 2022

@0xdevalias have you checked for the widget in the right panel? By default widgets are unpinned

@0xdevalias
Copy link

I was looking in the right panel, under widgets, and it doesn't show there. Which is why I was looking in the devtools for an alternative way to do it.

@0xdevalias
Copy link

Ok, so I found a way to do it within this document:

How do I remove a widget?

Remove the Widget Info from content, that is to say send an event with the same Widget ID with an empty content. The lack of a required field (url or type) MUST make clients ignore the event. This is a temporary measure until the Matrix API lets you delete state from a room.

Basically I:

  • clicked through to this section again: chat settings -> advanced -> dev tools -> active widgets
  • clicked on the https://www.devalias.net/ widget
  • modified the 'Event Content' to remove everything from the JSON except for the id field
  • clicked 'Send'

So the entire 'Event Content' ended up looking like this:

{
	"id": "!REDACTED%3Abeeper.com_%REDACTED%3Abeeper.com_REDACTED"
}

After doing that, https://www.devalias.net/ no longer showed up under active widgets, so I assume it was removed correctly.

@0xdevalias
Copy link

Via some steps for renaming widgets found here:

There is a workaround I found. It involves editing room state.

  1. Type /devtools in desired channel.
  2. Go to Explore room state.
  3. Go to im.vector.modular.widgets.
  4. Pick your customwidget_*.
  5. Replace "Custom" in the name with what you need.

Hopefully, it solves your concern about the custom widget name.

It would be neat if we could change its icon too, but Matrix Widget API doesn't reflect it, so it's purely on client now to show a stock icon for m.custom type.

_Originally posted by @vintprox in element-hq/element-integration-manager#69

It seems that the 'delete' steps I took above in #12941 (comment) aren't necessarily complete/correct, as I can still see data/entries when I use /devtools, go to 'Explore Room State', then enter im.vector.modular.widgets into the filter results.

@t3chguy t3chguy self-assigned this Feb 13, 2023
@snex
Copy link

snex commented Feb 15, 2023

This is occurring in the Linux desktop app as well. Even following the steps posted by @0xdevalias does not get rid of the widget(s).

@t3chguy t3chguy removed their assignment Aug 14, 2023
t3chguy pushed a commit that referenced this issue Oct 17, 2024
* feat: added error handling for room publish toggle

* chore: fixed the messages and removed `console.log`

* chore: added minor comment that was removed

* fix: addressed review comments

* fix: fixed linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants