Viewer stays blank after running a code, but "Export -> Save as web page" works.

Version 1.2.5042

I started with a leaflet but it doesn't work for plotly either. Viewer Pane stays blank, "show in a new window" doesn't help also.
But when I go to "Export -> Save as web page" and then run HTML file in web browser everything is ok.


library(leaflet)
popup = c("Robin", "Jakub", "Jannes")
leaflet() %>%
  addProviderTiles("NASAGIBS.ViirsEarthAtNight2012") %>%
  addMarkers(lng = c(-3, 23, 11),
             lat = c(52, 53, 49), 
             popup = popup)

Diagnostics Report:

[1] "1.2.5042"

$R
[1] "C:\\PROGRA~1\\R\\R-40~1.0\\bin\\x64\\R.exe"

$pdflatex
[1] ""

$bibtex
[1] ""

$gcc
[1] ""

$git
[1] "C:\\PROGRA~1\\Git\\cmd\\git.exe"

$svn
[1] ""

R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_Netherlands.1252  LC_CTYPE=English_Netherlands.1252    LC_MONETARY=English_Netherlands.1252
[4] LC_NUMERIC=C                         LC_TIME=English_Netherlands.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.0 tools_4.0.0   

SysInfo:
          sysname           release           version          nodename           machine             login              user 
        "Windows"          "10 x64"     "build 18363" "DESKTOP-L8O7N9E"          "x86-64"            "JanR"            "JanR" 
   effective_user 
           "JanR" 

R Version:
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          4                           
minor          0.0                         
year           2020                        
month          04                          
day            24                          
svn rev        78286                       
language       R                           
version.string R version 4.0.0 (2020-04-24)
nickname       Arbor Day                   
$ALLUSERSPROFILE
[1] "C:\\ProgramData"

$APPDATA
[1] "C:\\Users\\JanR\\AppData\\Roaming"

$CLICOLOR_FORCE
[1] "1"

$CommonProgramFiles
[1] "C:\\Program Files\\Common Files"

$`CommonProgramFiles(x86)`
[1] "C:\\Program Files (x86)\\Common Files"

$CommonProgramW6432
[1] "C:\\Program Files\\Common Files"

$COMPUTERNAME
[1] "DESKTOP-L8O7N9E"

$ComSpec
[1] "C:\\Windows\\system32\\cmd.exe"

$DISPLAY
[1] ":0"

$DriverData
[1] "C:\\Windows\\System32\\Drivers\\DriverData"

$FPS_BROWSER_APP_PROFILE_STRING
[1] "Internet Explorer"

$FPS_BROWSER_USER_PROFILE_STRING
[1] "Default"

$GFORTRAN_STDERR_UNIT
[1] "-1"

$GFORTRAN_STDOUT_UNIT
[1] "-1"

$HOME
[1] "C:\\Users\\JanR\\Documents"

$HOMEDRIVE
[1] "C:"

$HOMEPATH
[1] "\\Users\\JanR"

$LOCALAPPDATA
[1] "C:\\Users\\JanR\\AppData\\Local"

$LOGONSERVER
[1] "\\\\DESKTOP-L8O7N9E"

$MPLENGINE
[1] "tkAgg"

$MSYS2_ENV_CONV_EXCL
[1] "R_ARCH"

$NUMBER_OF_PROCESSORS
[1] "8"

$OneDrive
[1] "C:\\Users\\JanR\\OneDrive"

$OS
[1] "Windows_NT"

$PATH
[1] "C:\\Program Files\\R\\R-4.0.0\\bin\\x64;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Users\\JanR\\anaconda3;C:\\Users\\JanR\\anaconda3\\Library\\mingw-w64\\bin;C:\\Users\\JanR\\anaconda3\\Library\\usr\\bin;C:\\Users\\JanR\\anaconda3\\Library\\bin;C:\\Users\\JanR\\anaconda3\\Scripts;C:\\Users\\JanR\\AppData\\Local\\Microsoft\\WindowsApps"

$PATHEXT
[1] ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"

$PROCESSOR_ARCHITECTURE
[1] "AMD64"

$PROCESSOR_IDENTIFIER
[1] "Intel64 Family 6 Model 142 Stepping 12, GenuineIntel"

$PROCESSOR_LEVEL
[1] "6"

$PROCESSOR_REVISION
[1] "8e0c"

$ProgramData
[1] "C:\\ProgramData"

$ProgramFiles
[1] "C:\\Program Files"

$`ProgramFiles(x86)`
[1] "C:\\Program Files (x86)"

$ProgramW6432
[1] "C:\\Program Files"

$PSModulePath
[1] "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules"

$PUBLIC
[1] "C:\\Users\\Public"

$QT_D3DCREATE_MULTITHREADED
[1] "1"

$R_ARCH
[1] "/x64"

$R_COMPILED_BY
[1] "gcc 8.3.0"

$R_DOC_DIR
[1] "C:/PROGRA~1/R/R-40~1.0/doc"

$R_HOME
[1] "C:/PROGRA~1/R/R-40~1.0"

