App deplied to shinyapps.io says "An error has occurred The application failed to start. exit status 1."

Hi there,

I am new to shiny apps and after some original errors I figured I had finally got around the issue. In Shinyapps.io it states that my app is running but whenever I try to access it I get a blank screen with the message above. In my R console it states that deployment is complete and successful.

Does anyone have an idea on why this can be occurring? I have no error warnings in the R console, so am at a loss.

Which R console, on your computer? Does the app run properly locally?

Did you check the logs? When you open your dashboard, you have these options on top:

Go to the "Logs" tab, it should have information about what's happening.

1 Like

Hi @AlexisW, thank you for your help.

In the R studio console the code runs properly. If I ask it to run the app, the app is generated. If I press publish so that it is published to Shinyapps.io it seems to be correctly deployed. I just checked the logs (apologies as it is my first time using shinyapps.io so I did not know that I could check for potential errors there, i assumed they would be shown on R studio) and it states that my data file does not exist. But I am able to run it properly in my local computer, is there a specific step I have missed?

Thank you for the help

Well, the file exists on your local computer, not on the server, that explains why the app runs fine locally and not on the server.

The problem then is that the file was not bundled with the rest of the app when publishing. In RStudio, start the publishing process by clicking on this icon:
image

This should open a window with the files that can be bundled, here is an example from a different app:
image

Make sure your "Survey_Time_Data.csv" is in the list, and is checked, then Publish. In my example screenshot above, "data/t_exp.tsv" is not exported with the app (so if I try to read it in my code it will fail), whereas all other files are bundled with the app, so for example I can read "data/t_exp.duckdb" from inside the app.

1 Like

Brilliant :slight_smile:

I feel very silly, but also very grateful for your help. Thank you, this will save me countless hours trying to figure out what is wrong (I had spent a good chunk of them already and was not anywhere near an answer).

Have a great day!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.