Error in force(code) : Could not upload file.

612 views
Skip to first unread message

David Gibbs

unread,
Jul 20, 2018, 2:32:34 PM7/20/18
to shinyapps.io Users
Hi there,

I'm having trouble deploying my app.  Works fine locally, and I have deployed it in the past (last week). And I don't think I've made any changes, even using the same computer.

Tried getting the list of dependencies with rsconnect::appDependencies() and explicitly called all of them with library().  Doesn't seem to be an error there. Updated any that where sending warnings, and updated packrat and rsconnect...

Any idea?  It's pretty frustrating because the error message is so opaque. I'm not calling force or withStatus anywhere.


Let me know if there's something else I can get.  THANKS!!

Here's the deployment log:

----- Deployment log started at  2018-07-20 11:18:19  -----
Deploy command: 
 rsconnect::deployApp(appDir = "~/Code/iAtlas/Immune-Subtype-Clustering",      appFileManifest = "/var/folders/1w/9zhlgc2x58x327m5p1c7j54c0000gp/T/8639-b989-1472-aacd",      account = "isb-cgc", server = "shinyapps.io", appName = "Immune-Subtype-Clustering",      appTitle = "Immune-Subtype-Clustering", launch.browser = function(url) {         message("Deployment completed: ", url)     }, lint = FALSE, metadata = list(asMultiple = FALSE, asStatic = FALSE),      logLevel = "verbose") 

Session information: 
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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     

loaded via a namespace (and not attached):
[1] compiler_3.5.0  rsconnect_0.8.8
Cookies: 
[1] "None"
GET /v1/applications/?filter=account_id:65895&filter=name:Immune-Subtype-Clustering&count=100&offset=0 344ms
----- Bundle upload started at  2018-07-20 11:18:20  -----
[2018-07-20 11:18:20] Inferring App mode and parameters 
[2018-07-20 11:18:20] Bundling app dir 
[2018-07-20 11:18:20] Generate manifest.json 
[2018-07-20 11:18:34] Writing Rmd index if necessary 
[2018-07-20 11:18:34] Compressing the bundle 
POST /v1/bundles 435ms
<< {
	"application" : 384967,
	"content_type" : "application/x-tar",
	"content_length" : 103631730,
	"checksum" : "59caecfb6761afd4627a7a1990d410a3"
}
[2018-07-20 11:18:41] Starting upload now 
PUT /bundles/application-384967/4b10d0dfd28940a793a06a48d7a5d3f7.tar.gz?AWSAccessKeyId=ASIAIOJOMVAZS445FV6A&x-amz-acl=bucket-owner-full-control&Expires=1532114321&content-md5=Wcrs%2B2dhr9RienoZkNQQow%3D%3D&x-amz-security-token=FQoDYXdzEBoaDMiEj9i0BeIM0qMtNSK3A3Qt46O%2FaJU%2B1ZrtTqcF6a5Qx5cEMq9d5s3jWzuSjPJsB3E96XKK9elIJqNu%2FrAToyUBUiDXuh36se4n9Wx%2F19sH%2FA7DFr7YzdZZpZtXzKVsJdlY9bNA70w9n%2FltVAPgLPky7Du3fdjm0mFT96ZuEGWyJtpYdVte2cFjGOk%2F0VbpkhfV2ThrjSyQu93ljPaWuM8Av3w3T4z%2Bvu0cfZP3FyQxsv9eJWuVv6KhmFMKiDGE4HcjB3wtmTEMoz6GCqIlTtoyewEP%2BeHre2pUF5w3L5i2tJjf89feMANsvPqvmgzOOlxdTXPfstiLRQHexa2ufDqBGpyu%2FvOlEwOugY%2Br15ZPYb%2B%2FEcrEpJ6tWXjfHBi5tdqsp57QzKQF9%2FyyW4CUDR4l0w26WLIXzpU0L%2BpAGL19xDywQKSHZnkA2N2Udwj0bLIKi4LVpS08GJJoSGtZNqVQEjGci4hwbrflpJ%2BuVHMFhI5Obcp5hZaPpToOmaQwnI0FvjSoyXxRJV3unuuWLaWTac9Ihxn9X95Qdanyxv8D7%2BSpPPSuKLH%2F8i0pW%2Fdd%2FV%2Fwmfw38X2SCl0JBS42J8M04xln%2BksouqPI2gU%3D&Signature=V%2B01BM9YBR05Pn7KipMlAeaCuV4%3D&content-type=application%2Fx-tar 67467ms
----- Deployment error -----
Error in force(code) : Could not upload file.
Calls: <Anonymous> -> withStatus -> force
 