$R_LIBS_USER
[1] "C:/Users/JanR/Documents/R/win-library/4.0"

$R_USER
[1] "C:/Users/JanR/Documents"

$RMARKDOWN_MATHJAX_PATH
[1] "C:/Program Files/RStudio/resources/mathjax-26"

$RS_LOCAL_PEER
[1] "\\\\.\\pipe\\30019-rsession"

$RS_RPOSTBACK_PATH
[1] "C:/Program Files/RStudio/bin/rpostback"

$RS_SHARED_SECRET
[1] "63341846741"

$RSTUDIO
[1] "1"

$RSTUDIO_CONSOLE_COLOR
[1] "256"

$RSTUDIO_CONSOLE_WIDTH
[1] "80"

$RSTUDIO_MSYS_SSH
[1] "C:/Program Files/RStudio/bin/msys-ssh-1000-18"

$RSTUDIO_PANDOC
[1] "C:/Program Files/RStudio/bin/pandoc"

$RSTUDIO_SESSION_PORT
[1] "30019"

$RSTUDIO_USER_IDENTITY
[1] "JanR"

$RSTUDIO_WINUTILS
[1] "C:/Program Files/RStudio/bin/winutils"

$SESSIONNAME
[1] "Console"

$SystemDrive
[1] "C:"

$SystemRoot
[1] "C:\\Windows"

$TEMP
[1] "C:\\Users\\JanR\\AppData\\Local\\Temp"

$TERM
[1] "xterm-256color"

$TMP
[1] "C:\\Users\\JanR\\AppData\\Local\\Temp"

$USERDOMAIN
[1] "DESKTOP-L8O7N9E"

$USERDOMAIN_ROAMINGPROFILE
[1] "DESKTOP-L8O7N9E"

$USERNAME
[1] "JanR"

$USERPROFILE
[1] "C:\\Users\\JanR"

$windir
[1] "C:\\Windows"

 [1] ".GlobalEnv"        "tools:rstudio"     "package:stats"     "package:graphics"  "package:grDevices" "package:utils"    
 [7] "package:datasets"  "package:methods"   "Autoloads"         "package:base"     
Log file: rdesktop.log
--------------------------------------------------

01 May 2020 11:14:31 [rdesktop] ERROR system error 2 (The system cannot find the file specified); OCCURRED AT: auto __cdecl rstudio::core::system::ChildProcess::run::<lambda_1803a13b985ab42b5095d14577da4f75>::operator ()(void) const C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\core\system\Win32ChildProcess.cpp:546; LOGGED FROM: void __cdecl rstudio::desktop::openUrl(const class QUrl &) C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\desktop\DesktopUtils.cpp:381

Log file: rsession-JanR.log
--------------------------------------------------

01 May 2020 11:20:04 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
07 May 2020 12:41:31 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
07 May 2020 16:09:07 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
08 May 2020 07:05:07 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
08 May 2020 11:52:54 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
08 May 2020 15:12:23 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
08 May 2020 15:29:08 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116
08 May 2020 17:26:00 [rsession-JanR] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri=/events/get_events]; OCCURRED AT: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:111; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) c:\jenkins\workspace\ide\windows-v1.2\src\cpp\session\http\SessionHttpConnectionImpl.hpp:116


I have the same issue after the upgrade to R 4.0.0 and RStudio 1.2.5042, but with tmap and mapview (which rely on leaflet, I believe). The maintainer of tmap has concluded that it is an RStudio issue (see comments on his github).

I've tried tmap's view mode from outside RStudio, using the standard console, and it brings up a browser as expected. This is consistent with JanR's experience on exporting to html.

Session info:
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] tmap_3.0 mapview_2.7.8 sf_0.9-2

loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 compiler_4.0.0 RColorBrewer_1.1-2 base64enc_0.1-3 class_7.3-16 tools_4.0.0
[7] digest_0.6.25 satellite_1.0.2 lifecycle_0.2.0 lattice_0.20-41 viridisLite_0.3.0 png_0.1-7
[13] rlang_0.4.5 DBI_1.1.0 crosstalk_1.1.0.1 parallel_4.0.0 e1071_1.7-3 raster_3.1-5
[19] htmlwidgets_1.5.1 stats4_4.0.0 classInt_0.4-3 leaflet_2.0.3 grid_4.0.0 webshot_0.5.2
[25] R6_2.4.1 XML_3.99-0.3 sp_1.4-1 magrittr_1.5 tmaptools_3.0 scales_1.1.0
[31] codetools_0.2-16 stars_0.4-1 htmltools_0.4.0 leafsync_0.1.0 units_0.6-6 dichromat_2.0-0
[37] abind_1.4-5 colorspace_1.4-1 KernSmooth_2.23-16 munsell_0.5.0 lwgeom_0.2-3 leafem_0.1.1

Thanks for sharing that!
In Github comments I found that:

See rstudio/rstudio#6737
" This problem appears to be resolved after upgrading to the latest RStudio preview: RStudio v1.3.957-1"

It works perfectly!

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