daattali / shinycssloaders

⌛ Add loading animations to a Shiny output while it's recalculating
https://daattali.com/shiny/shinycssloaders-demo/
Other
395 stars 45 forks source link

withSpinner is hidden when hosting app on port 80 #44

Closed ismirsehregal closed 4 years ago

ismirsehregal commented 4 years ago

Using the following code under Windows7 x64 with Chrome doesn't display a spinner when executed via source():

library(shiny)
library(shinycssloaders)

ui <- fluidPage(
  withSpinner(uiOutput("dummyid"))
)

server = function(input, output, session){
  output$dummyid <- renderUI({
    Sys.sleep(5)
    "result"
  })
}

app <- shinyApp(ui, server)
runApp(app, host ="0.0.0.0", port = 80, launch.browser = TRUE) # causes hidden spinner

screen

This however worked without problems with shinycssloaders version 0.2.0.

ismirsehregal commented 4 years ago

@daattali I just realized, that this behaviour is limited to port 80. After changing the port it's working on my Windows 7 machine.

daattali commented 4 years ago

I just tested on windows 7 machine with chrome, on port 80 - your exact code. I cannot reproduce.

This is extremely strange. If you change 80 to any other number it works? I really wish I could reproduce so I can look into this, it makes no sense to me.

ismirsehregal commented 4 years ago

Yes, I changed from 80 to a different port and the spinner was showing up.

I tried deleting all R related firewall settings - no success. But on the other hand the whole web page shouldn't show up if the firewall settings were the issue. Is there any other information I can provide you with? I'm back on this PC on monday.

daattali commented 4 years ago

See if you can replicate this on any other machine if possible. I'm so curious about this issue.

On Fri., Feb. 14, 2020, 16:26 ismirsehregal, notifications@github.com wrote:

Yes, I changed from 80 to a different port and the spinner was showing up.

I tried deleting all R related firewall settings - no success. But on the other hand the whole web page shouldn't show up if the firewall settings were the issue. Is there any other information I can provide you with? I'm back on this PC on monday.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/daattali/shinycssloaders/issues/44?email_source=notifications&email_token=AAHIQFBPYRPQEROHVULP7LDRC4EAZA5CNFSM4KVEQDS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL2PM6Y#issuecomment-586479227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHIQFCNQSVFGECPW6NEQ73RC4EAZANCNFSM4KVEQDSQ .

ismirsehregal commented 4 years ago

Today (same PC as before) I'm no longer able to reproduce the issue I was showing in the GIF. I'm quite confused, however, I'm closing this, as I was able to make things work again in all my apps.

ismirsehregal commented 4 years ago

Something is still going wrong here, just tested one of my apps (now again using withSpinner() on Ubuntu - here the spinner isn't hidden and I'm getting:

image

daattali commented 4 years ago

Is that using the latest github version?

ismirsehregal commented 4 years ago

You are right 🙈... I didn't properly reload the package after installing the latest dev version on ubuntu. From my side using the dev version, everything is fine - thanks for your effort!

ismirsehregal commented 4 years ago

This seems to be related.

daattali commented 4 years ago

Thanks , that makes me feel better because that guy isn't using this package and still ran into the problem. Seems like a shiny issue. You should maybe open an issue on shiny's repo and link to this and to the SO thread so they'll see how weird and non deterministic this is