Error in if (tolower(source) %in% c("github", "bitbucket", "source")) { : argument is of length zero

I can run my app locally. when I try to deploy, i get

Preparing to deploy application...DONE
Uploading bundle for application: 2991569...Error in if (tolower(source) %in% c("github", "bitbucket", "source")) { : 
  argument is of length zero
Calls: <Anonymous> ... createAppManifest -> snapshotDependencies -> lapply -> FUN
In addition: Warning message:
Unable to package DESCRIPTION files: subscript out of bounds 
Execution halted

This seems to be related to

But I don't find solutions there.

i have updated all my packages

> sessionInfo()
R version 4.0.1 (2020-06-06)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] mailR_0.4.1     reshape2_1.4.4  forcats_0.5.0   stringr_1.4.0   dplyr_1.0.2     purrr_0.3.4     readr_1.4.0     tidyr_1.1.2    
 [9] tibble_3.0.3    ggplot2_3.3.2   tidyverse_1.3.0 readxl_1.3.1    shiny_1.5.0    

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5        lubridate_1.7.9   lattice_0.20-41   assertthat_0.2.1  digest_0.6.25     packrat_0.5.0     mime_0.9         
 [8] R6_2.4.1          cellranger_1.1.0  plyr_1.8.6        backports_1.1.10  reprex_0.3.0      httr_1.4.2        pillar_1.4.6     
[15] rlang_0.4.8       curl_4.3          rstudioapi_0.11   blob_1.2.1        R.oo_1.24.0       R.utils_2.10.1    labeling_0.3     
[22] munsell_0.5.0     broom_0.7.1       compiler_4.0.1    httpuv_1.5.4      modelr_0.1.8      pkgconfig_2.0.3   askpass_1.1      
[29] htmltools_0.5.0   openssl_1.4.3     tidyselect_1.1.0  fansi_0.4.1       crayon_1.3.4      dbplyr_1.4.4      withr_2.3.0      
[36] later_1.1.0.1     R.methodsS3_1.8.1 grid_4.0.1        nlme_3.1-149      jsonlite_1.7.1    xtable_1.8-4      gtable_0.3.0     
[43] lifecycle_0.2.0   DBI_1.1.0         magrittr_1.5      scales_1.1.1      cli_2.0.2         stringi_1.5.3     renv_0.12.0      
[50] farver_2.0.3      fs_1.5.0          promises_1.1.1    xml2_1.3.2        ellipsis_0.3.1    generics_0.0.2    vctrs_0.3.4      
[57] tools_4.0.1       glue_1.4.2        hms_0.5.3         rsconnect_0.8.16  fastmap_1.0.1     colorspace_1.4-1  rvest_0.3.6      
[64] rJava_0.9-13      haven_2.3.1   

Hello - I am running into the same issue as you. I did track it down to when the deployment runs rsconnect::appDependencies(). I did a temporary fix though where a create a DESCRIPTION file after deployment if one does not exist.


if(!file.exists(here::here('DESCRIPTION'))) {
writeLines('Package:mypackage
Title: package
Version: 0.0.0.9000
Description: What the package does (one paragraph).
License: None
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
', con = here::here("DESCRIPTION"))
}