Warning in log - Channel is not set

I'm inclined to agree with the other recommendations here; this really seems like something where the script is running in a page but the page is essentially pulled out from under the script, resulting in a situation where you request navigation but the page no longer exists. This would most likely be the result of other navigation being performed (URL, because that would change the Page ID), or the tab itself being closed. This could also potentially occur if the View the script lives in is removed from the page while the script is executing.