nx10 / httpgd

Asynchronous http server graphics device for R.
https://nx10.github.io/httpgd
GNU General Public License v2.0
398 stars 19 forks source link

When I open the external browser, ggplot2 in vscode always encounters depth error. #184

Open qikongwanli opened 6 months ago

qikongwanli commented 6 months ago

Describe the bug

Whenever I launch the external browser to view the figures, ggplot2 in VSCode consistently runs into depth errors or fails to generate a figure. Yet, these errors disappear once I close the external browser

To Reproduce

(Write your answer here.)

Expected behavior

(Write your answer here.)

Screenshots

(Write your answer here.)

Environment

Additional context

(Write your answer here.)

nx10 commented 6 months ago

Could you post your ggplot2 version, the error message or a screenshot of what's going wrong?

qikongwanli commented 6 months ago

Could you post your ggplot2 version, the error message or a screenshot of what's going wrong?

I use the latest version of ggplot2 (v3.5.1). Depth error of ggplot2 seems to be becoming common when I open external browser to view the figures. Thank you!

jackchenry commented 6 months ago

I have been getting the same error.

Error in UseMethod("depth") : no applicable method for 'depth' applied to an object of class "NULL"

I used to get it occasionally but now its for every ggplot. Also not just in the external browser, in vscode R plot viewer too.

nx10 commented 6 months ago

This might be a ggplot2 bug: https://github.com/tidyverse/ggplot2/issues/3538

johnnymdoubleu commented 6 months ago

I have been getting the same error.

Error in UseMethod("depth") : no applicable method for 'depth' applied to an object of class "NULL"

I used to get it occasionally but now its for every ggplot. Also not just in the external browser, in vscode R plot viewer too.

Same error was detected using gridExtra::grid.arrange().

My versions are, R-4.4.0. ggplot2-3.5.1 gridExtra-2.3 vscode - 1.89.1

teunbrand commented 6 months ago

This might be a ggplot2 bug: https://github.com/tidyverse/ggplot2/issues/3538

That was not a ggplot2 bug. Maybe these comments from Paul Murrell might be helpful in diagnosing the issue:

sofiabiffi commented 6 months ago

Just flagging that I also have the same issue (R version: 4.3.3, httpgd version: 2.0.1, vscode: 1.89.0, ggplot2: 3.5.1).