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

"Chess basics" don't load on iPad #7591

Closed
KommX opened this issue Nov 14, 2020 · 18 comments
Closed

"Chess basics" don't load on iPad #7591

KommX opened this issue Nov 14, 2020 · 18 comments
Labels
bug exotic browser Needs to be tested with a specific browser no scala

Comments

@KommX
Copy link

KommX commented Nov 14, 2020

I just noticed that the "Chess basics" section doesn't properly load for me on two different iPads (tested Safari and Brave browsers). It works fine on an Android phone and my Windows computer.

Steps to reproduce:

  1. Log out (so that you don't have any progress)
  2. Go to https://lichess.org/learn#/
  3. Choose any piece e.g. the rook - now the board appears in the background with the small overlay titles "Stage 1: The rook"
  4. Hit "LET'S GO"

What happened?
I hear a sound but the overlay stays and the tab seems to consume a lot of CPU resources.

What I expected?
The exercise should load.

Tested on:

  • iPad 6th Gen and iPad 8th Gen, both iOS 14.2
  • most recent versions of Safari and Brave
@kraktus
Copy link
Member

kraktus commented Nov 15, 2020

Can reproduce on IOS 14.2

@niklasf niklasf added bug exotic browser Needs to be tested with a specific browser no scala labels Nov 15, 2020
@niklasf
Copy link
Member

niklasf commented Nov 15, 2020

Can reproduce in Browserstack, but unable to get a stacktrace or logged errors.

@KommX KommX changed the title "Chess basics" doesn't load on iPad "Chess basics" don't load on iPad Nov 15, 2020
@andylatham82
Copy link

Happens on an iPhone with both Safari and Chrome browsers.

@x4d3
Copy link

x4d3 commented Dec 18, 2020

I can reproduce on my Iphone X and on an Ipad Mini.

@cuddlestmonkey
Copy link

Reproduced on iPhone SE (2020) with Safari and Chrome.

@unhammer
Copy link

unhammer commented Jan 2, 2021

On an iPad 2020 in both Safari and Firefox I can play the initial lessons (perhaps because they were already started on from a laptop?), but trying lesson 13 and 14 which I hadn't tried yet they seem to be giving this issue (I hear the sound on clicking the start button, but nothing happens).

EDIT: I managed to open lesson 13 on iPad Safari after first opening it once (under that user) from Linux Firefox. So I guess iOS users just have to do that to all lessons before trying them …

@andylatham82
Copy link

Still happening on iPhone, and now can confirm it happening on iPad.

@kraktus
Copy link
Member

kraktus commented Apr 2, 2021

I cannot reproduce the issue (can click fine) locally. Could it be some sort of security measure trigged when the whole screen is clickable to avoid phishing?

@unhammer
Copy link

@kraktus try https://lichess.org/learn#/4 in a private tab (ie. not logged in to your user) on an up-to-date iPad with Safari.

I don't have a Mac, so unfortunately I can't get up web console (iPads truly are locked down :-/). I tried running weinre behind a cors-enabled https proxy to see if I could get some debug info, but unfortunately lichess's CSP disallows bookmarklets (no scripts-src), so someone with a Mac will have to look further into it.

@zeknas
Copy link

zeknas commented Apr 20, 2021

On an iPhone, this is the error :

Unrecognized Content-Security-Policy directive 'worker-src'

According to Mozilla, this is indeed not supported by Safari https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/worker-src#browser_compatibility

Hope this helps !

@unhammer
Copy link

unhammer commented Apr 20, 2021

https://github.com/ornicar/lila/blob/9c34d433f9979513066e9af547d1e2be02738cd5/modules/common/src/main/ContentSecurityPolicy.scala#L81 maybe remove this then? (can it be conditionally removed on safari?)

( ONLYOFFICE/onlyoffice-nextcloud#213 seems to have fixed it by adding a "*" as target arg to window.postMessage, but that's maybe equivalent to no csp?)

@niklasf
Copy link
Member

niklasf commented Apr 20, 2021

No need, this is completely unrelated, as unrecognized Content-Security-Policy directives are ignored anyway.

@unhammer
Copy link

Isn't the issue here that Safari doesn't ignore the unrecognized directive?

@benediktwerner
Copy link
Member

No, probably not. The actual problem in the issue you linked seems unrelated to the CSP. They were simply missing the required second parameter for postMessage.

@niklasf
Copy link
Member

niklasf commented Apr 29, 2021

@benediktwerner Wow, your patch https://github.com/ornicar/lila/pull/8778/files (+ follow ups) seems to have fixed this issue, too.

@niklasf niklasf closed this as completed Apr 29, 2021
@gphilip
Copy link

gphilip commented May 8, 2021

I apologize if it is not OK to comment on a closed issue, but: this issue is still present for me on my iPad. I get the exact same behaviour as originally described by @KommX . Tested on: iPad Air 4th Generation, iOS 14.5.1 . Most recent versions of Safari and Firefox.

@KommX
Copy link
Author

KommX commented May 8, 2021

@gphilip: That's weird, as it works for me now super fine.

@gphilip
Copy link

gphilip commented May 8, 2021

@KommX Thank you! I checked again, and I hadn't updated this OS version; it was still in the previous version. I updated the OS, and now this works perfectly for me.

Thanks once again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug exotic browser Needs to be tested with a specific browser no scala
Projects
None yet
Development

No branches or pull requests

10 participants