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 not supported in internal browser #5678
Comments
|
Can you share the rest of the GPU diagnostics report? My best guess is that RStudio has chosen to use software rendering, and unfortunately WebGL is not available when using software rendering in RStudio v1.2. |
|
Yes, your guess is right (diagnostics below). Is there a way to force it to use hardware rendering? Diagnostics: Graphics Feature Status Problems Detected Version Information Driver Information Compositor Information GpuMemoryBuffers Status Display(s) Information Video Acceleration Information Diagnostics |
|
See also these comments on the community page. Not sure this is the same issue, but it looks at least similar: |
|
You can force the use of OpenGL in Tools -> Global Options... -> General -> Advanced; e.g. see: In particular, setting Note that we explicitly disable the GPU for certain graphics cards; e.g. rstudio/src/cpp/desktop/DesktopMain.cpp Lines 340 to 346 in 6c921ab
We were forced to do this because we were seeing lots of RStudio crashes caused by (older, buggier?) Intel drives for these graphics cards. See: for a broad overview of other applications affected by this (presuming that you do indeed have one of the affected graphics cards). |
|
I don't have one of those listed cards. I'm running Windows in VirtualBox, so Windows thinks I have a "VirtualBox Graphics Adapter", while in reality in MacOS I have "Intel HD Graphics 6000". More seriously, when I made the change to force Desktop OpenGL, RStudio would immediately shut down after I started it. This made it hard to undo that change! I didn't mind blowing away my whole RStudio and RStudio-Desktop directories from /Appdata/Local and /Appdata/Roaming, and that reset it. (For next time or other users: it appears only Appdata/Roaming/RStudio was necessary.) I then tried unchecking "Use GPU Blacklist", but that still had RStudio choosing software rendering, as did unchecking both recommended options. |
|
Sorry about that. We do document how to get out of this state here: https://support.rstudio.com/hc/en-us/articles/360017886674-Troubleshooting-RStudio-Rendering-Errors but obviously that article is not particularly discoverable.
This may ultimately be the problem. I recall having to switch from Virtualbox to Parallels to get better GPU support in my virtual machines a while back. I know Virtualbox requires you to explicitly turn on 2D / 3D acceleration; if you haven't done this already, you might try this to see if it makes a difference. |
|
I've tried a few things in VirtualBox settings with no luck. Not sure if this is relevant, but running Google Chrome in VirtualBox does support WebGL, and the Advanced System settings say that it is using hardware acceleration if available. (I don't know how to ask for the equivalent of "GPU diagnostics" to find out if it thinks hardware acceleration is available and is actually using it.) |
|
RStudio does indeed use Chromium under the hood, but through Qt + QtWebEngine, which (as we've discovered) does introduce some other failure modes. We've done our best to untangle most of these, but unfortunately some issues still remain. |
In Chrome, go to page |
|
Thanks @gtritchie. Chrome is using hardware acceleration in general, and hardware accelerated WebGL. |
|
Qt WebEngine is indeed based on chromium, but one important difference is that only with 5.13 they enabled ANGLE. |
|
Retest with Electron build. |
|
Update: As we port RStudio Desktop from the Qt to Electron framework, we're hoping that the switchover resolves the issue. I believe this is working in the Electron version, based on some testing I just did. However, if you're willing to try it out, that would be very helpful. To try out Electron:
Please note that these are meant for testing and development purposes, not production. |

System details
Steps to reproduce the problem
Run this code:
Describe the problem in detail
After running
example(plot3d)an rgl window opens showing the sample plot.rglwidget()embeds this in an HTML widget to display in the viewer, but nothing appears there.If I ask the Viewer's Export menu to save as a web page, then the plot is correctly displayed when I view the page in Firefox or Chrome.
When I go into the Viewer pane and right click to select Inspect Element, then choose Console, I see this message:
Uncaught TypeError: Cannot read property 'getExtension' of
nullwith a reference to a line of the rgl widget Javascript code where the
nullappears to have come fromthis.canvas.getContext("webgl")in the rgl widget Javascript code. That indicates that WebGL is not supported in the internal browser. Previous versions of RStudio supported WebGL without this error.Describe the behavior you expected
The plot should have been displayed in the Viewer.
Diagnostics-Report
The GPU diagnostics show this (among other things):
Graphics Feature Status
The text was updated successfully, but these errors were encountered: