Skip to content

Given example is not working #44

@brunakov

Description

@brunakov

The given example given in https://github.com/matrix-org/matrix-widget-api/tree/master/examples/widget, gives 404 for api.js.
By replacing https://github.com/matrix-org/matrix-widget-api/blob/master/examples/widget/index.html#L50 with <script src="https://unpkg.com/[email protected]/dist/api.min.js"></script>, I get the following errors when opening the Custom Widget:

 Action:notify_capabilities failed with message: The postMessage was unhandled generic-f65725513b138597c58f.bundle.js:77:8220
    value https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:77
    value https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:77
    value https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:77
    (Async: EventListener.handleEvent)
    value https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:77
    t https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:77
    value https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:79
    Tr https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    oi https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    unstable_runWithPriority https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:77
    Wt https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    ii https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    Wr https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    zr https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    Pi https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    Di https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    Qr https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    Di https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:61
    render https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:69
    <anonymous> https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:79
    t https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:1
    <anonymous> https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:1
    <anonymous> https://scalar.vector.im/api/widgets/generic-f65725513b138597c58f.bundle.js:1

and

 Error: widgetId is not present in URL - cannot load widget
    assertParam https://my.homeserver.com/matrix-widget-api/examples/widget/utils.js:24
    <anonymous> https://my.homeserver.com/matrix-widget-api/examples/widget/index.html:59
utils.js:29:13
    handleError https://my.homeserver.com/matrix-widget-api/examples/widget/utils.js:29
    <anonymous> https://my.homeserver.com/matrix-widget-api/examples/widget/index.html:102

Would be great to have a working boilerplate to experiment with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions