[BUG-12126] Cannot Execute system.tag.readAll With Client Tags In Script Console

In trying to execute the following…

tag_names = ['[System]Gateway/SystemName', '[System]Client/User/Username', '[System]Client/User/OSUsername']
tags = system.tag.readAll(tag_names)
print tags

Getting NPE

Java Traceback:
Traceback (most recent call last):
File “”, line 2, in
at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
at com.inductiveautomation.ignition.client.script.LegacyClientTagUtilities.read(LegacyClientTagUtilities.java:142)
at com.inductiveautomation.ignition.common.script.builtin.LegacyTagUtilities.readAll(LegacyTagUtilities.java:191)
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.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at org.python.core.Py.JavaError(Py.java:552)
at com.inductiveautomation.ignition.common.script.builtin.LegacyTagUtilities.readAll(LegacyTagUtilities.java:193)
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:188)
at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.call(ScriptManager.java:436)
at org.python.core.PyObject.call(PyObject.java:480)
at org.python.core.PyObject.call(PyObject.java:484)
at org.python.pycode._pyx74.f$0(:3)
at org.python.pycode._pyx74.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at org.python.core.Py.exec(Py.java:1658)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)
at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:131)
at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:116)
at com.inductiveautomation.ignition.desgner.gui.tools.jythonconsole.JythonConsole$InterpreterWorker.doInBackground(JythonConsole.java:476)
at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$InterpreterWorker.doInBackground(JythonConsole.java:464)
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.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
at com.inductiveautomation.ignition.client.script.LegacyClientTagUtilities.read(LegacyClientTagUtilities.java:142)
at com.inductiveautomation.ignition.common.script.builtin.LegacyTagUtilities.readAll(LegacyTagUtilities.java:191)
… 25 more
Caused by: java.lang.NullPointerException
at com.inductiveautomation.ignition.client.sqltags.impl.SubManagerAdapter.lambda$readAsync$1(SubManagerAdapter.java:126)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Traceback (most recent call last):
File “”, line 2, in
at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
at com.inductiveautomation.ignition.client.script.LegacyClientTagUtilities.read(LegacyClientTagUtilities.java:142)
at com.inductiveautomation.ignition.common.script.builtin.LegacyTagUtilities.readAll(LegacyTagUtilities.java:191)
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.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.NullPointerException

Would expect a list of qualified values returned.

Running 8.0.0-beta0 (b2018121302) in the Script Console.

I’m able to replicate this in the script console, although the function seems to be working correctly in the Client; I will open a ticket.

Please note that the readAll function is essentially deprecated, and has been replaced by readAllAsync.
Also note that Client Tags are not accessible in Perspective Sessions, so expect null values with Bad_NotFound quality for any Client tags in Perspective.

Ok, thanks. Its failing in other parts of my scripts in the Designer too, so debugging is a bit difficult.

Understood. Like the new scope details in the docs. At this point, I’m just checking upgrade paths of existing 7.9 Vision code.

It’s specifically Client tags (try removing the Client tags and suddenly it works fine). Not sure if that helps you for now, but I noted it in the ticket.

Hi Ryan,

This issue was fixed in the build that was uploaded today (1/10). Please let us know if you continue to see this behavior after upgrading.

1 Like