What happened to [System]Client

I have a process that was reading the following tag:

[System]Client/Network/Hostname

In version 8.1.36 this tag does not exist. I was using this to determine if a Designer was being used. Is there another way to determine if Designer is being used?

That tag still exists. What context are you trying to read it from, and what is your evidence it no longer exists?

1 Like

First off, I acknowledge I was using it for something different than it was probably intended. I have a custom logging component that will (used to) log to the console window when the script is called from the designer, otherwise, when the script is run from a gateway event log statements go to a file.

In the tag browser in Designer, the only folder under the [System] tag provider is 'Gateway'.

image

In script console, attempting to read this tag results in a wall of red:

host = system.tag.readBlocking(["[System]Client/Network/Hostname"])[0].value

Furthermore, I found some language in the docs that indicate the Client tags are only applicable to Vision clients (now?)

System Tags - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)

System Client Tags (Vision Only)

Client-scoped System Tags provide status information about the client's system. They can be used with the Vision module for any Vision Client.

Seems this may be the solution:

system.util.getSystemFlags - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)

There is a bit that tells you if you're using Designer, exactly what I needed in the first place.

I have a dev server on 8.1.36, and that tag is still there.
image

You can get designer info from system.util.getSessionInfo, e.g.

addresses = [s['address'] for s in system.util.getSessionInfo() if s['isDesigner']]
print addresses
print len(addresses)

But it sounds like this would be better for your use case
Get current scope in scripting - General Discussion - Inductive Automation Forum

That's for Vision client tags, not the system client tags.

The Client folder doesn't exist in the [System] provider outside Vision Client scopes.

Point taken, but how can he not see them from a designer?

The tag browser conforms itself to the scope of the workspace currently active. If not the Vision workspace, no Vision-specific stuff will be there.

But it did in earlier versions...

I had system.tag.readBlocking(["[System]Client/Network/Hostname"]) for the past two years or so, it was working, installed 8.1.36 yesterday and today it chokes.

I'm looking at a v8.1.28 instance at the moment, with no Vision module installed, and it simply doesn't have it.

Edit: Interesting. With this kit, if I run this in a script console:

print system.tag.readBlocking(['[System]Client/Network/Hostname'])[0]

I get this:

Java Traceback:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
	at com.inductiveautomation.ignition.client.sqltags.impl.SystemTagManager.lambda$readAsync$2(SystemTagManager.java:178)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollate$0(GroupMapCollate.java:25)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollateIndexed$5(GroupMapCollate.java:53)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.inductiveautomation.ignition.common.util.Futures.sequence(Futures.java:29)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollateIndexed(GroupMapCollate.java:62)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollate(GroupMapCollate.java:28)
	at com.inductiveautomation.ignition.client.sqltags.impl.SystemTagManager.readAsync(SystemTagManager.java:171)
	at com.inductiveautomation.ignition.client.tags.impl.ClientTagManagerImpl.lambda$readAsync$0(ClientTagManagerImpl.java:212)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollate$0(GroupMapCollate.java:25)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollateIndexed$5(GroupMapCollate.java:53)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.inductiveautomation.ignition.common.util.Futures.sequence(Futures.java:29)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollateIndexed(GroupMapCollate.java:62)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollate(GroupMapCollate.java:28)
	at com.inductiveautomation.ignition.client.tags.impl.ClientTagManagerImpl.readAsync(ClientTagManagerImpl.java:210)
	at com.inductiveautomation.ignition.common.tags.model.TagManager.readAsync(TagManager.java:62)
	at com.inductiveautomation.ignition.client.script.ClientTagUtilities.readBlockingImpl(ClientTagUtilities.java:186)
	at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.readBlocking(AbstractTagUtilities.java:484)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
java.lang.NullPointerException: java.lang.NullPointerException

	at org.python.core.Py.JavaError(Py.java:547)
	at com.inductiveautomation.ignition.client.script.ClientTagUtilities.readBlockingImpl(ClientTagUtilities.java:189)
	at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.readBlocking(AbstractTagUtilities.java:484)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
	at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.__call__(ScriptManager.java:552)
	at org.python.core.PyObject.__call__(PyObject.java:461)
	at org.python.core.PyObject.__call__(PyObject.java:465)
	at org.python.pycode._pyx9.f$0(<input>:1)
	at org.python.pycode._pyx9.call_function(<input>)
	at org.python.core.PyTableCode.call(PyTableCode.java:173)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1687)
	at org.python.core.Py.exec(Py.java:1731)
	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:277)
	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:130)
	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:626)
	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:614)
	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at com.inductiveautomation.ignition.client.sqltags.impl.SystemTagManager.lambda$readAsync$2(SystemTagManager.java:178)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollate$0(GroupMapCollate.java:25)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollateIndexed$5(GroupMapCollate.java:53)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.inductiveautomation.ignition.common.util.Futures.sequence(Futures.java:29)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollateIndexed(GroupMapCollate.java:62)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollate(GroupMapCollate.java:28)
	at com.inductiveautomation.ignition.client.sqltags.impl.SystemTagManager.readAsync(SystemTagManager.java:171)
	at com.inductiveautomation.ignition.client.tags.impl.ClientTagManagerImpl.lambda$readAsync$0(ClientTagManagerImpl.java:212)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollate$0(GroupMapCollate.java:25)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollateIndexed$5(GroupMapCollate.java:53)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.inductiveautomation.ignition.common.util.Futures.sequence(Futures.java:29)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollateIndexed(GroupMapCollate.java:62)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollate(GroupMapCollate.java:28)
	at com.inductiveautomation.ignition.client.tags.impl.ClientTagManagerImpl.readAsync(ClientTagManagerImpl.java:210)
	at com.inductiveautomation.ignition.common.tags.model.TagManager.readAsync(TagManager.java:62)
	at com.inductiveautomation.ignition.client.script.ClientTagUtilities.readBlockingImpl(ClientTagUtilities.java:186)
	... 25 more
