Shiny app deployment error - Error in value[[3L]](cond) : Cannot open data source

shiny
shinyappsio

#1

... Iam deploying my shiny app to shinyapps.io & all my app files(app.r,www) are all stored in my dropbox. I have loaded the rsconnect command then published the app to my account. The deployment process is successful but when I go to my app url I get the following error: Any ideas on how to solve this?

An error has occurred
The application failed to start (exited with code 1).


Attaching package: ‘DT’

The following objects are masked from ‘package:shiny’:

    dataTableOutput, renderDataTable


Attaching package: ‘shinydashboard’

The following object is masked from ‘package:graphics’:

    box

Loading required package: sp
rgdal: version: 1.3-4, (SVN revision 766)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 2.1.3, released 2017/20/01
 Path to GDAL shared files: /usr/share/gdal/2.1
 GDAL binary built with GEOS: TRUE 
 Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
 Path to PROJ.4 shared files: (autodetected)
 Linking to sp version: 1.3-1 

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union



Attaching package: ‘raster’

The following object is masked from ‘package:dplyr’:

    select

Error in value[[3L]](cond) : Cannot open data source
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

#2

I am also trying to deploy my shiny app though I am not using the dropbox call function & I get this error:

Preparing to deploy application...Error: HTTP 404
GET https://api.shinyapps.io/v1/applications/416524
Not Found
Execution halted

This is just a by the way question on the function to call the files from dropbox.
For me I have my app.r & www files in my dropbox & I call the files normally in my app i.e. readOGR/read.csv but I don't know how to use the dropbox call function.
I have 4 shape files & 2 csv files. I wanted some guidance on how I can call all these files using the dropbox call function.


Error deploy shiny app - Error in value[3L] : invalid multibyte string at '<80>3.5 b<69>llion' Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted
#3

Could you share the line(s) of code that are attempting to connect to a data source?


#4

This is typically when you have deleted your application, but there is still a reference to it locally in rsconnect/shinyapps.io/<account name>/<application name>.dcf. Remove that file and deploy again.


#5

I was able to solve this through redeployment but the "cannot connect to data source" error persists.


#6

All this code is in app.R while my data is in www folder in my dropbox. I was thinking of using rdrop2 to make connection but I have no idea of how I can load all the 4 shape files & 1 csv file.Here is the code:


#loading elevation shape file
countor<-readOGR(
  dsn="C:/Users/Dropbox/www/Elevation Contours",
  layer="25m interval rough contours",encoding = 'UTF-8')


#loading sewer shape file
sewer<-readOGR(
  dsn="C:/Users/Dropbox/www/Sewer map",
  layer="Sewer line WGS84",encoding = 'UTF-8')

#loading LIAs shape file
mp<-readOGR(
  dsn="C:/Users/Dropbox/www/LIAs",
  layer="m1",encoding = 'UTF-8')

#loading  water treatment plants shape file
treat<- readOGR(dsn="C:/Users/Dropbox/www/treatment plants",
                layer="Nk_Sewer_newcrs",encoding = 'UTF-8')

#loading nakuru data
nakuru<-read.csv("C:/Users/Dropbox/www/nak3.csv",encoding = 'UTF-8')

#7

All of those are absolute paths that works on your local Windows machine. They do not exist on shinyapps.io.

You will need to use an R package or other mechanism to retrieve the files if you are not including them in the bundle you are uploading.


#8

Which R package or mechanism should I use? That is where I am stuck.


#9

I don't have a particular recommendation, but if you don't turn up anything by searching the Community for Dropbox then I would suggest a separate post that solicits recommendations for such a package.


#10

The problem was with the paths I was able to change it to relative path & it worked!!


#11

3 posts were split to a new topic: Shiny deploy error - Error in value[3L] : object 'full_set' not found


#12

2 posts were merged into an existing topic: Shiny deploy error - Error in value[3L] : object 'full_set' not found