aperezdc / revolt

Better desktop integration for Riot.im (not only) for GNOME
GNU General Public License v3.0
92 stars 9 forks source link

Widgets display a blank frame #76

Open afranke opened 7 years ago

afranke commented 7 years ago

Riot recently landed widgets that you can add to a room. In Revolt, they don’t show, one only gets a white frame.

aperezdc commented 7 years ago

I'll be investigating this myself soon, once I get my Riot installation updated.

@afranke In the meanwhile, could you check if there is something being printed to the console, when the “Developer Tools” setting is enabled?

afranke commented 7 years ago
[Error] Error while parsing the 'sandbox' attribute: 'allow-popups-to-escape-sandbox', 'allow-presentation' are invalid sandbox flags.
    setValueForProperty (bundle.js:95422)
    _updateDOMProperties (bundle.js:235708)
    mountComponent (bundle.js:235349)
    mountComponent (bundle.js:22041)
    updateChildren (bundle.js:233856)
    _reconcilerUpdateChildren (bundle.js:238125)
    _updateChildren (bundle.js:238229)
    updateChildren (bundle.js:238216)
    _updateDOMChildren (bundle.js:235771)
    updateComponent (bundle.js:235589)
    receiveComponent (bundle.js:235551)
    receiveComponent (bundle.js:22120)
    updateChildren (bundle.js:233844)
    _reconcilerUpdateChildren (bundle.js:238125)
    _updateChildren (bundle.js:238229)
    updateChildren (bundle.js:238216)
    _updateDOMChildren (bundle.js:235771)
    updateComponent (bundle.js:235589)
    receiveComponent (bundle.js:235551)
    receiveComponent (bundle.js:22120)
    _updateRenderedComponent (bundle.js:234678)
    _performComponentUpdate (bundle.js:234648)
    updateComponent (bundle.js:234569)
    performUpdateIfNecessary (bundle.js:234485)
    performUpdateIfNecessary (bundle.js:22152)
    runBatchedUpdates (bundle.js:14409)
    perform (bundle.js:41749)
    perform (bundle.js:41749)
    flushBatchedUpdates (bundle.js:14431)
    flushBatchedUpdates
    closeAll (bundle.js:41815)
    perform (bundle.js:41762)
    enqueueUpdate (bundle.js:14459)
    enqueueUpdate (bundle.js:58858)
    enqueueSetState (bundle.js:59052)
    setState (bundle.js:97904)
    (anonymous function) (bundle.js:67111)
    tryCatcher (bundle.js:9241)
    _settlePromiseFromHandler (bundle.js:139679)
    _settlePromise (bundle.js:139736)
    _settlePromiseCtx (bundle.js:139773)
    _drainQueue (bundle.js:136842)
    _drainQueues (bundle.js:136847)
    drainQueues (bundle.js:136721)
    promiseReactionJob
[Error] Failed to load resource: the server responded with a status of 403 (Forbidden) (youtube.bundle.js, line 0)
aperezdc commented 7 years ago

Thanks @afranke, I can confirm the error you got in the console (same here!), and it seems to be an upstream issue. I have to check whether there is some missing implementation in WebKit, or on the contrary whether Riot is using some non-standard features without doing proper feature detection. At any rate, I'll be reporting this to the relevant upstream.

aperezdc commented 7 years ago

WebKit is to blame here.

aperezdc commented 7 years ago

The allow-presentation enables an <iframe> to use the Presentation API, and I think it may be possible to make Riot only add the allow-presentation flag only when the web engine supports the API. I'll check with the Riot developers whether that solution would be acceptable.

The API is not supported by WebKit anyway (there is only an unmerged old patch adding an implementation stub), so even if the <iframe> flag would be parsed, web applications wouldn't have the API available.