[Question-Resolved] 8.0 Beta session custom props use correct?

  1. So I went though and on the gear/page configuration screen of the designer and added a few value keys to the session custom area.

  2. Then I went to my “main” page and view, and as part of the “configure events” for the view I added to the on startup system event: empRole = ‘’
    badge = ‘’
    PW = ‘’
    session.custom.Emp_Role = empRole
    session.custom.badge = badge
    session.custom.PW = PW

  3. In a button on the basic view, I added the onClick event script self.session.custom.Emp_Role = ‘Operator’ (different roles for different buttons), and a navigate to the next view (navigate works just fine…).

  4. Then on the next view, I linked a label text property to that session custom property.

What I am expecting is that when the app first fires up it will set the custom property to null, then onClick it will be set to whichever “role” I will be looking for in my code for various user types and be reflected in the label text.

I am going with the assumption that I am not following the proper binding procedure. (Or mistakenly using a vision type binding and not a perspective type, or a mix of both :laughing: )

Can you help straighten me out on this please?

I think I’m following. You said what you expected to happen, but you didn’t say what actually happened.

My apologies Carl.

I expected to see the label text change, what I actually saw was that it did not. This was true with both no text and with me changing the value for they key in the session custom area first.

the wrapper.log is showing the following:

INFO   | jvm 1    | 2018/11/14 07:39:13 | W [p.ClientSession               ] [14:39:13]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 07:39:14 | W [p.a.script                    ] [14:39:14]: Error running function "runAction(self, event)". project=Perspective_Scan, view=Navigation@C
INFO   | jvm 1    | 2018/11/14 07:39:14 | com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last):
INFO   | jvm 1    | 2018/11/14 07:39:14 |   File "<function:runAction>", line 6, in runAction
INFO   | jvm 1    | 2018/11/14 07:39:14 | NameError: global name 'session' is not defined
INFO   | jvm 1    | 2018/11/14 07:39:14 | 
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.Py.NameError(Py.java:284)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.PyFrame.getglobal(PyFrame.java:265)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.pycode._pyx100.runAction$1(<function:runAction>:8)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.pycode._pyx100.call_function(<function:runAction>)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.PyTableCode.call(PyTableCode.java:167)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.PyBaseCode.call(PyBaseCode.java:307)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.PyFunction.function___call__(PyFunction.java:471)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.PyFunction.__call__(PyFunction.java:466)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.PyFunction.__call__(PyFunction.java:456)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at org.python.core.PyFunction.__call__(PyFunction.java:451)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:674)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.ignition.common.script.ScriptManager$ScriptFunctionImpl.invoke(ScriptManager.java:790)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:82)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 07:39:14 | Caused by: org.python.core.PyException: Traceback (most recent call last):
INFO   | jvm 1    | 2018/11/14 07:39:14 |   File "<function:runAction>", line 6, in runAction
INFO   | jvm 1    | 2018/11/14 07:39:14 | NameError: global name 'session' is not defined
INFO   | jvm 1    | 2018/11/14 07:39:14 | 
INFO   | jvm 1    | 2018/11/14 07:39:14 | 	... 26 common frames omitted

Remember, inside scripts, you have to address Session-level properties with self.session.propertyName

Change your script to

empRole = ''
badge = ''
PW = ''
self.session.custom.Emp_Role = empRole
self.session.custom.badge = badge
self.session.custom.PW = PW

and see if it works then.

Looks like I was missing the self. on my step 2. changed, but still didn’t update the text of the label…

Looking at the lines where it says “expecting indent” from the wrapper.log, I tried more indentation (single only to start), but that showed an error first thing in the designer for that view, with the tooltip that it was expecting dedent.

INFO   | jvm 1    | 2018/11/14 08:37:51 | I [P.Routes                      ] [15:37:51]: Encoded Message = AAAAEJLytfWppPne-vP_1UrrInvWgV6k76jeCxpltzEQ1UK1J0VnYdP9Dy3_z8bDAEDY3VdbK_aDB6sRxoMD5sdUKm0= route-group=perspective, route-path=/challenge
INFO   | jvm 1    | 2018/11/14 08:37:52 | I [p.ClientSession               ] [15:37:52]: Socket connected to session. pageId=20e2e299 session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 08:37:53 | I [p.ClientSession               ] [15:37:53]: Client Starting. Project='Perspective_Scan'. protocol=client-start, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 08:38:07 | W [p.a.script                    ] [15:38:07]: Unable to run function "runAction(self, event)", code could not be compiled. project=Perspective_Scan, view=Material_User/Log_On@C
INFO   | jvm 1    | 2018/11/14 08:38:07 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '<EOF>' expecting INDENT", ('<function:runAction>', 1, 27, 'def runAction(self, event):\n'))
INFO   | jvm 1    | 2018/11/14 08:38:07 | 
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | W [p.a.script                    ] [15:38:07]: Unable to run function "runAction(self, event)", code could not be compiled. project=Perspective_Scan, component=root/CoordinateContainer, view=Material_User/Log_On@C
INFO   | jvm 1    | 2018/11/14 08:38:07 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '\\n\\n' expecting INDENT", ('<function:runAction>', 6, 0, ''))
INFO   | jvm 1    | 2018/11/14 08:38:07 | 
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | W [p.a.script                    ] [15:38:07]: Unable to run function "runAction(self, event)", code could not be compiled. component=root/CoordinateContainer/TextField, view=Material_User/Log_On@C, project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 08:38:07 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '<EOF>' expecting INDENT", ('<function:runAction>', 1, 27, 'def runAction(self, event):\n'))
INFO   | jvm 1    | 2018/11/14 08:38:07 | 
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 08:38:07 | W [p.ClientSession               ] [15:38:07]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan

