Tidyverse 2.0.0 causes segmentation faults when publishing Shiny apps to Shinyapps.io or Posit Connect Cloud

See code below. Publish this app and it will fail due to segmentation fault. Seems to be due to the conflict checker that runs when tidyverse loads.

library(tidyverse)
library(shiny)


ui <- fluidPage(
  textOutput("text")
)

server <- function(input, output, session) {
  
  output$text <- renderText({
    rep(10, 10) |>
      map(sample, 5) |>
      keep(\(x) mean(x) > 6) |>
      unlist()
  })
  
}

shinyApp(ui, server)

Beginning of error log on shinyapps.io:

2026-07-24T14:17:53.943577+00:00 shinyapps[17638657]: Container event from container-14116816: start
2026-07-24T14:17:54.939234+00:00 shinyapps[17638657]: Running on host: ea09e8372a5e
2026-07-24T14:17:54.944171+00:00 shinyapps[17638657]: Process ID: 27
2026-07-24T14:17:54.948958+00:00 shinyapps[17638657]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2026-07-24T14:17:54.954787+00:00 shinyapps[17638657]: Connect version: 2026.01.1
2026-07-24T14:17:54.959602+00:00 shinyapps[17638657]: LANG: C.UTF-8
2026-07-24T14:17:54.965498+00:00 shinyapps[17638657]: Working directory: /srv/connect/apps/Purrr_Bug_Demo
2026-07-24T14:17:54.970375+00:00 shinyapps[17638657]: Using R 4.6.1
2026-07-24T14:17:54.975544+00:00 shinyapps[17638657]: R.home(): /opt/R/4.6.1/lib/R
2026-07-24T14:17:54.980474+00:00 shinyapps[17638657]: Content will use current R environment
2026-07-24T14:17:54.985028+00:00 shinyapps[17638657]: R_LIBS: (unset)
2026-07-24T14:17:54.991410+00:00 shinyapps[17638657]: .libPaths(): /usr/lib/R, /opt/R/4.6.1/lib/R/library
2026-07-24T14:17:54.996344+00:00 shinyapps[17638657]: shiny version: 1.14.0
2026-07-24T14:17:55.001305+00:00 shinyapps[17638657]: httpuv version: 1.6.17
2026-07-24T14:17:55.005814+00:00 shinyapps[17638657]: rmarkdown version: (none)
2026-07-24T14:17:55.010639+00:00 shinyapps[17638657]: knitr version: (none)
2026-07-24T14:17:55.015069+00:00 shinyapps[17638657]: jsonlite version: 2.0.0
2026-07-24T14:17:55.019747+00:00 shinyapps[17638657]: RJSONIO version: (none)
2026-07-24T14:17:55.024552+00:00 shinyapps[17638657]: htmltools version: 0.5.9
2026-07-24T14:17:55.029314+00:00 shinyapps[17638657]: reticulate version: (none)
2026-07-24T14:17:55.034048+00:00 shinyapps[17638657]: Using pandoc: /opt/connect/ext/pandoc/2.16
2026-07-24T14:17:55.038767+00:00 shinyapps[17638657]: Shiny application starting ...
2026-07-24T14:17:55.043452+00:00 shinyapps[17638657]: 
2026-07-24T14:17:55.047825+00:00 shinyapps[17638657]: Listening on http://127.0.0.1:36527
2026-07-24T14:28:52.820798+00:00 shinyapps[17638657]: Container event from container-14116851: start
2026-07-24T14:28:55.771551+00:00 shinyapps[17638657]: Running on host: f6609ad8ea37
2026-07-24T14:28:55.777682+00:00 shinyapps[17638657]: Process ID: 27
2026-07-24T14:28:55.783866+00:00 shinyapps[17638657]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2026-07-24T14:28:55.790596+00:00 shinyapps[17638657]: Connect version: 2026.01.1
2026-07-24T14:28:55.796707+00:00 shinyapps[17638657]: LANG: C.UTF-8
2026-07-24T14:28:55.803831+00:00 shinyapps[17638657]: Working directory: /srv/connect/apps/Purrr_Bug_Demo
2026-07-24T14:28:55.810271+00:00 shinyapps[17638657]: Using R 4.6.1
2026-07-24T14:28:55.816665+00:00 shinyapps[17638657]: R.home(): /opt/R/4.6.1/lib/R
2026-07-24T14:28:55.822666+00:00 shinyapps[17638657]: Content will use current R environment
2026-07-24T14:28:55.828817+00:00 shinyapps[17638657]: R_LIBS: (unset)
2026-07-24T14:28:55.835545+00:00 shinyapps[17638657]: .libPaths(): /usr/lib/R, /opt/R/4.6.1/lib/R/library
2026-07-24T14:28:55.841851+00:00 shinyapps[17638657]: shiny version: 1.14.0
2026-07-24T14:28:55.850312+00:00 shinyapps[17638657]: httpuv version: 1.6.17
2026-07-24T14:28:55.856869+00:00 shinyapps[17638657]: rmarkdown version: (none)
2026-07-24T14:28:55.863056+00:00 shinyapps[17638657]: knitr version: (none)
2026-07-24T14:28:55.869138+00:00 shinyapps[17638657]: jsonlite version: 2.0.0
2026-07-24T14:28:55.875290+00:00 shinyapps[17638657]: RJSONIO version: (none)
2026-07-24T14:28:55.882522+00:00 shinyapps[17638657]: htmltools version: 0.5.9
2026-07-24T14:28:55.889314+00:00 shinyapps[17638657]: reticulate version: (none)
2026-07-24T14:28:55.895665+00:00 shinyapps[17638657]: Using pandoc: /opt/connect/ext/pandoc/2.16
2026-07-24T14:28:55.902121+00:00 shinyapps[17638657]: Shiny application starting ...
2026-07-24T14:28:55.908830+00:00 shinyapps[17638657]: 
2026-07-24T14:28:55.928596+00:00 shinyapps[17638657]: Listening on http://127.0.0.1:39327
2026-07-24T14:29:00.778368+00:00 shinyapps[17638657]: Running on host: f6609ad8ea37
2026-07-24T14:29:00.786845+00:00 shinyapps[17638657]: Process ID: 44
2026-07-24T14:29:00.793174+00:00 shinyapps[17638657]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2026-07-24T14:29:00.799217+00:00 shinyapps[17638657]: Connect version: 2026.01.1
2026-07-24T14:29:00.805165+00:00 shinyapps[17638657]: LANG: C.UTF-8
2026-07-24T14:29:00.811265+00:00 shinyapps[17638657]: Working directory: /srv/connect/apps/Purrr_Bug_Demo
2026-07-24T14:29:00.818058+00:00 shinyapps[17638657]: Using R 4.6.1
2026-07-24T14:29:00.824560+00:00 shinyapps[17638657]: R.home(): /opt/R/4.6.1/lib/R
2026-07-24T14:29:00.831023+00:00 shinyapps[17638657]: Content will use current R environment
2026-07-24T14:29:00.837556+00:00 shinyapps[17638657]: R_LIBS: (unset)
2026-07-24T14:29:00.843437+00:00 shinyapps[17638657]: .libPaths(): /usr/lib/R, /opt/R/4.6.1/lib/R/library
2026-07-24T14:29:00.849679+00:00 shinyapps[17638657]: shiny version: 1.14.0
2026-07-24T14:29:00.856114+00:00 shinyapps[17638657]: httpuv version: 1.6.17
2026-07-24T14:29:00.862163+00:00 shinyapps[17638657]: rmarkdown version: (none)
2026-07-24T14:29:00.870674+00:00 shinyapps[17638657]: knitr version: (none)
2026-07-24T14:29:00.876838+00:00 shinyapps[17638657]: jsonlite version: 2.0.0
2026-07-24T14:29:00.883422+00:00 shinyapps[17638657]: RJSONIO version: (none)
2026-07-24T14:29:00.890821+00:00 shinyapps[17638657]: htmltools version: 0.5.9
2026-07-24T14:29:00.899302+00:00 shinyapps[17638657]: reticulate version: (none)
2026-07-24T14:29:00.905482+00:00 shinyapps[17638657]: Using pandoc: /opt/connect/ext/pandoc/2.16
2026-07-24T14:29:01.781033+00:00 shinyapps[17638657]: Shiny application starting ...
2026-07-24T14:29:01.787082+00:00 shinyapps[17638657]: 
2026-07-24T14:29:01.793002+00:00 shinyapps[17638657]: Listening on http://127.0.0.1:46863
2026-07-24T14:32:22.801463+00:00 shinyapps[17638657]: Container event from container-14116872: start
2026-07-24T14:32:23.798566+00:00 shinyapps[17638657]: Running on host: 923df91e38f8
2026-07-24T14:32:23.804372+00:00 shinyapps[17638657]: Process ID: 27
2026-07-24T14:32:23.810305+00:00 shinyapps[17638657]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2026-07-24T14:32:23.815890+00:00 shinyapps[17638657]: Connect version: 2026.01.1
2026-07-24T14:32:23.821551+00:00 shinyapps[17638657]: LANG: C.UTF-8
2026-07-24T14:32:23.827248+00:00 shinyapps[17638657]: Working directory: /srv/connect/apps/Purrr_Bug_Demo
2026-07-24T14:32:23.833335+00:00 shinyapps[17638657]: Using R 4.6.1
2026-07-24T14:32:23.839203+00:00 shinyapps[17638657]: R.home(): /opt/R/4.6.1/lib/R
2026-07-24T14:32:23.845140+00:00 shinyapps[17638657]: Content will use current R environment
2026-07-24T14:32:23.850880+00:00 shinyapps[17638657]: R_LIBS: (unset)
2026-07-24T14:32:23.856662+00:00 shinyapps[17638657]: .libPaths(): /usr/lib/R, /opt/R/4.6.1/lib/R/library
2026-07-24T14:32:23.862431+00:00 shinyapps[17638657]: shiny version: 1.14.0
2026-07-24T14:32:23.867982+00:00 shinyapps[17638657]: httpuv version: 1.6.17
2026-07-24T14:32:23.873747+00:00 shinyapps[17638657]: rmarkdown version: 2.31
2026-07-24T14:32:23.879402+00:00 shinyapps[17638657]: knitr version: 1.51
2026-07-24T14:32:23.885185+00:00 shinyapps[17638657]: jsonlite version: 2.0.0
2026-07-24T14:32:23.890749+00:00 shinyapps[17638657]: RJSONIO version: (none)
2026-07-24T14:32:23.896562+00:00 shinyapps[17638657]: htmltools version: 0.5.9
2026-07-24T14:32:23.903333+00:00 shinyapps[17638657]: reticulate version: (none)
2026-07-24T14:32:23.909084+00:00 shinyapps[17638657]: Using pandoc: /opt/connect/ext/pandoc/2.16
2026-07-24T14:32:23.915235+00:00 shinyapps[17638657]: Shiny application starting ...
2026-07-24T14:32:24.798269+00:00 shinyapps[17638657]: ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
2026-07-24T14:32:24.804313+00:00 shinyapps[17638657]: ✔ dplyr     1.2.1     ✔ readr     2.2.0
2026-07-24T14:32:24.810102+00:00 shinyapps[17638657]: ✔ forcats   1.0.0     ✔ stringr   1.6.0
2026-07-24T14:32:24.815892+00:00 shinyapps[17638657]: ✔ ggplot2   4.0.3     ✔ tibble    3.2.1
2026-07-24T14:32:24.821741+00:00 shinyapps[17638657]: ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
2026-07-24T14:32:24.827739+00:00 shinyapps[17638657]: ✔ purrr     1.2.2     
2026-07-24T14:32:24.833404+00:00 shinyapps[17638657]: 
2026-07-24T14:32:24.840039+00:00 shinyapps[17638657]:  *** caught segfault ***
2026-07-24T14:32:24.864424+00:00 shinyapps[17638657]: address 0x3b02d418, cause 'memory not mapped'
2026-07-24T14:32:24.870060+00:00 shinyapps[17638657]: 
2026-07-24T14:32:24.875617+00:00 shinyapps[17638657]: Traceback:
2026-07-24T14:32:24.881834+00:00 shinyapps[17638657]:  1: packages %>% purrr::map(~get(name, pos = .)) %>% purrr::keep(is.function)
1 Like