Traceback (most recent call last):
  File "<input>", line 1, in <module>
	at com.inductiveautomation.ignition.client.sqltags.impl.SystemTagManager.lambda$readAsync$2(SystemTagManager.java:178)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollate$0(GroupMapCollate.java:25)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollateIndexed$5(GroupMapCollate.java:53)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.inductiveautomation.ignition.common.util.Futures.sequence(Futures.java:29)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollateIndexed(GroupMapCollate.java:62)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollate(GroupMapCollate.java:28)
	at com.inductiveautomation.ignition.client.sqltags.impl.SystemTagManager.readAsync(SystemTagManager.java:171)
	at com.inductiveautomation.ignition.client.tags.impl.ClientTagManagerImpl.lambda$readAsync$0(ClientTagManagerImpl.java:212)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollate$0(GroupMapCollate.java:25)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollateIndexed$5(GroupMapCollate.java:53)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.inductiveautomation.ignition.common.util.Futures.sequence(Futures.java:29)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollateIndexed(GroupMapCollate.java:62)
	at com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollate(GroupMapCollate.java:28)
	at com.inductiveautomation.ignition.client.tags.impl.ClientTagManagerImpl.readAsync(ClientTagManagerImpl.java:210)
	at com.inductiveautomation.ignition.common.tags.model.TagManager.readAsync(TagManager.java:62)
	at com.inductiveautomation.ignition.client.script.ClientTagUtilities.readBlockingImpl(ClientTagUtilities.java:186)
	at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.readBlocking(AbstractTagUtilities.java:484)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
java.lang.NullPointerException: java.lang.NullPointerException

Null Pointer Exceptions are always a bug.

I would expect system client tags to exist in the designer even without Vision.

And I would not. :man_shrugging:

:man_shrugging:

:man_shrugging::man_shrugging: They did exist :slight_smile:

Opening a support ticket would get a definitive answer.

1 Like

That's what I'm doing. There are other things I'm noticing that changed between 8.1.34 and 8.1.36 that align to some of what I see in the release notes.

Seems that before 8.1.36 they treated the designer more like a vision client (maybe a subclass?) but now it's it's own thing. I found another call that is now listed as 'Vision Scoped' (don't know if that changed recently) that I know worked from the designer session previously:

I'll try and remember to come back here when I get a path forward.

2 Likes

I can promise none of those semantics changed between 8.1.34 and 8.1.36. The only significant change that would have affected things would be the tag reference tracker.

Actually... is this in an existing designer? Does the system client tag read work on a fresh designer launch, i.e. it only breaks after you swap projects in the designer? (Grasping at straws, but could be related to another bug I recently fixed that was caused by other changes from the tag reference tracker refactoring).

Yeah... so I did something bone-headed. I'll share here to maybe spare someone else from making the same mistake. When I upgraded from 34 to 36 I unchecked the box to install the Vision module. We don't use Vision, we use Perspective, so I figure why install a module we don't plan on using.

Turns out, installing that module changes the designer behavior. Everything I was noticing that seemed off was restored by installing 36 with the Vision module... even though we don't "use" it, I guess we actually do rely on it.

3 Likes

Ah! Yeah, that definitely explains it.

There's a lot of implicit interconnection between the designer and Vision, since Vision long, long predates Perspective and the entire idea that we might have multiple visualization systems (or even gateways with Vision at all).

Some of that debt is getting paid down in 8.3, such as system.util.getConnectionMode becoming system.vision.getConnectionMode to clarify the distinction, but we don't (currently) have any plans to change the client system tags. Though, maybe we should...

2 Likes

@PGriffith Can you recommend a method to detect when the Designer is being used, that would be possibly more sustainable long term? Or is that something that would have to be built?

I found that without Vision installed, the system.util.getSystemFlags() method didn't even exist. Now that I have the Vision module installed, I can use that function to tell if I'm using the Designer, so that does exactly what I needed, but depends on Designer being treated like a Vision client