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 http://127.0.0.1:44691
Avis : Error in : Version de l'API graphiques incompatible
129:
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
library(shiny)
fluidPage(
plotOutput("Plot")
)

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

It is available here:
http://134.158.74.46/plot/

The versions are (all were reinstalled):

R.version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
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
RStudio.Version()
$citation

To cite RStudio in publications use:

RStudio Team (2022). RStudio: Integrated Development Environment for R.
RStudio, PBC, Boston, MA URL http://www.rstudio.com/.

Une entrée BibTeX pour les utilisateurs LaTeX est

@Manual{,
title = {RStudio: Integrated Development Environment for R},
author = {{RStudio Team}},
organization = {RStudio, PBC},
address = {Boston, MA},
year = {2022},
url = {http://www.rstudio.com/},
}

$mode
[1] "server"

$version
[1] ‘2022.7.1.554’

$long_version
[1] "2022.07.1+554"

$release_name
[1] "Spotted Wakerobin"

packageVersion("shiny")
[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.