I am getting this error while trying to log in. I essentially use a scanner to grab a bar code from a badge and log in with that. When I type in the barcode it works, but when i scan my badge it does not. the code is below the fault. using V7.8
Message: Login failed.
Time: Wed Apr 7 2:21:53PM
Severity: ERROR
Logger: ignition.application.script.builtin.SecurityUtilities
Stack Trace: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unrecognized authentication challenge type. <br> at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:327) <br> at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:301) <br> at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:258) <br> at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:884) <br> at com.inductiveautomation.factorypmi.application.runtime.ClientGatewayConnection.doLogin(ClientGatewayConnection.java:100) <br> at com.inductiveautomation.ignition.client.gateway_interface.AbstractGatewayConnection.login(AbstractGatewayConnection.java:900) <br> at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.login(SecurityUtilities.java:78) <br> at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.switchUser(SecurityUtilities.java:104) <br> at sun.reflect.GeneratedMethodAccessor575.invoke(Unknown Source) <br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <br> at java.lang.reflect.Method.invoke(Unknown Source) <br> at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186) <br> at com.inductiveautomation.ignition.common.script.ScriptManager\$ReflectedInstanceFunction.__call__(ScriptManager.java:435) <br> at org.python.core.PyObject.__call__(PyObject.java:404) <br> at org.python.core.PyObject.__call__(PyObject.java:408) <br> at org.python.pycode._pyx89.f\$0(<event:mouseReleased>:34) <br> at org.python.pycode._pyx89.call_function(<event:mouseReleased>) <br> at org.python.core.PyTableCode.call(PyTableCode.java:165) <br> at org.python.core.PyCode.call(PyCode.java:18) <br> at org.python.core.Py.runCode(Py.java:1275) <br> at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:631) <br> at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:590) <br> at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:170) <br> at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:265) <br> at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55) <br> at com.sun.proxy.\$Proxy22.mouseReleased(Unknown Source) <br> at java.awt.Component.processMouseEvent(Unknown Source) <br> at javax.swing.JComponent.processMouseEvent(Unknown Source) <br> at java.awt.Component.processEvent(Unknown Source) <br> at java.awt.Container.processEvent(Unknown Source) <br> at java.awt.Component.dispatchEventImpl(Unknown Source) <br> at java.awt.Container.dispatchEventImpl(Unknown Source) <br> at java.awt.Component.dispatchEvent(Unknown Source) <br> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) <br> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) <br> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) <br> at java.awt.Container.dispatchEventImpl(Unknown Source) <br> at java.awt.Window.dispatchEventImpl(Unknown Source) <br> at java.awt.Component.dispatchEvent(Unknown Source) <br> at java.awt.EventQueue.dispatchEventImpl(Unknown Source) <br> at java.awt.EventQueue.access\$500(Unknown Source) <br> at java.awt.EventQueue\$3.run(Unknown Source) <br> at java.awt.EventQueue\$3.run(Unknown Source) <br> at java.security.AccessController.doPrivileged(Native Method) <br> at java.security.ProtectionDomain\$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) <br> at java.security.ProtectionDomain\$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) <br> at java.awt.EventQueue\$4.run(Unknown Source) <br> at java.awt.EventQueue\$4.run(Unknown Source) <br> at java.security.AccessController.doPrivileged(Native Method) <br> at java.security.ProtectionDomain\$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) <br> at java.awt.EventQueue.dispatchEvent(Unknown Source) <br> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) <br> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) <br> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) <br> at java.awt.EventDispatchThread.pumpEvents(Unknown Source) <br> at java.awt.EventDispatchThread.pumpEvents(Unknown Source) <br> at java.awt.EventDispatchThread.run(Unknown Source) <br>Caused by: java.lang.IllegalArgumentException: Unrecognized authentication challenge type. <br> at com.inductiveautomation.ignition.common.user.AuthChallenge.fromJSON(AuthChallenge.java:64) <br> at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.Login.client(Login.java:74) <br> at sun.reflect.GeneratedMethodAccessor16.invoke(null) <br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(null) <br> at java.lang.reflect.Method.invoke(null) <br> at com.inductiveautomation.ignition.gateway.servlets.gateway.AbstractGatewayFunction.invoke(AbstractGatewayFunction.java:209) <br> at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:345) <br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) <br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) <br> at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85) <br> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837) <br> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) <br> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) <br> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) <br> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) <br> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160) <br> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) <br> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) <br> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092) <br> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) <br> at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) <br> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) <br> at org.eclipse.jetty.server.Server.handle(Server.java:518) <br> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308) <br> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244) <br> at org.eclipse.jetty.io.AbstractConnection\$ReadCallback.succeeded(AbstractConnection.java:273) <br> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) <br> at org.eclipse.jetty.io.SelectChannelEndPoint\$2.run(SelectChannelEndPoint.java:93) <br> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246) <br> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156) <br> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) <br> at org.eclipse.jetty.util.thread.QueuedThreadPool\$3.run(QueuedThreadPool.java:572) <br> at java.lang.Thread.run(null) <br>
Stack Trace: com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:327)
com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:301)
com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:258)
com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:884)
com.inductiveautomation.factorypmi.application.runtime.ClientGatewayConnection.doLogin(ClientGatewayConnection.java:100)
com.inductiveautomation.ignition.client.gateway_interface.AbstractGatewayConnection.login(AbstractGatewayConnection.java:900)
com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.login(SecurityUtilities.java:78)
com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.switchUser(SecurityUtilities.java:104)
sun.reflect.GeneratedMethodAccessor575.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.__call__(ScriptManager.java:435)
org.python.core.PyObject.__call__(PyObject.java:404)
org.python.core.PyObject.__call__(PyObject.java:408)
org.python.pycode._pyx89.f$0(<event:mouseReleased>:34)
org.python.pycode._pyx89.call_function(<event:mouseReleased>)
org.python.core.PyTableCode.call(PyTableCode.java:165)
org.python.core.PyCode.call(PyCode.java:18)
org.python.core.Py.runCode(Py.java:1275)
com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:631)
com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:590)
com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:170)
com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:265)
com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)
com.sun.proxy.$Proxy22.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$500(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
# This script was generated automatically by the navigation
# script builder. You may modify this script, but if you do,
# you will not be able to use the navigation builder to update
# this script without overwriting your changes.
password = system.gui.passwordBox("Scan Badge")
system.nav.openWindow("Main Windows/TableImport")
window = system.gui.getWindow("Main Windows/TableImport")
data = window.rootContainer.getComponent("User Table").data
system.nav.closeWindow("Main Windows/TableImport")
user_name = ""
for row in range(data.rowCount):
index_row = data.getValueAt(row, 3)
if index_row == password:
user_name = data.getValueAt(row, 1)
break
#Disables Read-Only-Mode, starts timer
system.util.setConnectionMode(3)
system.tag.writeToTag("System1/Project1/ReadModeOnly", 0)
system.tag.writeToTag("System1/Project1/TimerState", 1)
success = system.security.switchUser(user_name, password)
# If the login didn't work, give input focus back to the
# username component, so that the user can try again
if not success:
system.tag.writeToTag("System1/Project1/ReadModeOnly", 1)
system.tag.writeToTag("System1/Project1/TimerState", 0)
system.nav.openWindow("Nav")
window = system.gui.getWindow("Nav")
window.rootContainer.getComponent("Timer").value = 1