You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the detailed issue report and taking the time to submit a PR! I really appreciate it. I haven't yet looked at the PR, I'll have to take the time to look into the code more closely, but just from reading the steps you describe in the issue it sounds good.
I understand you're adding a timer, can you confirm that this timer will not be always active and will always get deleted soon after the app is started? I want to ensure there isn't any performance degradation by having an infinitely running timer.
Has this solution been tested in multiple scenarios, such as: running locally in RStudio and killing the app vs running in a shiny server and stopping the server, made sure the error is seen whether the server dies or whether an error in the app is encountered
Regarding the last point about the demo app: It's true that the demo app is doing something funky and I'm sure you understand why. Even though this isn't the expected way to use the package, I do like the fact that {shinydisconnect} still works even in this odd case of dynamically inserting and immediately killing the app. Does this also mean that any app that gets errored out within 3 seconds will also have a similar issue?
I use clearInterval to stop the timer. I tested and see it indeed stopped. You can try to add a console.log(num) between line 29 and 30 to see if it still runs.
I tested all your examples locally and deploy your demo to my account and they all worked for me.
Not all apps, only apps insert the script at the last second. To have my js function to run, it has to meet 2 requirements: 1. script inserted; 2. document ready. Usually when people use this package, script inserted into shiny UI and then the server runs, 1 -> 2. Your demo's server runs first and then script inserted when app stops, 2 -> 1. So scripts meet the requirements after the server ends and then start to run. So, 'shiny:disconnected' will first trigger error message, and then the timer cannot find server and report no connection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.