element-hq / element-integration-manager

Element Integration Manager related issues
6 stars 1 forks source link

Scalar widgets don't load in Safari (you get a no banana screen, though the no banana image also doesn't load) #19

Open lampholder opened 3 years ago

lampholder commented 3 years ago

Widgets added with /addwidget work fine (modulo https://github.com/vector-im/element-web/issues/15404 which seems to stop them working on develop right now).

jaywink commented 3 years ago

I tried looking at this, but unfortunately the latest Safari that can be installed on Ubuntu is the Windows version from 2012, which isn't even able to load Element.

I think we need a developer with a Mac to look at this, anyone in Element Web team available? @dbkr ?

jaywink commented 3 years ago

(got access to a Mac)

@lampholder and/or @jryans could you confirm that turning off "Prevent cross-site tracking" makes the widgets show up? Or at least whether for you it was already turned off when seeing this error.

Also would be helpful to know if this was against scalar or scalar-staging.

Selection_770

Once turning that option off, I can load widgets on Safari 13.1.

jryans commented 3 years ago

@jaywink Yes, widgets load for me if I disable "Prevent cross-site tracking" in Safari 14. It was previously enabled (by default) for me. I am testing with scalar-staging via develop.element.io.

jryans commented 3 years ago

From reading the various Safari blog articles, I think we'll need to implement some form of the Storage Access API to resolve this.

jryans commented 3 years ago

(Or else redesign how widgets access cookies etc.)

jryans commented 3 years ago

We might be able to get by here with limited changes if Scalar were to set its access token via HTTP response instead of using document.cookie. It's hard to say anything with confidence though, as I have yet to find a clear summary of all the changes Safari has made.

ara4n commented 3 years ago

If we aren't going to fix this, please can we fail gracefully (i.e. route people to chrome / FF / electron) fairly urgently?

jaywink commented 3 years ago

@jryans I assume the "route to chrome / FF / electron" as above is something that would be done on Element side, right?

t3chguy commented 3 years ago

I don't think Element would be able to see that error happening inside the iframe due to cross-origin issues

jryans commented 3 years ago

Well, I suppose it depends what @ara4n has in mind... We could show a generic warning for all Scalar widgets in Safari saying they are not supported, I suppose?