seurat shihny app with sp package error

Hello,
We are trying to update a Shiny app, but encountered an error with a non-descriptive message.
An error has occurred
The application failed to start.
signal: killed

The original shiny app of a Seurat single-cell object is working, but when I redeployed the exact same code and data objects, it did not work. The original build is still working. Since the shinyapp.io server was built when I created the app. I am guessing there is some kind of problem with the package version. After reviewing the logs, I found this new error message in the log file, which is bolded. It seems to indicate that functions dependent on the sp library are no longer available and suggests that the sf package will replace these. I tried to load the sf package, but that did not fix it. Everything works fine locally on my system and my trainees, so I think this is a problem with the setup of the shiny app server.

Log of the app redeployed and an error message in bold.

2024-10-21T15:10:08.844750+00:00 shinyapps[13079575]: Running on host: e81beeb164f8
2024-10-21T15:10:08.851006+00:00 shinyapps[13079575]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2024-10-21T15:10:08.856013+00:00 shinyapps[13079575]: Connect version: 2024.05.0
2024-10-21T15:10:08.861152+00:00 shinyapps[13079575]: LANG: C.UTF-8
2024-10-21T15:10:08.866338+00:00 shinyapps[13079575]: Working directory: /srv/connect/apps/testAtlas
2024-10-21T15:10:08.870798+00:00 shinyapps[13079575]: Using R 4.2.2
2024-10-21T15:10:08.875373+00:00 shinyapps[13079575]: R.home(): /opt/R/4.2.2/lib/R
2024-10-21T15:10:08.880274+00:00 shinyapps[13079575]: Content will use current R environment
2024-10-21T15:10:08.884668+00:00 shinyapps[13079575]: R_LIBS: (unset)
2024-10-21T15:10:08.889219+00:00 shinyapps[13079575]: .libPaths(): /usr/lib/R, /opt/R/4.2.2/lib/R/library
2024-10-21T15:10:08.893655+00:00 shinyapps[13079575]: shiny version: 1.7.5.1
2024-10-21T15:10:08.898178+00:00 shinyapps[13079575]: httpuv version: 1.6.11
2024-10-21T15:10:08.902482+00:00 shinyapps[13079575]: rmarkdown version: 2.25
2024-10-21T15:10:08.906723+00:00 shinyapps[13079575]: knitr version: 1.44
2024-10-21T15:10:08.911637+00:00 shinyapps[13079575]: jsonlite version: 1.8.7
2024-10-21T15:10:08.916182+00:00 shinyapps[13079575]: RJSONIO version: (none)
2024-10-21T15:10:08.920658+00:00 shinyapps[13079575]: htmltools version: 0.5.6.1
2024-10-21T15:10:08.925202+00:00 shinyapps[13079575]: reticulate version: 1.34.0
2024-10-21T15:10:08.929629+00:00 shinyapps[13079575]: Warning: The reticulate package is installed but no Python environment is available.
2024-10-21T15:10:08.934200+00:00 shinyapps[13079575]: Did you forget to set the RETICULATE_PYTHON environment variable in your .Rprofile before publishing?
2024-10-21T15:10:08.938788+00:00 shinyapps[13079575]: Using pandoc: /opt/connect/ext/pandoc/2.16
2024-10-21T15:10:08.943373+00:00 shinyapps[13079575]:
2024-10-21T15:10:08.948406+00:00 shinyapps[13079575]: Starting R with process ID: '33'
2024-10-21T15:10:08.953056+00:00 shinyapps[13079575]: Shiny application starting ...
2024-10-21T15:10:08.957253+00:00 shinyapps[13079575]:
2024-10-21T15:10:08.961604+00:00 shinyapps[13079575]: Attaching package: ‘shinyjs’
2024-10-21T15:10:08.966318+00:00 shinyapps[13079575]:
2024-10-21T15:10:08.971014+00:00 shinyapps[13079575]: The following object is masked from ‘package:shiny’:
2024-10-21T15:10:08.975499+00:00 shinyapps[13079575]:
2024-10-21T15:10:08.980065+00:00 shinyapps[13079575]: runExample
2024-10-21T15:10:08.984425+00:00 shinyapps[13079575]:
2024-10-21T15:10:08.989306+00:00 shinyapps[13079575]: The following objects are masked from ‘package:methods’:
2024-10-21T15:10:08.994284+00:00 shinyapps[13079575]:
2024-10-21T15:10:08.998860+00:00 shinyapps[13079575]: removeClass, show
2024-10-21T15:10:09.004393+00:00 shinyapps[13079575]:
2024-10-21T15:10:09.009440+00:00 shinyapps[13079575]: The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
2024-10-21T15:10:09.013892+00:00 shinyapps[13079575]: which was just loaded, were retired in October 2023.
2024-10-21T15:10:09.018405+00:00 shinyapps[13079575]: Please refer to R-spatial evolution reports for details, especially
2024-10-21T15:10:09.022987+00:00 shinyapps[13079575]: https://r-spatial.org/r/2023/05/15/evolution4.html.
2024-10-21T15:10:09.027462+00:00 shinyapps[13079575]: It may be desirable to make the sf package available;
2024-10-21T15:10:09.032475+00:00 shinyapps[13079575]: package maintainers should consider adding sf to Suggests:.
2024-10-21T15:10:09.844259+00:00 shinyapps[13079575]: Attaching SeuratObject
2024-10-21T15:10:09.849709+00:00 shinyapps[13079575]: System has not been booted with systemd as init system (PID 1). Can't operate.
2024-10-21T15:10:09.854234+00:00 shinyapps[13079575]: Failed to connect to bus: Host is down
2024-10-21T15:10:09.859212+00:00 shinyapps[13079575]: Warning in system("timedatectl", intern = TRUE) :
2024-10-21T15:10:09.864124+00:00 shinyapps[13079575]: running command 'timedatectl' had status 1
2024-10-21T15:10:09.869042+00:00 shinyapps[13079575]: ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
2024-10-21T15:10:09.875256+00:00 shinyapps[13079575]: :heavy_check_mark: dplyr 1.1.3 :heavy_check_mark: readr 2.1.4
2024-10-21T15:10:09.879908+00:00 shinyapps[13079575]: :heavy_check_mark: forcats 1.0.0 :heavy_check_mark: stringr 1.5.0
2024-10-21T15:10:09.884587+00:00 shinyapps[13079575]: :heavy_check_mark: ggplot2 3.4.4 :heavy_check_mark: tibble 3.2.1
2024-10-21T15:10:09.888879+00:00 shinyapps[13079575]: :heavy_check_mark: lubridate 1.9.3 :heavy_check_mark: tidyr 1.3.0
2024-10-21T15:10:09.893556+00:00 shinyapps[13079575]: :heavy_check_mark: purrr 1.0.2
2024-10-21T15:10:09.898275+00:00 shinyapps[13079575]: ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
2024-10-21T15:10:09.902896+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::arrange() masks plyr::arrange()
2024-10-21T15:10:09.907767+00:00 shinyapps[13079575]: :heavy_multiplication_x: purrr::compact() masks plyr::compact()
2024-10-21T15:10:09.912838+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::count() masks plyr::count()
2024-10-21T15:10:09.917357+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::desc() masks plyr::desc()
2024-10-21T15:10:09.921862+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::failwith() masks plyr::failwith()
2024-10-21T15:10:09.926522+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::filter() masks stats::filter()
2024-10-21T15:10:09.931311+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::id() masks plyr::id()
2024-10-21T15:10:09.935699+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::lag() masks stats::lag()
2024-10-21T15:10:09.940610+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::mutate() masks plyr::mutate()
2024-10-21T15:10:09.946382+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::rename() masks plyr::rename()
2024-10-21T15:10:09.950833+00:00 shinyapps[13079575]: :heavy_multiplication_x: lubridate::show() masks SeuratObject::show(), shinyjs::show(), methods::show()
2024-10-21T15:10:09.956929+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::summarise() masks plyr::summarise()
2024-10-21T15:10:09.961658+00:00 shinyapps[13079575]: :heavy_multiplication_x: dplyr::summarize() masks plyr::summarize()
2024-10-21T15:10:09.966172+00:00 shinyapps[13079575]: :information_source: Use the conflicted package (http://conflicted.r-lib.org/) to force all conflicts to become errors
2024-10-21T15:10:09.970924+00:00 shinyapps[13079575]:
2024-10-21T15:10:09.975220+00:00 shinyapps[13079575]: Attaching package: ‘DT’
2024-10-21T15:10:09.979606+00:00 shinyapps[13079575]:
2024-10-21T15:10:09.984054+00:00 shinyapps[13079575]: The following object is masked from ‘package:SeuratObject’:
2024-10-21T15:10:09.988339+00:00 shinyapps[13079575]:
2024-10-21T15:10:09.992885+00:00 shinyapps[13079575]: JS
2024-10-21T15:10:09.997186+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.001849+00:00 shinyapps[13079575]: The following object is masked from ‘package:Seurat’:
2024-10-21T15:10:10.006263+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.010855+00:00 shinyapps[13079575]: JS
2024-10-21T15:10:10.015514+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.020095+00:00 shinyapps[13079575]: The following objects are masked from ‘package:shiny’:
2024-10-21T15:10:10.024558+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.029187+00:00 shinyapps[13079575]: dataTableOutput, renderDataTable
2024-10-21T15:10:10.033943+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.038648+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.043600+00:00 shinyapps[13079575]: Attaching package: ‘ggpubr’
2024-10-21T15:10:10.047917+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.052342+00:00 shinyapps[13079575]: The following object is masked from ‘package:plyr’:
2024-10-21T15:10:10.057033+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.061477+00:00 shinyapps[13079575]: mutate
2024-10-21T15:10:10.065963+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.070232+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.074662+00:00 shinyapps[13079575]: Attaching package: ‘cowplot’
2024-10-21T15:10:10.079127+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.083609+00:00 shinyapps[13079575]: The following object is masked from ‘package:ggpubr’:
2024-10-21T15:10:10.088144+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.093385+00:00 shinyapps[13079575]: get_legend
2024-10-21T15:10:10.098361+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.103645+00:00 shinyapps[13079575]: The following object is masked from ‘package:lubridate’:
2024-10-21T15:10:10.108148+00:00 shinyapps[13079575]:
2024-10-21T15:10:10.112472+00:00 shinyapps[13079575]: stamp
2024-10-21T15:10:10.117245+00:00 shinyapps[13079575]:

Here is the log for the working version where the above error is not present

2024-10-21T13:56:13.202064+00:00 shinyapps[9106384]: Running on host: 5e8afd1742f8
2024-10-21T13:56:13.210745+00:00 shinyapps[9106384]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2024-10-21T13:56:13.215650+00:00 shinyapps[9106384]: Connect version: 2024.05.0
2024-10-21T13:56:13.220544+00:00 shinyapps[9106384]: LANG: C.UTF-8
2024-10-21T13:56:13.225418+00:00 shinyapps[9106384]: Working directory: /srv/connect/apps/placentaAtlasTool
2024-10-21T13:56:13.230265+00:00 shinyapps[9106384]: Using R 4.1.1
2024-10-21T13:56:13.235179+00:00 shinyapps[9106384]: R.home(): /opt/R/4.1.1/lib/R
2024-10-21T13:56:13.242875+00:00 shinyapps[9106384]: Content will use current R environment
2024-10-21T13:56:13.247947+00:00 shinyapps[9106384]: R_LIBS: (unset)
2024-10-21T13:56:13.252890+00:00 shinyapps[9106384]: .libPaths(): /opt/R/4.1.1/lib/R/library
2024-10-21T13:56:13.258004+00:00 shinyapps[9106384]: shiny version: 1.7.4
2024-10-21T13:56:13.262924+00:00 shinyapps[9106384]: httpuv version: 1.6.8
2024-10-21T13:56:13.268799+00:00 shinyapps[9106384]: rmarkdown version: 2.20
2024-10-21T13:56:13.273788+00:00 shinyapps[9106384]: knitr version: 1.42
2024-10-21T13:56:13.278813+00:00 shinyapps[9106384]: jsonlite version: 1.8.4
2024-10-21T13:56:13.283744+00:00 shinyapps[9106384]: RJSONIO version: (none)
2024-10-21T13:56:13.288721+00:00 shinyapps[9106384]: htmltools version: 0.5.4
2024-10-21T13:56:13.293838+00:00 shinyapps[9106384]: reticulate version: 1.28
2024-10-21T13:56:13.298824+00:00 shinyapps[9106384]: Warning: The reticulate package is installed but no Python environment is available.
2024-10-21T13:56:13.303879+00:00 shinyapps[9106384]: Did you forget to set the RETICULATE_PYTHON environment variable in your .Rprofile before publishing?
2024-10-21T13:56:13.308969+00:00 shinyapps[9106384]: Using pandoc: /opt/connect/ext/pandoc/2.16
2024-10-21T13:56:13.313872+00:00 shinyapps[9106384]:
2024-10-21T13:56:13.318660+00:00 shinyapps[9106384]: Starting R with process ID: '31'
2024-10-21T13:56:13.323652+00:00 shinyapps[9106384]: Shiny application starting ...
2024-10-21T13:56:13.328904+00:00 shinyapps[9106384]:
2024-10-21T13:56:13.334204+00:00 shinyapps[9106384]: Attaching package: ‘shinyjs’
2024-10-21T13:56:13.370996+00:00 shinyapps[9106384]:
2024-10-21T13:56:13.378817+00:00 shinyapps[9106384]: The following object is masked from ‘package:shiny’:
2024-10-21T13:56:13.384060+00:00 shinyapps[9106384]:
2024-10-21T13:56:13.393761+00:00 shinyapps[9106384]: runExample
2024-10-21T13:56:13.399047+00:00 shinyapps[9106384]:
2024-10-21T13:56:13.404040+00:00 shinyapps[9106384]: The following objects are masked from ‘package:methods’:
2024-10-21T13:56:13.409631+00:00 shinyapps[9106384]:
2024-10-21T13:56:13.414543+00:00 shinyapps[9106384]: removeClass, show
2024-10-21T13:56:13.419598+00:00 shinyapps[9106384]:
2024-10-21T13:56:17.207071+00:00 shinyapps[9106384]: Attaching SeuratObject
2024-10-21T13:56:18.202156+00:00 shinyapps[9106384]: ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
2024-10-21T13:56:18.207265+00:00 shinyapps[9106384]: :heavy_check_mark: ggplot2 3.4.1 :heavy_check_mark: purrr 1.0.1
2024-10-21T13:56:18.212272+00:00 shinyapps[9106384]: :heavy_check_mark: tibble 3.1.8 :heavy_check_mark: dplyr 1.1.0
2024-10-21T13:56:18.217336+00:00 shinyapps[9106384]: :heavy_check_mark: tidyr 1.3.0 :heavy_check_mark: stringr 1.5.0
2024-10-21T13:56:18.222337+00:00 shinyapps[9106384]: :heavy_check_mark: readr 2.1.4 :heavy_check_mark: forcats 1.0.0
2024-10-21T13:56:18.227379+00:00 shinyapps[9106384]: ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
2024-10-21T13:56:18.232535+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::arrange() masks plyr::arrange()
2024-10-21T13:56:18.237715+00:00 shinyapps[9106384]: :heavy_multiplication_x: purrr::compact() masks plyr::compact()
2024-10-21T13:56:18.242498+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::count() masks plyr::count()
2024-10-21T13:56:18.247455+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::desc() masks plyr::desc()
2024-10-21T13:56:18.252353+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::failwith() masks plyr::failwith()
2024-10-21T13:56:18.257695+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::filter() masks stats::filter()
2024-10-21T13:56:18.262837+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::id() masks plyr::id()
2024-10-21T13:56:18.268206+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::lag() masks stats::lag()
2024-10-21T13:56:18.273231+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::mutate() masks plyr::mutate()
2024-10-21T13:56:18.278210+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::rename() masks plyr::rename()
2024-10-21T13:56:18.284044+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::summarise() masks plyr::summarise()
2024-10-21T13:56:18.288879+00:00 shinyapps[9106384]: :heavy_multiplication_x: dplyr::summarize() masks plyr::summarize()
2024-10-21T13:56:18.293735+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.298639+00:00 shinyapps[9106384]: Attaching package: ‘DT’
2024-10-21T13:56:18.303630+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.308465+00:00 shinyapps[9106384]: The following object is masked from ‘package:SeuratObject’:
2024-10-21T13:56:18.313293+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.318139+00:00 shinyapps[9106384]: JS
2024-10-21T13:56:18.323112+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.328004+00:00 shinyapps[9106384]: The following object is masked from ‘package:Seurat’:
2024-10-21T13:56:18.333773+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.338683+00:00 shinyapps[9106384]: JS
2024-10-21T13:56:18.343587+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.348453+00:00 shinyapps[9106384]: The following objects are masked from ‘package:shiny’:
2024-10-21T13:56:18.353210+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.358114+00:00 shinyapps[9106384]: dataTableOutput, renderDataTable
2024-10-21T13:56:18.362961+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.367911+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.372894+00:00 shinyapps[9106384]: Attaching package: ‘ggpubr’
2024-10-21T13:56:18.377909+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.382749+00:00 shinyapps[9106384]: The following object is masked from ‘package:plyr’:
2024-10-21T13:56:18.387557+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.392611+00:00 shinyapps[9106384]: mutate
2024-10-21T13:56:18.397911+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.403122+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.408527+00:00 shinyapps[9106384]: Attaching package: ‘cowplot’
2024-10-21T13:56:18.414780+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.419440+00:00 shinyapps[9106384]: The following object is masked from ‘package:ggpubr’:
2024-10-21T13:56:18.424321+00:00 shinyapps[9106384]:
2024-10-21T13:56:18.428945+00:00 shinyapps[9106384]: get_legend
2024-10-21T13:56:18.433779+00:00 shinyapps[9106384]:
2024-10-21T13:56:27.207444+00:00 shinyapps[9106384]: Warning in asMethod(object) :
2024-10-21T13:56:27.214023+00:00 shinyapps[9106384]: sparse->dense coercion: allocating vector of size 2.5 GiB
2024-10-21T13:56:34.202465+00:00 shinyapps[9106384]: Warning in asMethod(object) :
2024-10-21T13:56:34.207614+00:00 shinyapps[9106384]: sparse->dense coercion: allocating vector of size 2.5 GiB
2024-10-21T13:56:36.202107+00:00 shinyapps[9106384]:
2024-10-21T13:56:36.207191+00:00 shinyapps[9106384]: Listening on http://127.0.0.1:35461
2024-10-21T13:56:42.207473+00:00 shinyapps[9106384]: Warning in FetchData.Seurat(object = object, vars = c(dims, "ident", features), :
2024-10-21T13:56:42.212670+00:00 shinyapps[9106384]: The following requested variables were not found:
2024-10-21T13:56:42.217536+00:00 shinyapps[9106384]: Warning in FetchData.Seurat(object = object, vars = c(dims, "ident", features), :
2024-10-21T13:56:42.222322+00:00 shinyapps[9106384]: The following requested variables were not found: