Element-web: Sticker Widget Loading Error with own Integration Server

Created on 11 Apr 2020  Â·  15Comments  Â·  Source: vector-im/element-web

Description

Using the riot desktop electron app for linux it is not possible (for some accounts) to use the sticker widget with my own integration server. The same account in the riot-web can use the sticker at the same integration server, while other users in the riot electron linux app are also able to use them.

Steps to reproduce

(Not working for every account)

  • Install riot electron app
  • configure config.json and update integeration server urls
  • login and try to open the sticker widget in any room

Describe how what happens differs from what you expected.

In riot-web I get a "popup" window to allow to verify my identity to the integration server. it is missing in the app with my account. With the js console I received the following errors:

bundle.js:2 Non-scalar manager, not setting scalar token! {parse: Æ’, resolve: Æ’, resolveObject: Æ’, format: Æ’, Url: Æ’}

and

bundle.js:2 Uncaught (in promise) Error: No matching user widget to form security key
    at Function.getWidgetSecurityKey (bundle.js:2)
    at d._onOpenIdRequest (bundle.js:2)
   at m.onPostMessage (bundle.js:2)

Things I tried to solve this issue:

  • deleting the m.widget content using the /devtools
  • dis- and re-enable the integration server
  • empty cache and reload

Version information

  • Platform: desktop in comparison to the web app

For the web app:

  • Browser: Firefox
  • OS: Linux 5.3.0-46-generic #38-Ubunt 2020 x86_64 x86_64 x86_64 GNU/Linux
  • URL: riot-web version: c4f3d39d4229-react-c4f3d39d4229-js-c4f3d39d4229
    olm version: 3.1.3

For the desktop app:

  • OS: Linux 5.3.0-46-generic #38-Ubunt 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Version: riot-web version: 1.5.15
    olm version: 3.1.3
bug regression widgets

Most helpful comment

Right, I can reproduce this now. The key missing part was Non-scalar widget, not setting scalar token! which is a bit of an awkward line. It's saying that the integration manager in the config doesn't match the sticker picker, so it is refusing to give it the security token. Later, Dimension requests the token explicitly and that falls apart.

All 15 comments

This looks to be caused by recent rework on widget URL construction. Doesn't look like the integration manager is at fault here (yet).

I've not been able to reproduce this at all @JonnyTischbein - are you still seeing the issue?

I still see this on my corporate server, for every user.

Server is not federating with anyone, but federation listener is enabled, bound to 127.0.0.1 and Dimension's federationUrl is set.
Our server also uses ma1sd Identity Server to enable login and user directory from LDAP, which might play a role here.

I can't see any obvious errors in server logs, but my understanding of JS and node in particular is very limited, I might be looking in the wrong places.
Errors in js console are as reported by JonnyTischbein.

@Alvarus the identity server plays no role here. Please go to settings -> help -> submit debug logs and reference this issue.

@turt2live

I've not been able to reproduce this at all @JonnyTischbein - are you still seeing the issue?

Yes! But it seems to be my account. Other account on my server do not have this problem.

There again my error log, after removing and enabling the widget:

bundle.js:2 Adding fromWidget messaging endpoint for dimension-stickerpicker-1586549966583 a {widgetId: "dimension-stickerpicker-1586549966583", endpointUrl: "https://dimension.riotcat.org"}
bundle.js:2 Requesting capabilities for dimension-stickerpicker-1586549966583
    scalar-widget.api.ts:131 [Dimension] Received toWidget request at widget ID dimension-stickerpicker-1586549966583: {"api":"toWidget","action":"capabilities","widgetId":"dimension-stickerpicker-1586549966583","requestId":"1587534577855-0.bq3w2fgxeqv-6"}
     scalar-widget.api.ts:120 [Dimension] Sending postMessage response:  {api: "toWidget", action: "capabilities", widgetId: "dimension-stickerpicker-1586549966583", requestId: "1587534577855-0.bq3w2fgxeqv-6"}
    scalar-widget.api.ts:108 [Dimension] Sending fromWidget:  {api: "fromWidget", widgetId: "dimension-stickerpicker-1586549966583", action: "supported_api_versions", requestId: "VSxUVfcDRrEor5FSpi1U1wQEjzNhJS3JCZlxSvyMNX2eZ3VkWH…AobA2Dwtxb8IBcHZydPbuxyqUdt5hmxectCuOove0I0CsL0L8"}
bundle.js:2 Got capabilities for dimension-stickerpicker-1586549966583 ["m.sticker"]
    bundle.js:2 Widget dimension-stickerpicker-1586549966583 requested capabilities: m.sticker