(hello again!) Thank you for reporting - we'll update as soon as we have an update.

1 Like

Hello there,

It seems the process is dying while loading tidyverse itself, before server ever runs.
The traceback is tidyverse's internal "Conflicts" check that runs on library(tidyverse). The caught segfault … memory not mapped is low-level memory fault in purrr's C code. purrr links against rlang, vctrs, and cli at the C level, and a segfault here almost always means those compiled packages are out of sync in the deployed library (purrr built against different versions than the ones installed).

I'd recommend rebuilding the library as one consistent set rather than patching single packages, so it restores fresh from a single snapshot (all built for R 4.6.x), and clear any stale package cache.

If it still crashes after a clean redeploy, send the output of the check above plus sessionInfo().

Thank you for your patience!

I was able to deploy that sample app successfully to Posit Connect Cloud. Would that work in the meantime?

thanks
sam

Actually, it deployed successfully for me to shinyapps.io as well.

Yes, this is basically what AI was telling me. I was unsuccessful trying to follow its advice to use renv. I think all my packages are updated. RE: comment below - I also get the segmentation fault publishing on Posit Connect. I have pasted results of sessionInfo() below for my actual app that I am trying to publish, not the sample. I am using rlang 1.3.0, vctrs 0.7.3, cli 3.6.6.

