Can't deploy an app with plotly in shinyapps.io

I'm trying to deploy a dashboard that works just fine in local or RStudioCloud. Debugging to find the problem I started from scratch, using nothing but R base functions and datasets. I've found that a simple app like that is deployed and works. But at the moment I include the plotly package it will not deploy, showing this error:

'Error:

  • Unable to determine the location for some packages. Packages must
    come from a package repository like CRAN or a source control system.
    Check that options('repos') refers to a package repository
    containing the needed package versions.
    Execution halted'

So I've checked out options('repos') like suggested, but found nothing. It show that I have already loaded the CRAN repository, where plotly come from:

options("repos")
$repos
CRAN RSPM
"http://package-proxy" "http://cran.rstudio.org"

The whole log is as follows:

'----- Deployment log started at 2020-08-10 01:08:39 -----
Deploy command:
rsconnect::deployApp(appDir = "/cloud/project/test_app1", appFileManifest = "/tmp/3ae4-1f6a-ce11-c43e", account = "rafael747cardoso", server = "shinyappsio", appName = "test_app1", appId = 2655325, launch.browser = function(url) { message("Deployment completed: ", url) }, lint = FALSE, metadata = list(asMultiple = FALSE, asStatic = FALSE), logLevel = "verbose")

Session information:
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/atlas-base/atlas/liblapack.so.3.0

locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

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

loaded via a namespace (and not attached):
[1] compiler_3.6.3 rsconnect_0.8.16-9001
Cookies:
[1] "None"
GET /v1/applications/2655325 193ms
----- Bundle upload started at 2020-08-10 01:08:39 -----
[2020-08-10 01:08:39] Inferring App mode and parameters
[2020-08-10 01:08:39] Bundling app dir
[2020-08-10 01:08:39] Generate manifest.json
----- Deployment error -----
Error:

  • Unable to determine the location for some packages. Packages must
    come from a package repository like CRAN or a source control system.
    Check that options('repos') refers to a package repository
    containing the needed package versions.

----- Error stack trace -----
6: stop(paste(formatUL(msg, "\n*"), collapse = "\n"), call. = FALSE)
5: createAppManifest(appDir = bundleDir, appMode = appMode, contentCategory = contentCategory,
hasParameters = hasParameters, appPrimaryDoc = appPrimaryDoc,
assetTypeName = assetTypeName, users = users, compatibilityMode = compatibilityMode,
forceGenerate = forceGenerate, python = python, hasPythonRmd = hasPythonRmd)
4: bundleApp(target$appName, appDir, appFiles, appPrimaryDoc, assetTypeName,
contentCategory, verbose, python, forceRequirementsTxtEnvironment,
forceGeneratePythonEnvironment)
3: force(code)
2: withStatus(paste0("Uploading bundle for ", assetTypeName, ": ",
application$id), {
python <- getPythonForTarget(python, accountDetails)
bundlePath <- bundleApp(target$appName, appDir, appFiles,
appPrimaryDoc, assetTypeName, contentCategory, verbose,
python, forceRequirementsTxtEnvironment, forceGeneratePythonEnvironment)
if (isShinyapps(accountDetails$server)) {
bundleSize <- file.info(bundlePath)$size
checksum <- fileMD5.as.string(bundlePath)
bundle <- client$createBundle(application$id, "application/x-tar",
bundleSize, checksum)
if (verbose)
timestampedLog("Starting upload now")
if (!uploadBundle(bundle, bundleSize, bundlePath)) {
stop("Could not upload file.")
}
if (verbose)
timestampedLog("Upload complete")
response <- client$updateBundleStatus(bundle$id, status = "ready")
bundle <- client$getBundle(bundle$id)
}
else {
bundle <- client$uploadApplication(application$id, bundlePath)
}
})
1: rsconnect::deployApp(appDir = "/cloud/project/test_app1", appFileManifest = "/tmp/3ae4-1f6a-ce11-c43e",
account = "rafael747cardoso", server = "shinyappsio", appName = "test_app1",
appId = 2655325, launch.browser = function(url) {
message("Deployment completed: ", url)
}, lint = FALSE, metadata = list(asMultiple = FALSE, asStatic = FALSE),
logLevel = "verbose")
Error:

  • Unable to determine the location for some packages. Packages must
    come from a package repository like CRAN or a source control system.
    Check that options('repos') refers to a package repository
    containing the needed package versions.
    Execution halted'

The simples app is:

library(shiny)
library(plotly)

# Frontend:
ui = fluidPage(
    titlePanel("Test"),
    # plotOutput("plot")
    plotlyOutput("plot")
)

# Backend:
server = function(input, output){
    # output$plot = renderPlot({
    #     plot(x = iris$Sepal.Length,
    #          y = iris$Sepal.Width)
    #     
    # })
    output$plot = renderPlotly({
        plot_ly(data = iris,
                x = ~Sepal.Length,
                y = ~Sepal.Width)

    })
}

# Run App:
shinyApp(ui = ui, server = server)

I've searched for days but didn't find any solution to this. In fact, plotly is only one of the packages in the dashboard that is causing trouble this troble.

It worked for deploying from my machine, but it stills doesn't deploy from RStudioCloud.