Console
Console copied to clipboard
When Sitecore CMS session is terminated, PowerShell script appears to still be running
Sitecore version 8.2 (rev 170614) Sitecore PowerShell version 4.7 (I am unable to find an issue or release note where this has been addressed since my working version)
Expected Behavior
When executing a long-running script, I'd want to see some kind of indication within Sitecore PowerShell when my Sitecore CMS session has timed out (or has otherwise been terminated by a logout), and that my script is no longer running.
Actual Behavior
I get the standard browser popup message (beforeunload event) stating "Leave Site? Changes you made may not be saved." (Google Chrome). I click "cancel" and the "Please Wait" message remains with the "working.gif" spinning logo, and the wait text underneath "working.gif" stops refreshing. The only indicator that my session may have timed out is the presence of the "Leave Site?" popup message.
Steps to Reproduce the Problem
- Log in to Sitecore at http://sitecoreHost/sitecore/login, dropping you into the launchpad.
- Open a second browser tab and go to the launchpad in that tab as well. http://sitecoreHost/sitecore/client/Applications/Launchpad
- Back in the first tab, go to Sitecore Desktop and open PowerShell ISE.
- Run a script that is expected to take at least 10 seconds to run (or, enough time that you can complete step 5 before the script is finished)
- In the second tab (on Launchpad), click the "Log out" link.
- On the first tab, observe that a dialog popup has appeared, stating "Leave Site? Changes you made may not be saved." (Google Chrome; message may vary by browser)
- Click "cancel" on this box. Observe that the script still appears to be running; there is no indicator that script execution has been interrupted by loss of session, and the script will appear to continue running indefinitely.
That's an interesting discovery. Thank you for reporting it.