Deploy R shiny app on LAN: Uncaught TypeError: Cannot read property 'readyState' of null

Hi all,
I have created an application in the R shiny. Few days back, it was working well. But now it starts crashing. There's no error in the R console.

But in Chrome, it is showing-

shinyapp.js:288 Uncaught TypeError: Cannot read property 'readyState' of null
at ShinyApp.$sendMsg (shinyapp.js:288)
at ShinyApp.sendInput (shinyapp.js:140)
at InputBatchSender.$sendNow (input_rate.js:220)

Can anybody tell me whats it is and How to overcome this?

It is not likely that this error can be fixed without a reproducible example.
If I was trying to address this I would try to eliminate various parts of the code, until I had the smallest code that stil exemplified the javascript error, then perhaps raise an issue about it on the shiny github.

In the shinyapps.js code there is line 285 (

if (!this.$socket.readyState)

Your error means that $socket does not exist (it has been prematurely closed). See my screenshot where I manually closed the connection and then try to access the socket again.

Where is your app deployed? Do you have any REPREX?

Screenshot 2020-09-01 at 18.41.42

1 Like

Thanks , it worked...........

What do you mean, "it worked"?
What solution did you implement??

I just looked on the solution as mentioned by @DGranjon. Then, cleared my environment, restarted the application and it ran!

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