Authentication Module Issue with Auto Login 8.1

I recently upgraded a custom authentication module from version 7.9 to 8.1. Everything worked for testing except one strange issue with Auto Login. The project would login normally until Auto Login was selected. Auto Login would fail and all other types of logins now fail. Unchecking the box does not fix the issue. The following is the error that comes up. The only way I know to repair the issue is to import the project into another without importing the project properties.

Can you copy that full stack trace and post it here?

There should be an error logged to the gateway logs when this happens too, though it’s capped at once per minute so you may not see it on subsequent errors if they occur quickly.

Can you get the actual text…?

java.lang.reflect.InvocationTargetException: null

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 com.inductiveautomation.ignition.gateway.servlets.gateway.functions.Login.getVisionProjectAuthenticationStrategy(Login.java:159)

at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.Login.client(Login.java:337)

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 com.inductiveautomation.ignition.gateway.servlets.gateway.AbstractGatewayFunction.invoke(AbstractGatewayFunction.java:225)

at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:405)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:86)

at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1391)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:547)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607)

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297)

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577)

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)

at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)

at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)

at org.eclipse.jetty.server.Server.handle(Server.java:500)

at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)

at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)

at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ClassCastException: class com.inductiveautomation.factorypmi.application.model.properties.LoginProps cannot be cast to class com.inductiveautomation.factorypmi.application.model.properties.LoginProps (com.inductiveautomation.factorypmi.application.model.properties.LoginProps is in unnamed module of loader com.inductiveautomation.ignition.gateway.modules.ModuleClassLoader @1ebec3a6; com.inductiveautomation.factorypmi.application.model.properties.LoginProps is in unnamed module of loader com.inductiveautomation.ignition.gateway.modules.ModuleClassLoader @60ccc54d)

at com.inductiveautomation.factorypmi.gateway.VisionGatewayHook.lambda$getLoginProps$5(VisionGatewayHook.java:400)

at java.base/java.util.Optional.map(Unknown Source)

at com.inductiveautomation.factorypmi.gateway.VisionGatewayHook.getLoginProps(VisionGatewayHook.java:398)

at com.inductiveautomation.factorypmi.gateway.VisionGatewayHook.getAuthenticationStrategy(VisionGatewayHook.java:421)

… 52 common frames omitted

Hmm. Can you upload/share your module? Just the binary for now would be okay, no source code.

I believe the issue is that you are including a copy of the Ignition SDK depency (vision-client-10.0.1.jar) in your module when it’s built.

If you’re using Maven the scope for all SDK dependencies should be provided.

edit: you may need to restart the gateway after getting your module rebuilt and installed.

I checked all POM files. They all show scope being provided.

com.inductiveautomation.ignitionsdk
ignition-common
${ignition-sdk-version}
pom
provided

    <dependency>
        <groupId>com.inductiveautomation.ignitionsdk</groupId>
        <artifactId>client-api</artifactId>
        <version>${ignition-sdk-version}</version>
        <type>pom</type>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.inductiveautomation.ignitionsdk</groupId>
        <artifactId>designer-api</artifactId>
        <version>${ignition-sdk-version}</version>
        <type>pom</type>
        <scope>provided</scope>
    </dependency>

There’s gotta be something causing those dependencies to be added. If you’ve already checked all the pom files see if the version of the ignition-maven-plugin is older - I think the latest version was 1.1.0.

Not sure how it happened but did find the culprit. Reference to vision using 10.0.1 and set to compile.