shinyappsio app uploads correctly, but fails to run

My RMarkdown file works perfectly in RStudio IDE and doesnt throw any errors when uploading, when i try to open the website i get this:

An error has occured

The application failed to start
exit status 1

In the log, i notably get this error:

2025-12-11T16:30:56.906833+00:00 shinyapps[16295647]: Error in connect$configureShinyFilter(config, versions) : 
2025-12-11T16:30:56.912198+00:00 shinyapps[16295647]:   attempt to apply non-function
2025-12-11T16:30:56.916550+00:00 shinyapps[16295647]: Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> <Anonymous>
2025-12-11T16:30:56.920858+00:00 shinyapps[16295647]: Execution halted

full log:

I don't think it's possible to work out what's causing the problem from your logs. Can you share your code?

It's decently long so i'll link to the github: stats-semester-project/index.Rmd at main · mich-gamedev/stats-semester-project · GitHub

the rest of the referenced scripts are in ./r_scripts/

should note there's an SQL database i excluded from the repo because of it's size but is included in shinyapps (i checked the bundle, so it is there)

Without the database, I can't run it so can't debug directly. Looking over it though, it doesn't seem as if it needs to be a shiny app - all you are doing is displaying images, text and plotly graphs, which can all be done in a static html document. You only need to use shiny when you have input widgets that are being used to allow a user to modify the plots. I'd suggest converting your scripts that produce the plotly graphs to functions and then just call them in the chunks, or just moving all your code into a single document.

Also though, per Shiny - Introduction to interactive documents you just include the renderPlotly functions in a chunk, not a complete shinyApp

I guess this goes beyond shiny at this point then, i figured i had to use shiny for rendering plotly documents because when i try without it like so,

# {r echo=FALSE, results='asis', fig.width=4, fig.height=4, warning=FALSE}
# similar behavior with just {r}

source("./r_scripts/review_count_sp_v_mp/a.r")
print(fig) # fig being a plotly figure that works with Shiny

it'll just print out the contents instead of actually rendering the plot

I did not see that document for interactive documents though, I can try to see if it fixes the issue

Okay, that did make it work, thank you for the help

I'm sure i missed something with thinking i need shiny, but i'm content with this working as it is right now so i'll stick to it

I meant to use something like this if you want to keep the files separate:

make_plot <- function(){
  plotly::plot_ly(midwest, x = ~percollege, color = ~state, type = "box")  
}
```{r}
 make_plot()
```

But of course, you could just use:

```{r}
plotly::plot_ly()
```

Glad you've got it running now, but what did you end up changing?

I just removed everything but the renderPlotly() and it's contents from the codeblocks