bundle.js:2 Widget dimension-stickerpicker-1586549966583 allowing requested, whitelisted properties: m.sticker
scalar-widget.api.ts:138 [Dimension] Received fromWidget response at widget ID dimension-stickerpicker-1586549966583: {"api":"fromWidget","widgetId":"dimension-stickerpicker-1586549966583","action":"supported_api_versions","requestId":"VSxUVfcDRrEor5FSpi1U1wQEjzNhJS3JCZlxSvyMNX2eZ3VkWH3W40PE2Vyu0FCOttCaahUu1EMhB9gBnQJcmRzwYAsICFl5cXy8iYbikm40Kg2AobA2Dwtxb8IBcHZydPbuxyqUdt5hmxectCuOove0I0CsL0L8","response":{"api":"fromWidget","supported_versions":["0.0.1","0.0.2"]}}
scalar-widget.api.ts:108 [Dimension] Sending fromWidget:  {api: "fromWidget", widgetId: "dimension-stickerpicker-1586549966583", action: "get_openid", requestId: "Gy7fsxfBobF3v2vRVMEyzuBA6FK5o9hRKQ4Za4hZlM1zrhHgpx…TtlqzgeFfAuEZ1HBwv077BLykt9WWnaDvojTYiASSHQXDj7Q8"}
bundle.js:2 Uncaught (in promise) Error: No matching user widget to form security key
    at Function.getWidgetSecurityKey (bundle.js:2)
    at d._onOpenIdRequest (bundle.js:2)
    at m.onPostMessage (bundle.js:2)
    getWidgetSecurityKey @ bundle.js:2
    _onOpenIdRequest @ bundle.js:2
    onPostMessage @ bundle.js:2
    bundle.js:2 postMessage request timed out. Sent object: {"api":"toWidget","action":"visibility","visible":false,"widgetId":"dimension-stickerpicker-1586549966583","requestId":"1587534573495-0.js8x2erd538-4"} {1587534573495-0.js8x2erd538-4: {…}, 1587534574117-0.koy2lx9tytj-5: {…}}
bundle.js:2 Failed to send visibility:  Error: Timed out
    at bundle.js:2
    e.<computed> @ bundle.js:2
    (anonymous) @ bundle.js:2
    Promise.catch (async)
    sendVisibility @ bundle.js:2
    _sendVisibilityToWidget @ bundle.js:2
    componentDidUpdate @ bundle.js:2
    is @ bundle.js:2
    hc @ bundle.js:2
    t.unstable_runWithPriority @ bundle.js:2
    Vr @ bundle.js:2
    pc @ bundle.js:2
    Zs @ bundle.js:2
    (anonymous) @ bundle.js:2
    t.unstable_runWithPriority @ bundle.js:2
    Vr @ bundle.js:2
    Wr @ bundle.js:2
    Kr @ bundle.js:2
    ne @ bundle.js:2
    $t @ bundle.js:2
bundle.js:2 postMessage request timed out. Sent object: {"api":"toWidget","action":"visibility","visible":true,"widgetId":"dimension-stickerpicker-1586549966583","requestId":"1587534574117-0.koy2lx9tytj-5"} {1587534574117-0.koy2lx9tytj-5: {…}}
    e.<computed> @ bundle.js:2
    (anonymous) @ bundle.js:2
    setTimeout (async)
    (anonymous) @ bundle.js:2
    exec @ bundle.js:2
    messageToWidget @ bundle.js:2
    sendVisibility @ bundle.js:2
    _sendVisibilityToWidget @ bundle.js:2
    componentDidUpdate @ bundle.js:2
    is @ bundle.js:2
    hc @ bundle.js:2
    t.unstable_runWithPriority @ bundle.js:2
    Vr @ bundle.js:2
    pc @ bundle.js:2
    Zs @ bundle.js:2
    (anonymous) @ bundle.js:2
    t.unstable_runWithPriority @ bundle.js:2
    Vr @ bundle.js:2
    Wr @ bundle.js:2
    Kr @ bundle.js:2
    ne @ bundle.js:2
    $t @ bundle.js:2
bundle.js:2 Failed to send visibility:  Error: Timed out
    at bundle.js:2

@JonnyTischbein Please also submit logs from settings -> help -> submit debug logs. There's a bunch of missing context in that snippet.

@Alvarus the identity server plays no role here. Please go to settings -> help -> submit debug logs and reference this issue.

Unfortunately can not do that with internal server. Will make a test instance with same settings and try there, but it'll take some time.

Is there a way to see the debug logs first before uploading it somewhere ?

@Alvarus it should be fine to submit logs, unless the client is completely air gapped.

@JonnyTischbein it's the console.

I did upload the logs. Sould they appear here ?

They go to a private location, but they did appear - thanks.

Right, I can reproduce this now. The key missing part was Non-scalar widget, not setting scalar token! which is a bit of an awkward line. It's saying that the integration manager in the config doesn't match the sticker picker, so it is refusing to give it the security token. Later, Dimension requests the token explicitly and that falls apart.

many thanks for your work!

@Alvarus it should be fine to submit logs, unless the client is completely air gapped.

Unfortunately.

Right, I can reproduce this now.

Guess there's no more need for my debug logs then?

Unless your error is different, should be fine without. Thanks.

Was this page helpful?
0 / 5 - 0 ratings