shiny failed to plot - graphics API incompatible

Since recent update, all my shiny applications failed to plot and instead of the plot, this message is displayed:
An error has occurred. Check your logs or contact the app author for clarification.

The log of a minimal application (see below) shows:
Listening on
Avis : Error in : Version de l'API graphiques incompatible
127: startPNG
126: drawPlot
112: reactive:plotObj
96: drawReactive
83: renderFunc
82: output$Plot
1: runApp

It seems to be due to incompatible version of graphics API between R and shiny but I don't find how to solve the problem. R, shiny and shiny package are all at the most recent version.

I reinstall R 4.2.1, Rstudio, shiny package and shiny server on an Ubuntu 20.04 server and the same error occurs.

The shiny app is:
__. ui.R

___. server.R
function(input, output) {
output$Plot <- renderPlot({
plot(1, 1)

It is available here:

The versions are (all were reinstalled):

platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
major 4
minor 2.1
year 2022
month 06
day 23
svn rev 82513
language R
version.string R version 4.2.1 (2022-06-23)
nickname Funny-Looking Kid

To cite RStudio in publications use:

RStudio Team (2022). RStudio: Integrated Development Environment for R.
RStudio, PBC, Boston, MA URL

Une entrée BibTeX pour les utilisateurs LaTeX est

title = {RStudio: Integrated Development Environment for R},
author = {{RStudio Team}},
organization = {RStudio, PBC},
address = {Boston, MA},
year = {2022},
url = {},

[1] "server"

[1] ‘2022.7.1.554’

[1] "2022.07.1+554"

[1] "Spotted Wakerobin"

[1] ‘1.7.2’
system('shiny-server --version', intern = TRUE)
[1] "Shiny Server v1.5.18.987" "Node.js v16.14.0"

I have uninstalled R and all the packages and reinstalled everything and now it works.
So the main conclusion is that when you reinstall R using apt, it does not really reinstall R as a first installation.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.