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

Can't Delete Existing Widgets #9827

Closed
jph168 opened this issue May 23, 2019 · 4 comments
Closed

Can't Delete Existing Widgets #9827

jph168 opened this issue May 23, 2019 · 4 comments

Comments

@jph168
Copy link

jph168 commented May 23, 2019

Update: Had to Manually Clear Cache and Reload under help and About, fixed it(for my Client). Other Friends still had the widget till they also Cleared Cache and Reloaded. Restarting the Desktop Client doesn't automatically refresh this.

Description

Widget disappears as it would being deleted, error message appears, then widget comes back.
For a workaround I deleted the room and made another. The only thing is I've managed to recreate this Issue again.

Steps to reproduce

  • Adding/Deleting (Modified?) Widgets

Log: sent/not sent?Debug Logs are sent, made the issue reoccur multiple times in the Client to make sure its in the Debug Logs before I sent them.
Failed to Remove widget

Version information

  • Platform: Desktop

For the web app: Not Affected.

For the desktop app:

  • OS: Linux
  • Version: 1.1.2-1
@jph168 jph168 changed the title Deleting Existing Widgets(Hard To Reproduce) Can't Delete Existing Widgets(Hard To Reproduce) May 23, 2019
@jph168 jph168 changed the title Can't Delete Existing Widgets(Hard To Reproduce) Can't Delete Existing Widgets May 23, 2019
@jryans
Copy link
Collaborator

jryans commented May 24, 2019

Flagging for @jaywink to investigate.

@jaywink
Copy link
Member

jaywink commented May 28, 2019

Relevant parts of the log:

2019-05-23T17:33:43.340Z E Failed to delete widget Timed out waiting for widget ID youtube_%40xxxxxxxxxxxxxxxx%3Amatrix.org_1558235511345 to appear
Error: Timed out waiting for widget ID youtube_%40xxxxxxxxxxxxx%3Amatrix.org_1558235511345 to appear
    at vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:23:65689
From previous event:
    at R.U [as _captureStackTrace] (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:1:27587)
    at R._then (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:1:53198)
    at R.then (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:1:51554)
    at Function.value (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:23:66641)
    at onFinished (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:63:52785)
    at Object.l [as onFinished] (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:1:149662)
    at t.onOk (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:30:40253)
    at Object.o (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:46:425216)
    at s (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:46:423417)
    at Object.executeDispatchesInOrder (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:46:424146)
    at f (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:30:55998)
    at p (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:30:56124)
    at Array.forEach (<anonymous>)
    at e.exports (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:63:98369)
    at Object.processEventQueue (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:30:57516)
    at vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:73:37497
    at Object.handleTopLevel [as _handleTopLevel] (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:73:37519)
    at p (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:73:58580)
    at u.perform (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:46:20749)
    at Object.batchedUpdates (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:63:113464)
    at Object.batchedUpdates (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:23:56495)
    at dispatchEvent (vector://vector/webapp/bundles/8090f6060e50e2366e06/bundle.js:73:59361)
2019-05-23T17:33:43.341Z I Starting load of AsyncWrapper for modal
2019-05-23T17:33:43.538Z W Adding fromWidget messaging endpoint for youtube_%40xxxxxxxxxxx%3Amatrix.org_1558235511345 {"widgetId":"youtube_%40xxxxxxxxxxxx%3Amatrix.org_1558235511345","endpointUrl":"https://scalar.vector.im"}
2019-05-23T17:33:43.538Z W Requesting capabilities for youtube_%40xxxxxxxxxxxxxxxx%3Amatrix.org_1558235511345
2019-05-23T17:33:43.541Z W Got capabilities for youtube_%40xxxxxxxxxxxxxxx%3Amatrix.org_1558235511345 []
2019-05-23T17:33:43.541Z I Widget youtube_%40xxxxxxxxxxxxxxxxxxxxxxxx%3Amatrix.org_1558235511345 requested capabilities: 
2019-05-23T17:33:44.005Z W Widget reported content loaded for youtube_@xxxxxxxxxxxxxxxxx:matrix.org_1558235511345

There is also a probably not related 502:

2019-05-23T17:34:55.155Z E Failed to get URL preview: Error: Server returned 502 error

The 502 is possibly an indication of a wider problem with the HS. Widgets are stored in room state. The spec indicates widgets are removed by sending a new event with the url set to empty, which tells clients to ignore the widget.

It looks like the widget delete calls WidgetUtils.setRoomWidget (https://github.com/matrix-org/matrix-react-sdk/blob/51750cf153561b1aa9761cbcf2ca2c0b5cbfaa7a/src/components/views/elements/AppTile.js#L307) which then does a client.sendStateEvent which fails in timeout (https://github.com/matrix-org/matrix-react-sdk/blob/2dcb40f1be6a90b628a84581f838a012821547f6/src/utils/WidgetUtils.js#L285).

So something related to matrix.org server misbehaving at the time or something related to room state corruption client side? This seems maybe likely since the OP mentions issue was fixed by clearing client cache. Removing Scalar label anyway as Scalar is not involved with Room based widget adding/removal.

@jaywink jaywink removed the A-Scalar label May 28, 2019
@jph168
Copy link
Author

jph168 commented May 30, 2019

room state corruption client side? I believe so it's just how it is happening between User Desktop Clients. Is it possible Local Client Cache is suppose to sync with the Server Side? I think the widget in the room state becomes out of sync.

@turt2live
Copy link
Member

This is a duplicate of #12941

Closing in favour of that issue as it's more tightly scoped on information.

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

4 participants