Hi @VictorB! Welcome!
It's a little difficult to understand exactly what your problem is since there isn't a code example. In general, when asking questions about Shiny code here it's good to follow the suggestions in our Shiny debugging and reprex guide for creating a small, reproducible example that demonstrates your problem.
That said, it sounds like maybe you're running into trouble with what the app should do when the data hasn't been uploaded yet? This article discusses Shiny tools that help with that situation: https://shiny.rstudio.com/articles/req.html