> sessionInfo()
R version 4.6.1 (2026-06-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/New_York
tzcode source: internal

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

other attached packages:
 [1] forcats_1.0.0   tibble_3.2.1    tidyverse_2.0.0 AzureAuth_1.3.4 standby_0.2.0   bsicons_0.1.2   bslib_0.11.0    plotly_4.12.1   reactable_0.4.5 DT_0.34.0      
[11] shinyjs_2.1.1   janitor_2.2.1   openxlsx_4.2.8  glue_1.8.0      lubridate_1.9.5 readr_2.2.0     stringr_1.6.0   tidyr_1.3.2     ggplot2_4.0.3   dplyr_1.2.1    
[21] purrr_1.2.2     jsonlite_2.0.0  httr_1.4.8      shiny_1.14.0   

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.1   viridisLite_0.4.3  farver_2.1.2       S7_0.2.2           fastmap_1.2.0      promises_1.5.0     digest_0.6.37      timechange_0.4.0  
 [9] mime_0.13          lifecycle_1.0.5    sf_1.1-1           magrittr_2.0.3     compiler_4.6.1     rlang_1.3.0        sass_0.4.10        tools_4.6.1       
[17] yaml_2.3.12        data.table_1.18.4  askpass_1.2.1      htmlwidgets_1.6.4  bit_4.6.0          classInt_0.4-11    curl_7.1.0         RColorBrewer_1.1-3
[25] rsconnect_1.10.1   KernSmooth_2.23-26 jose_2.0.0         withr_3.0.3        grid_4.6.1         xtable_1.8-8       e1071_1.7-16       scales_1.4.0      
[33] dichromat_2.0-0.1  cli_3.6.6          crayon_1.5.3       generics_0.1.4     otel_0.2.0         rstudioapi_0.19.0  tzdb_0.5.0         DBI_1.3.0         
[41] cachem_1.1.0       proxy_0.4-29       parallel_4.6.1     vctrs_0.7.3        hms_1.1.4          bit64_4.8.2        crosstalk_1.2.2    fontawesome_0.5.3 
[49] jquerylib_0.1.4    units_1.0-1        reactR_0.6.1       stringi_1.8.7      gtable_0.3.6       later_1.4.8        pillar_1.11.1      rappdirs_0.3.4    
[57] htmltools_0.5.9    openssl_2.4.2      R6_2.6.1           httr2_1.3.0        vroom_1.7.1        memoise_2.0.1      snakecase_0.11.1   httpuv_1.6.17     
[65] class_7.3-23       Rcpp_1.1.2         zip_3.0.1          fs_2.1.0           pkgconfig_2.0.3 

Hi -
Any progress on the Posit end with this one? If not, could you please explain what you mean by "rebuilding the library as one consistent set" and clearing the package cache?

Hello there,

Apologizes for the delay. Could you share your app's manifest.json from the failing deploy and the complete deployment log? That will be helpful in figuring out what's wrong.

Rebuilding the library means clearing the library and reinstalling everything in a single pass from one renv.lockor manifest.json snapshot. Clearing the package cache will force a re-installation and recompiling to make sure no stale binaries are being picked up and used accidentally.

In the meantime, I'm looping in a colleague who can help dig into this further, and we'll follow up. Thank you for your patience!

Here is the shinyapps.io log

Here is the manifest.json

Hi -
This morning I deleted and re-installed this list of packages and I am now able to publish the app successfully on shinyapps.io!

install.packages(c("tidyverse", "DBI", "haven", "httr", "readxl", "googlesheets4", "googledrive", "rvest", "jsonlite", "xml2", "magrittr", "glue"))
2 Likes

Thanks for the detailed explanation. Your assessment makes sense, especially since the crash happens during library(tidyverse) before the application starts. A mismatch between compiled packages such as purrr, rlang, vctrs, and cli is definitely a plausible cause of a low-level segfault.

I'll try rebuilding the library from a single, clean snapshot for the same R 4.6.x environment and clear any cached packages before redeploying. If the issue persists after that, I'll share the results of the checks along with sessionInfo() so we can investigate further.

I appreciate the guidance and will report back with the outcome.

Upgrading to tidyverse 2.0.0 triggers segmentation faults and app crashes when deploying to Shiny apps or Posit Connect Cloud dew to low-level package conflicts. Developers must roll back to earlier versions to ensure cloud application stability.

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.