deployApp() error: Error in headers[["Content-Type"]] : subscript out of bounds

226 views
Skip to first unread message

Michael Frasco

unread,
Aug 19, 2014, 11:19:44 AM8/19/14
to shiny-...@googlegroups.com
Hi

I am having trouble deploying my shiny app. The app works fine when I use runApp() locally.

This is a print out of the error.

> deployApp()
Preparing to deploy application...
Error in headers[["Content-Type"]] : subscript out of bounds

I have set my account info in RStudio by copying the information provided after I logged into shinyapps.io and entering it into RStudio's console.

Here is my session info.

R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)

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] shiny_0.10.1     shinyapps_0.3.57

loaded via a namespace (and not attached):
 [1] bitops_1.0-6    caTools_1.17    devtools_1.5    digest_0.6.4   
 [5] evaluate_0.5.5  htmltools_0.2.4 httpuv_1.3.0    httr_0.3       
 [9] memoise_0.2.1   parallel_3.1.1  Rcpp_0.11.2     RCurl_1.95-4.1 
[13] RJSONIO_1.3-0   stringr_0.6.2   tools_3.1.1     whisker_0.3-2  
[17] xtable_1.7-3  

In order to make sure that it wasn't my ui.R and server.R scripts that were causing the problem, I copied the code for an app from the Shiny tutorial page into a new directory. And when I try to deploy that app, I get the same problem.

Any help is appreciated. Thanks.

Fereshteh Karimeddini

unread,
Aug 19, 2014, 12:59:22 PM8/19/14
to shiny-...@googlegroups.com
Michael,

For future shinyapps.io issues, please post them to this forum:


We have seen a couple of other reported cases of this error, and we are looking into the issue. Will let you know when we know more about this issue, and a fix or workaround for it.

In the meantime, can you please run the following commands in RStudio:

options(shinyapps.http.trace = TRUE)
deployApp(appName="YOU_APP_NAME", account="YOUR_ACCOUNT")

and send us the output.


Best,
Fereshteh

Michael Frasco

unread,
Aug 21, 2014, 12:26:09 PM8/21/14
to shiny-...@googlegroups.com
Thanks

Here is the output from the commands you supplied. I chose the name "KMeans Clustering" for my appname.

> options(shinyapps.http.trace = TRUE)
> deployApp(appName="KMeans Clustering", account="mfrasco")
GET /v1/applications/?filter=account_id:14332&filter=name:KMeans Clustering&count=100&offset=0 245ms
Error in headers[["Content-Type"]] : subscript out of bounds

I appreciate your help.
Message has been deleted

Fereshteh Karimeddini

unread,
Aug 21, 2014, 2:59:44 PM8/21/14
to shiny-...@googlegroups.com
OK, the issue seems to be the name of your application. You cannot have spaces in the name. Please change that and try again.

Fereshteh

Michael Frasco

unread,
Aug 21, 2014, 8:47:48 PM8/21/14
to shiny-...@googlegroups.com
Changing the app name appears to fix the problem. I say "appears" because when I now call the function deployApp(), I get the following:

> deployApp(appDir = getwd(), appName = "KMeans", account = "mfrasco")
Preparing to deploy application...DONE
Uploading application bundle...DONE
Deploying application: 18245...
Waiting for task: 1062726
  building: Processing Bundle Id: 43536
  building: Building package: digest (0.6.4)
  building: Building package: xtable (1.7-3)
  building: Building package: htmltools (0.2.4)
  building: Building package: Rcpp (0.11.2)
  building: Building package: RJSONIO (1.3-0)
  building: Building package: httpuv (1.3.0)
  building: Building package: bitops (1.0-6)
  building: Building package: caTools (1.17)
  building: Building package: shiny (0.10.1)
  building: Pushing image: 42492
  deploying: Starting 1 instance(s)
  rollforward: Activating new instances
  terminating: Stopping old instances
Application successfully deployed to http://mfrasco.shinyapps.io/KMeans

However, when the app is launched in my browser, I get a white screen with the following text at the top: "ERROR: unable to install packages".

Do you know what this is caused by? I am also posting this question in the proper forum, so thank you for your help.

Michael

Michael Frasco

unread,
Aug 22, 2014, 3:19:36 PM8/22/14
to shiny-...@googlegroups.com
I was able to solve the problem. I had to remove the code 'install.packages("shiny")' from my server.R script.

Thanks for your help.

Michael
Reply all
Reply to author
Forward
0 new messages