Application Close Button - Error in shinyApp() : `server` missing from shinyApp

I have created a close button for a Shiny app as follows:

Close shop:

                            column(5,
                            div(title='Exit this Shiny plotting app? (The plots will NOT be automatically saved!)',
                              actionButton(inputId="close_shop", label=strong("Exit..."), icon=icon("remove-circle", lib="glyphicon"), style="color: #C70039 ; border-color: #C70039"))
                          ),

I then have the following code to close the application:
#Close the application
observeEvent(input$close_shop,
{
showModal(modalDialog(title="Retail Analytics interactive plotting...", "Are you sure you want to close the application?",
footer = tagList(modalButton("No", icon=icon("remove-circle", lib="glyphicon")),
actionButton("ok", "Yes", icon=icon("ok-circle", lib="glyphicon")))))
})
observeEvent(input$ok,
{
removeModal();
stopApp(shinyApp())
})
On accepting to close the application, the application blacks out and closes. I am faced with the following error message:
54%20PM

Kindly assist in resolving this problem