While coding a simple Google Script for multiple non-programmer users, I noticed a strange bug. If the browser is open too long, sometimes the document doesn't link to the script anymore. Then the initial methods fail. It crashes the script. This occurs on the second line where I define the getUI:
var ui = DocumentApp.getUi();
I made a try-catch to handle the bug, but I'm at a loss on how to alert or notify the user to refresh their browser session. I can't assess the UI with getUI, so I can't use the html or alert functionality to prompt the user. Without the UI methods, is there a way to tell them info? Like a title, hint, tip, etc?
Any ideas on how to notify the user to refresh the session?