Error in Shiny App "error in findrow" and "no points selected"

Hi everyone,

I'm trying to get some inherited code to work with my data and I am unable to determine why I am receiving the following error messages when using output$SURVPLOT

The warning in the console -> Warning: Error in findrow: no points selected for one or more curves, consider using the extend argument

The warning in the shiny app window when trying to generate the graph -> Error: no points selected for one or more curves, consider using the extend argument

Has anyone seen this errors before and know what they mean?

I am fairly sure it is linked to the below chunk of the code as other text outputs are produced. Just not the graph..

output$SURVPLOT <- renderPlot({
surv_curve_all() %>%
  filter(time<surv_months) %>%
  filter(type=="obs" | type=="Patient") %>%
  mutate(surv=surv*100) %>%
  ggplot() +
  geom_step(aes(x=time,y=surv, linetype=type, color=rg)) +
  scale_colour_brewer(type = "seq", palette = "Set1") +
  ylim(0,100) + xlab("Time (months)") + ylab("Survival %") +
  theme_bw() +
  labs(color="Risk Group") + scale_size(guide=FALSE) +
  scale_linetype_discrete(name = "",labels = c("Observed","Patient"))

This is the relevant code before the output$SURVPLOT code.

surv_curve_all <- reactive({
  rbind(surv_curve_alldata_imp_df,
        data.frame(time=survfit_pred_survcurve()$time,         
                   surv=survfit_pred_survcurve()$surv,
                   rg=rep("Patient",nrow(survfit_pred_survcurve())),
                   type=rep("Patient",nrow(survfit_pred_survcurve()))

Would really appreciate any help with the resolving the error messages. Can provide more info if needed, any help would be appreciated.

Thanks

It doesn't seem to me you a shiny problem per-se, this seems to be a problem with the use of library(survival)
CRAN - Package survival (r-project.org)

I would attempt to understand and debug the issue, by abstracting our the relevant parts of the shiny app, to make a minimal plain r script that creates the survfit_pred_survcurve object under your particular circumstance and focus on understanding that.

If you would like assistance from the community here, then it is recommended that you make a reprex.