Your script logic is aligned with the method call.
Please introduce tabs for any logic within the method - adjust your script to read like so:

def runAction(self, event):
    """
    Comment-y stuff
    """
    empRole = ''
    badge = ''
    PW = ''
    self.session.custom.Emp_Role = empRole
    self.session.custom.badge = badge
    self.session.custom.PW = PW

Or 4 spaces, because that’s what PEP-8 says, and everyone knows that tabs are wrong.

Let the games begin!

1 Like

Should probably wait to start the tabs/spaces holy war until our code editors stop defaulting to tabs everywhere :slight_smile:

1 Like

I’m a curmudgeon. I like the encoded efficiency of tabs but the visual appeal of tab==4. I like the code editors just the way they are. (-:

1 Like




As you can see, my scripts are already setup that way.[quote=“brian.mills, post:5, topic:20826”]
I tried more indentation (single only to start), but that showed an error first thing in the designer for that view, with the tooltip that it was expecting dedent.
[/quote]

And as stated previously, I still have that issue in the wrapper.log file. (Though I did carefully double check everything…)

I was able to replicate your exact stacktrace, but only in exactly one instance: my script has absolutely no code within it (I Configured an Event for a button, selected a Script Action, but instead of supplying code I just selected “OK”).

Do you happen to have another script firing off somewhere which has no contents?

I went back through and removed any other events (empty or otherwise), and still have what appears to be the same thing…

INFO   | jvm 1    | 2018/11/14 11:56:55 | I [p.ClientSession               ] [18:56:55]: Socket connected to session. pageId=37fc0a87 project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:56:55 | I [p.ClientSession               ] [18:56:55]: Client re-synchronizing. protocol=re-sync-views, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:57:01 | I [P.InternalDatabase            ] [18:57:01]: Creating auto-backup of internal database "config.idb"... 
INFO   | jvm 1    | 2018/11/14 11:57:02 | I [P.InternalDatabase            ] [18:57:02]: Created auto-backup of internal database "config.idb" in 297 ms 
INFO   | jvm 1    | 2018/11/14 11:57:06 | W [p.a.script                    ] [18:57:06]: Unable to run function "runAction(self, event)", code could not be compiled. project=Perspective_Scan, view=Material_User/Log_On@C
INFO   | jvm 1    | 2018/11/14 11:57:06 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '<EOF>' expecting INDENT", ('<function:runAction>', 6, 0, ''))
INFO   | jvm 1    | 2018/11/14 11:57:06 | 
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | W [p.a.script                    ] [18:57:06]: Unable to run function "runAction(self, event)", code could not be compiled. project=Perspective_Scan, component=root/CoordinateContainer, view=Material_User/Log_On@C
INFO   | jvm 1    | 2018/11/14 11:57:06 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '\\n\\n' expecting INDENT", ('<function:runAction>', 6, 0, ''))
INFO   | jvm 1    | 2018/11/14 11:57:06 | 
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:57:06 | W [p.ClientSession               ] [18:57:06]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:57:09 | W [p.ClientSession               ] [18:57:09]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:57:11 | W [p.ClientSession               ] [18:57:11]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:58:13 | W [P.WebSocketChannel            ] [18:58:13]: Websocket connection closed unexpectedly. code=1006, reason=WebSocket Read EOF  
INFO   | jvm 1    | 2018/11/14 11:58:13 | I [p.ClientSession               ] [18:58:13]: WebSocket disconnected from session. 
INFO   | jvm 1    | 2018/11/14 11:58:18 | W [p.a.script                    ] [18:58:18]: Unable to run function "runAction(self, event)", code could not be compiled. project=Perspective_Scan, view=#129@D
INFO   | jvm 1    | 2018/11/14 11:58:18 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '<EOF>' expecting INDENT", ('<function:runAction>', 1, 27, 'def runAction(self, event):\n'))
INFO   | jvm 1    | 2018/11/14 11:58:18 | 
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:18 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:19 | W [p.a.script                    ] [18:58:19]: Unable to run function "runAction(self, event)", code could not be compiled. project=Perspective_Scan, view=#129@D
INFO   | jvm 1    | 2018/11/14 11:58:19 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '<EOF>' expecting INDENT", ('<function:runAction>', 1, 27, 'def runAction(self, event):\n'))
INFO   | jvm 1    | 2018/11/14 11:58:19 | 
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:58:19 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:04 | W [p.ClientSession               ] [18:59:04]: Unable to send 'project-update-ready' message to page '37fc0a87' project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:59:04 | java.io.IOException: Channel is not open.
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at com.inductiveautomation.perspective.gateway.model.PageModel.send(PageModel.java:226)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at com.inductiveautomation.perspective.gateway.session.AbstractSession.lambda$broadcast$20(AbstractSession.java:554)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at java.base/java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at com.inductiveautomation.perspective.gateway.session.AbstractSession.broadcast(AbstractSession.java:552)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at com.inductiveautomation.perspective.gateway.session.PerspectiveProjectSession$ProjectCacheListener.projectUpdatedInternal(PerspectiveProjectSession.java:255)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at com.inductiveautomation.perspective.gateway.session.PerspectiveProjectSession$ProjectCacheListener.lambda$projectUpdated$1(PerspectiveProjectSession.java:264)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at com.inductiveautomation.ignition.common.util.ExecutionQueue$PollAndExecute.run(ExecutionQueue.java:123)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:04 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:18 | I [P.Routes                      ] [18:59:18]: Encoded Message = AAAAEEphjXSipUs-t2ktDb-5OMD-Q9MNiDDx8Chf4hCxjv9G-aNCc9Vq_S78V5XQwyB1mZEom9EPCC5atYDWWvwnfrg= route-group=perspective, route-path=/challenge
INFO   | jvm 1    | 2018/11/14 11:59:20 | I [p.ClientSession               ] [18:59:20]: Socket connected to session. pageId=37fc0a87 project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:59:21 | I [p.ClientSession               ] [18:59:21]: Client Starting. Project='Perspective_Scan'. protocol=client-start, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:59:25 | W [p.ClientSession               ] [18:59:25]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:59:25 | W [p.a.script                    ] [18:59:25]: Unable to run function "runAction(self, event)", code could not be compiled. project=Perspective_Scan, component=root/CoordinateContainer, view=Material_User/Log_On@C
INFO   | jvm 1    | 2018/11/14 11:59:25 | org.python.core.PySyntaxError: SyntaxError: ("mismatched input '\\n\\n' expecting INDENT", ('<function:runAction>', 6, 0, ''))
INFO   | jvm 1    | 2018/11/14 11:59:25 | 
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at org.python.core.ParserFacade.parse(ParserFacade.java:205)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at org.python.core.Py.compile_flags(Py.java:1976)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:722)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:703)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:65)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:64)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:43)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:257)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:246)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:215)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:25 | 	at java.base/java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2018/11/14 11:59:27 | W [p.ClientSession               ] [18:59:27]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 11:59:29 | W [p.ClientSession               ] [18:59:29]: Received event for missing view "Navigation@C" project=Perspective_Scan, session-project=Perspective_Scan
INFO   | jvm 1    | 2018/11/14 12:00:31 | W [P.WebSocketChannel            ] [19:00:31]: Websocket connection closed unexpectedly. code=1006, reason=WebSocket Read EOF  
INFO   | jvm 1    | 2018/11/14 12:00:31 | I [p.ClientSession               ] [19:00:31]: WebSocket disconnected from session. 
INFO   | jvm 1    | 2018/11/14 12:01:02 | I [P.InternalDatabase            ] [19:01:02]: Creating auto-backup of internal database "config.idb"... 
INFO   | jvm 1    | 2018/11/14 12:01:02 | I [P.InternalDatabase            ] [19:01:02]: Created auto-backup of internal database "config.idb" in 243 ms

A post was split to a new topic: [Bug-11644] Gateway Receives Events For Missing Views

Could you copy the View here please? Hold Shift, and then right-click the View node and select “Copy JSON”, then save your clipboard contents to a file in your preferred text editor.

My suspicion is the View startup script as the stacktrace fires off almost immediately after the View is saved, but I don’t see anything wrong in the screenshot…

OH! It’s a different View! Log_on is the offender, not Navigate!

Sorry, I have a bad habit of only seeing what I’m looking for in Stacktraces.

Log_On.JSON (3.6 KB)
Navigate.JSON (6.2 KB)

… if I did that right…

good old “programming blinders” get me all the time as well…

guessing my navigation understanding is flawed by assumptions…

Placing those Views in my project fails to replicate the issue. How long has it been since you restarted your Designer? Have you tried turning it off and turning it back on again?

The missing View" lines of the stacktrace are something I occasionally encounter if my Designer has been left open for long periods of time and has encountered occasional periods of disconnection. Closing the Designer and relaunching it has always fixed those in the past (and yes, we’re aware of that).

UPDATE: I was able to hit the missing View issue with your Views. It’ll take me a while to figure out exactly what’s happening to trigger the warning.