shiny app gets '400 Bad Request' trying to get data from google api

32 views
Skip to first unread message

eliav schmulewitz

unread,
Nov 19, 2014, 8:28:03 AM11/19/14
to shinyap...@googlegroups.com

Fair disclosure: I posted this on SO: https://stackoverflow.com/questions/27015311/shiny-app-gets-400-bad-request-trying-to-get-data-from-google-api
but it seems like ther is not much traffic to my question.


As part of my shiny app I call geocode() from the ggmap R package. 
The data is geocoded and gets a result - i can see that from my console trying to run the app locally and from the log on the shinyapps.io dash board.
After the end of the geocode i get the next message:

.Warning in readLines(connect) :
  cannot open: HTTP status was '400 Bad Request'
Error in readLines(connect) : cannot open the connection  

have a clue?

Thanks 

Eliav

Tareef Kawaf

unread,
Nov 19, 2014, 9:02:11 AM11/19/14
to eliav schmulewitz, shinyap...@googlegroups.com
Eliav,
Just to confirm my understanding.  The app you have runs properly on your local machine, but you get this 400 Bad Request when you run it on shinyapps.io?  Can you send a URL to your application, and the output of shinyapps::showLogs() and your sessionInfo() output please?

Tareef

--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/d38a2aa4-2a7f-44e2-ab9c-b086745835e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

eliav schmulewitz

unread,
Nov 19, 2014, 9:37:07 AM11/19/14
to shinyap...@googlegroups.com, eli...@gmail.com
Tareef Hi, 
the app acts the same both locally and on the shinyapps.io.
it runs allright it gets stuck when i try to use the geocode
i am not sure how to show the logs a print screen is attached
this us the session info from the local machine:
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Hebrew_Israel.1255  LC_CTYPE=Hebrew_Israel.1255    LC_MONETARY=Hebrew_Israel.1255
[4] LC_NUMERIC=C                   LC_TIME=Hebrew_Israel.1255    

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

other attached packages:
[1] raster_2.2-31    ggmap_2.3        ggplot2_1.0.0    reshape2_1.4     akima_0.5-11     rgdal_0.8-16     sp_1.0-15       
[8] shinyapps_0.3.55 shiny_0.10.1    

loaded via a namespace (and not attached):
 [1] bitops_1.0-6        caTools_1.17        colorspace_1.2-4    digest_0.6.4        grid_3.1.1         
 [6] gtable_0.1.2        htmltools_0.2.4     httpuv_1.3.0        lattice_0.20-29     mapproj_1.2-2      
[11] maps_2.3-7          MASS_7.3-33         munsell_0.4.2       plyr_1.8.1          png_0.1-7          
[16] proto_0.3-10        Rcpp_0.11.2         RCurl_1.95-4.3      RgoogleMaps_1.2.0.6 rjson_0.2.14       
[21] RJSONIO_1.3-0       scales_0.2.4        stringr_0.6.2       tools_3.1.1         xtable_1.7-3 

Thank you
Eliav
untitled.bmp

Tareef Kawaf

unread,
Nov 19, 2014, 9:47:32 AM11/19/14
to eliav schmulewitz, shinyap...@googlegroups.com
Got it, so the issue you are seeing is not really one related to shinyapps.io it is more of a shiny question is that correct?

eliav schmulewitz

unread,
Nov 19, 2014, 9:49:47 AM11/19/14
to Tareef Kawaf, shinyap...@googlegroups.com
I guess  so...
even though the app used to be on spark and work...
Reply all
Reply to author
Forward
0 new messages