Warning in log - Channel is not set

Hi,

I have a warning in the Ignition-log that has increased in frequency the last couple of weeks/months to around 5-10 times a day. The number of clients on the related project has increased and many of them use an Android Pad (with MobiConnect / SOTI Surf). The problem with this warning is that I can't even figure out what it means, and I haven't been able to replicate it so I don't really know where to start. I have searched the forums and the internet and it's only really one single post on here that even mentions it.

So, warning is this:

com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 4, in valueChanged File "", line 241, in getProcessorder at com.inductiveautomation.perspective.gateway.model.PageModel.send(PageModel.java:384) at com.inductiveautomation.perspective.gateway.model.PageModel.send(PageModel.java:365) at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.lambda$navigate$5(PerspectiveScriptingFunctions.java:198) at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.lambda$operateOnPage$0(AbstractScriptingFunctions.java:82) at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnSession(AbstractScriptingFunctions.java:120) at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnPage(AbstractScriptingFunctions.java:47) at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.navigate(PerspectiveScriptingFunctions.java:191) at jdk.internal.reflect.GeneratedMethodAccessor1071.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) java.io.IOException: java.io.IOException: Channel is not set.

It has something to do with a system.perspective.navigate command. I have looked at this and tried to manually add sessionId and pageId to see if that helps, but I still get the same warnings (the view takes a parameter in the url and "processorder" is a 7-digit number (converted to string)).

system.perspective.navigate("/Inmatning/" + processorder)

I also have another "Channel is not set"-warning pointing to an alterDock-command:

system.perspective.alterDock("header", {"size": 90})

Any help to understand what this means and if possible how to solve it is highly appreciated. As of now I don't even know how this effect the clients. I should add that this doesn't happen everytime these commands are supposed to run as I'm not able to replicate it. I have also tried on said Android Pad with the same configuration as the clients use and everything seems to work just like expected for me.

Are you triggering this navigation based on any condition?
Also have a look on,

It's the last line in a bigger script that can be interupted earlier with return. But the navigation it self is not based on a condition. The reason for the nagivation is to get the parameter to the url so when the session reloads (if its lost) it reloads with the correct "processorder".

I have seen that post and thought about it. It can very well have something to to with the same thing. But when the session is lost the perpsective-page is reloaded (typically when the Pad hasn't been used for half an hour or so) so if the clients are able to see the page the session should be open, right?

I have tried to disable the Battery Optimization and that does seem to help keeping the session open for a little longer, but not "forever". I have only tried that in the Pad that I have on my desk as IT couldn't find a way to change this setting on all Pads remotely.

Have u configured Perspective Inactivity in project property?

I don't have that enabled at all.

That's a lost tab (closed, or websocket broken). It can also happen when navigation to a new page/view happens while a script referencing the prior page/view is running and trying to send something there. You'll have to share more of that valueChanged script.

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.

First of all, thanks for the help so far. Seems like you all agree that the current page is somehow "gone". This will help me sort this out.

Regarding posting more of the valueChanged script, there is potentially more scripts running at the same time. I have to really sort things out to see what is happening and when. The script that this navigation is in does mostly consist of system.db.runNamedQuery and handling of that data. Though I should add that I'm a novice at python and use google + trial and error to get things running :wink:

The only thing I have found so far that is a small question mark is if changing the page title with self.page.props.title = processorder + " - Inmatning" could have any effect on this. It does this slightly before the navigation occurs.

The problem could also be that something else is causing the navigation, or it could even be a user closing the tab. My point is it might not even be a script which lives in the page. Consider looking at Navigation components on the page, or scripts in other areas (session property change scripts, and Session Message Handlers) for potential navigation invocations.

I think I might have found what was causing it now. This script containing the navigation might have been triggered twice. Made a change to stop that from happening and hopefully this was it. I will find out tomorrow :wink:

This thread really helped me figure out what it meant and where to start looking. Thanks!

2 Likes