----- Error stack trace -----
4: stop("Could not upload file.")
3: force(code)
2: withStatus(paste0("Uploading bundle for ", assetTypeName, ": ", 
       application$id), {
       bundlePath <- bundleApp(target$appName, appDir, appFiles, 
           appPrimaryDoc, assetTypeName, contentCategory, verbose)
       if (isShinyapps(accountDetails)) {
           bundleSize <- file.info(bundlePath)$size
           checkSum <- digest::digest(bundlePath, "md5", file = TRUE)
           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 = "~/Code/iAtlas/Immune-Subtype-Clustering", 
       appFileManifest = "/var/folders/1w/9zhlgc2x58x327m5p1c7j54c0000gp/T/8639-b989-1472-aacd", 
       account = "isb-cgc", server = "shinyapps.io", appName = "Immune-Subtype-Clustering", 
       appTitle = "Immune-Subtype-Clustering", launch.browser = function(url) {
           message("Deployment completed: ", url)
       }, lint = FALSE, metadata = list(asMultiple = FALSE, asStatic = FALSE), 
       logLevel = "verbose")
Error in force(code) : Could not upload file.
Calls: <Anonymous> -> withStatus -> force
Execution halted


Joshua Spiewak

unread,
Jul 20, 2018, 2:47:12 PM7/20/18
to shinyapps.io Users
deployApp calls withStatus when uploading the bundle, and withStatus has the call to force.

Do you have rsconnect.http.verbose and rsconnect.http.trace set to TRUE?
Do you have a firewall between your computer and the Internet?

David Gibbs

unread,
Jul 20, 2018, 3:04:28 PM7/20/18
to shinyapps.io Users
Hi, thanks for the response.

On Friday, July 20, 2018 at 11:47:12 AM UTC-7, Joshua Spiewak wrote:
deployApp calls withStatus when uploading the bundle, and withStatus has the call to force.

Do you have rsconnect.http.verbose and rsconnect.http.trace set to TRUE?

No, but I'll try that.
 
Do you have a firewall between your computer and the Internet?

 I'm at work, but I don't think so.

> options(rsconnect.http.trace = TRUE)
> options(rsconnect.http.verbose = TRUE)
> options(rsconnect.launch.browser = FALSE)
*   Trying 52.206.19.186...
* TCP_NODELAY set
* Connected to api.shinyapps.io (52.206.19.186) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: api.rstudio.cloud
* Server certificate: Amazon
* Server certificate: Amazon Root CA 1
> GET /v1/applications/?filter=account_id:65895&count=100&offset=0 HTTP/1.1
User-Agent: rsconnect/0.8.8
Accept: */*
Date: Fri, 20 Jul 2018 19:01:02 GMT
X-Auth-Token: 784DD3E05BAE352DCBA3F57E3163D579
X-Auth-Signature: MzBjNmZlYjExODZmYmE5MDU5NDVlYjQ4NjE1Y2MyMTA2MmMxNjc4YTZhYTExOTEwZjAyYjI0NzEzNTJlNThlNg==; version=1
X-Content-Checksum: d41d8cd98f00b204e9800998ecf8427e

< HTTP/1.1 200 OK
< Date: Fri, 20 Jul 2018 19:01:02 GMT
< Content-Type: application/json; charset=UTF-8
< Content-Length: 52789
< Connection: keep-alive
< Server: nginx/1.10.3 (Ubuntu)
< Etag: "1e3c02f972899f5bb6382b621920944757a9b3a7"
< Access-Control-Allow-Origin: https://rstudio.cloud
* Connection #0 to host api.shinyapps.io left intact
GET /v1/applications/?filter=account_id:65895&count=100&offset=0 1099ms

David Gibbs

unread,
Jul 23, 2018, 1:05:49 PM7/23/18
to shinyapps.io Users
So, letting things sit over the weekend.  I tried Monday, with no changes, and it worked.   Problem must have been on the service (server) side, but error messages make that impossible to know.

-dave
Reply all
Reply to author
Forward
0 new messages