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

WebGL visualisations not rendering on iOS #280

Closed
mattpolicastro opened this issue Feb 24, 2016 · 33 comments · Fixed by #1411 or #3088
Closed

WebGL visualisations not rendering on iOS #280

mattpolicastro opened this issue Feb 24, 2016 · 33 comments · Fixed by #1411 or #3088
Labels
bug something broken

Comments

@mattpolicastro
Copy link

mattpolicastro commented Feb 24, 2016

I've tried opening a few WebGL-powered visualisations (e.g. wavenumbers) on iOS devices in Safari but am greeted with "Webgl is not supported by your browser - visit http://get.webgl.org for more info". However, WebGL is well-supported in Safari and is able to render graphics from other libraries (e.g. three.js).

I'm not terribly familiar with the project, but I'm poking around how GL context is determined and when showNoWebGlMsg() is fired in /src/plots/gl3d/scene.js. Am I barking up the right tree, or totally off-base?

@mikolalysenko
Copy link
Contributor

It might be that we are passing incompatible parameters to the webgl context creation. This is hard to test without access to an iOS device. I'll see if I can scrounge one up or borrow something to test.

@mattpolicastro
Copy link
Author

This is the error I'm able to trigger from Safari's developer console (iPhone 6 Plus, iOS 9.2.1):

TypeError: undefined is not an object (evaluating 'scene.glplot.canvas')              1295
draven.min.js:1:12125
contextraven.min.js:1:11951
(anonymous function)80b358f249c0.js:16382:547
ljquery.min.js:1:17001
fireWithjquery.min.js:1:17784
readyjquery.min.js:1:12515
Ajquery.min.js:1:9914

Though raven.js is for Sentry, no?
Edit: happy to test anything you have from my end.

@eugenesvk
Copy link

I have the same issue in both Chrome and Safari on iPhone 6 iOS 9.3. Funny thing is visiting http://get.webgl.org in the error message shows a spinning cube just fine.
Hope you can figure it out and fix so iOS users can enjoy awesome plot.ly 3D charts :)

@McCulloughRT
Copy link

Has there been any progress on this issue? I'd love to have a working 3D scatter plot on iOS but currently get the same message as above.

@minimaxir
Copy link

I second the request for progress on this issue. This issue is a blocker for me using 3D charts.

@smvv
Copy link

smvv commented Jul 27, 2016

Same issue for Firefox running on Android (Samsung Galaxy S6)

@dy
Copy link
Contributor

dy commented Oct 7, 2016

Ok, part of the issue, at least for scatter3d, appears to be in gl-fbo

@dy
Copy link
Contributor

dy commented Oct 7, 2016

Seems that iOS just does not allow rendering to floating point textures. It should be fixed here.
just mention @dfcreative

@climbercarmich
Copy link

It also is a big drawback for me as I use an Ipad often for data visualisation presentations. Any updates on this?

@dy
Copy link
Contributor

dy commented Dec 3, 2016

This should fix 3d-related issues.

@bg23
Copy link

bg23 commented Mar 3, 2017

Surface Plot under iOS 10 still prints "Webgl is not supported by your browser" using plotly.js version 1.24.0.

@etpinard
Copy link
Contributor

etpinard commented Mar 3, 2017

@bg23 can you share an example?

@alubbock
Copy link

alubbock commented Mar 7, 2017

@etpinard I'm also getting this error, e.g. on the plotly example 3d surface plots: https://plot.ly/python/3d-surface-plots/

Screenshot below from an iPad Mini 4 running iOS 10.2.1, taken just now.

screenshot

@dy
Copy link
Contributor

dy commented Mar 7, 2017

@etpinard I fixed that only for mesh3d, so complaints are valid. Can look at other cases.

@bg23
Copy link

bg23 commented Mar 7, 2017

The javascript example at "https://plot.ly/javascript/3d-surface-plots/"
is working under Windows/Chrome and Android/Chrome (the latter OS without touch operations).
Under iOS/Safari however "WebGL is not supported" is displayed.

@man-bear-pig
Copy link

I still experience this bug in both iOS Chrome (58.0.3029.83) and Safari on 13" iPad Pro.

@ischurov
Copy link

I wonder why this bug is closed? I definitely see the same error messages in Safari under iOS (i.e. here).

@etpinard
Copy link
Contributor

@ischurov @man-bear-pig #1411 (released in 1.24.0) did fix the problem for some iOS distro, but looks like not all. I'll gladly reopen this issue.

Looking at the reports in detail, the problems appear to only concern surface traces. Could anyone here be interested in testing our other WebGL trace types to help us narrow down the problem? For example,

@etpinard etpinard reopened this Jul 17, 2017
@rreusser
Copy link
Contributor

These all work for me on iPhone 5 except for 3d-mesh, which has lots of black spots @etpinard reports are fixed by #1868. The other exception is @chriddyp's plot which has question mark glyphs for all of the characters.

@etpinard
Copy link
Contributor

The other exception is @chriddyp's plot which has question mark glyphs for all of the characters.

Another argument for 🔪 the current unicode to texture algo cc @dfcreative

@rreusser
Copy link
Contributor

rreusser commented Jul 17, 2017

Even in the iOS simulator using iOS 10.3 + iPhone 5, it shows ? on the first load and proper glyphs on the second. Is it conceivably possible that it's a font loading issue? Maybe solvable by this sort of thing? Not sure why question marks would be the missing font fallback though.

@bg23
Copy link

bg23 commented Jul 17, 2017 via email

@etpinard
Copy link
Contributor

@bg23 can you go to http://webglreport.com/ to see if your iPad's browser does support WebGL?

@bg23
Copy link

bg23 commented Jul 18, 2017 via email

@bg23
Copy link

bg23 commented Oct 10, 2017

Fixed for myself locally, see my comment to #1411.

@bg23
Copy link

bg23 commented Oct 11, 2017

The reason for this bug on iPad is the incomplete iPad detection for mobiles:
In "function isMobile (ua)", the check "ip(hone|od)" must be replaced by "ip(ad|hone|od).
Then surface plots will also work on iPads.

@gittar
Copy link

gittar commented May 20, 2018

surface plots still do not work on ipads. Even a partial solution with limited touch handling would be very helphul.

@ShaneHudson
Copy link

I've also got an issue with surface plots not working on ipad.

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Sep 15, 2018

It would be helpful if people reporting issues could report the specific device and trace type where the issues are observed.

From what I can tell, the subject of this issue (i.e. "WebGL on iOS") is far too broad. As of today, my testing shows that:

  • on an iPhone 7 (model number A1778): all trace types work
  • on an iPad Air 2 (model number A1566): all trace types work except scatter3d, mesh3d, surface, cone, and streamtube. (Note that scattergl and scatterpolargl do work, and they use WebGL as well.)

Are there any instances of iPhones where certain trace types do not work, or iPads where trace types other than the ones listed above do not work?

@ShaneHudson
Copy link

ShaneHudson commented Sep 15, 2018 via email

@nicolaskruchten
Copy link
Contributor

Thanks @ShaneHudson! Are you able to use scatter3d or any of the others I listed as broken on my iPad?

@nicolaskruchten
Copy link
Contributor

Connecting my iPad up to my Mac with developer tools enabled and trying to load a scatter3d traces gives me this:

image

The error seems to come from in here somewhere: https://github.com/stackgl/gl-fbo

@nicolaskruchten
Copy link
Contributor

@dy I see you got something merged in some upstream repo... what are the next steps here? any estimate of when I could see a PR into plotly.js that I could test? I'm ready whenever!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.