Troubleshooting

Note

surveydown requires some basic setups in order to get running. If you find glitches or failures, this page is for you.

Required software

Make sure you have all of the required software for surveydown - see the installation instructions on the Getting Started page for details.

Note

Sometimes the R packages like surveydown may not install properly, often because your path is managed by some package managing system like Anaconda. In this case, a third alternative is to download the zip file of the package source code and then install it locally.

To download the zip file, go the the surveydown repo, click on the green “Code” button and click on “Download Zip”, or simplify click on this link.

Unzip this repo, then open the surveydown.Rproj file. In your R Console panel, run this code to install:

# install.packages("pak")
pak::local_install(ask = FALSE)

Some useful links:

sdstudio

sdstudio is a companion R package with surveydown. It is intended for supportive webapps for surveydown. It has a single function: sdstudio::launch(), which launches the surveydown Studio. This is a locally run shiny app that supports a graphic interface for survey construction, preview, and data management.

In your R Console, run this to install sdstudio from GitHub (it’s not yet on CRAN):

# install.packages('pak')
pak::pak("surveydown-dev/sdstudio", ask = FALSE)

Once installed, run this to launch the studio:

sdstudio::launch()
surveydown Studio

Database Connection

You might encounter connection problem caused by failure of GSSAPI (Generic Security Services Application Program Interface). It is a a protection layer for data security supported by PostgreSQL. In SQL management, it is controlled by the gssencmode argument.

In previous versions of surveydown (before v0.12.5), the sd_db_connect() and sd_dashboard() functions have a gssencmode default to "prefer", which enables GSSAPI, but may cause connection failure under some network conditions (VPN, for example). Our previous solution is to manually change gssencmode from "prefer" to "disable", but it is less intuitive and causes more trouble than efficiency.

Therefore, our current solution (versions after v0.12.5) is to remove the gssencmode argument from these functions, in which the GSSAPI is set to "prefer" by default, but if the connection errors due to network problem, it will auto-switch to "disable" and leave a message.

Still Can’t Deploy?

If your shinyapps deployment fails, you should firstly make sure your Supabase credentials are correctly defined, including your Supabase project settings and password settings. The password defined by sd_db_config() should be the same as your Supabase project password. Access the Storing Data page for how to set all Supabase credentials. Then, make sure your survey runs on your local machine and can successfully link with your Supabase project table. With these confirmed, your shinyapps deployment should work without problem.

If you still encounter an error (e.g., the page shows the app failed to start, or you see the page but it doesn’t run properly), try clearing your cache. The simplest way to do so is to reboot your computer. It may also help if you delete previously generated files, such as the survey.html file if you rendered it and the rsconnect folder. After re-rendering, you should be able to deploy the app without error.

Back to top