R Shiny, strange error when executing Javascript clean URL code and then fileInput()

Hello everyone!,

I am experiencing a very odd issue in a Shiny App that I believe deserves a new topic.

I would like to execute the following JS code to clean the URL:

clean_url_js <- sprintf(
    $(document).ready(function(event) {
      const nextURL = '%s';
      const nextTitle = 'My new page title';
      const nextState = { additionalInformation: 'Updated the URL with JS' };
      // This will create a new entry in the browser's history, without reloading
      window.history.pushState(nextState, nextTitle, nextURL);
    ", redirect

server <- function(input, output, session) {

When the Shiny app executes the clean_url_js() function first and then the user uploads a file using the fileInput() function in the Shiny App, the progress bar provided by the fileInput() function shows a strange behavior.

After uploading, the progress bar displays the following HTML code, as shown in the attached image:

<!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title>

and the uploading process halts.

The Shiny app is running on a Shiny server on an AWS EC2 instance.

I would greatly appreciate any suggestions or ideas to resolve this issue!

Same problem reported in the following topics:


Screenshot from 2023-06-08 10-20-06

This topic was automatically closed 54 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.