[IGN-15889]Error in Vision client when receiving a message

I’m working with ignition 8.3.4. When receiving a message in a vision client, I get the following error in the client console:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "com.inductiveautomation.ignition.common.script.message.MessageHandlerManager.processMessage(String, org.python.core.PyDictionary)" because "this.manager" is null
at com.inductiveautomation.factorypmi.application.script.ScriptMessageReceiver.receive(ScriptMessageReceiver.java:43)
at com.inductiveautomation.factorypmi.application.script.ScriptMessageReceiver.receive(ScriptMessageReceiver.java:23)
at com.inductiveautomation.ignition.client.gateway_interface.AbstractPushNotificationListener.lambda$receiveNotification$0(AbstractPushNotificationListener.java:31)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

The message is run correctly and executes its thing, but i’m trying to remove all warnings and this keeps popping up.

Gateway is running on a Linux server and the client on a windows machine. If that helps.

Am I doing something wrong or is a internal Ignition bug?

This is an internal bug. It looks similar to something we already had in our bug tracker, but I'm looking into whether it's the same thing or different enough to justify a new ticket.

I went ahead and opened a new issue for this.

Can you provide any more information about how you got into this state (or send me a backup of your system?)

Does the error cropping up have anything to do with when you're saving or making changes in the project in the designer? How many (guesstimate is fine) script messages are you sending/how often?

As far as I am aware, this happens every time I’m sending a message. Nothing to do with saving the project (found that issue and I thought this was different enough to justify a new one).

The system is not in production yet, so there are almost no messages being sent, except the ones I’m testing.

I’m sending the message to a specific clientId, though I’ve tested it without it and it does the same.


system.util.sendMessage('project',
                        'message',
                        {},
                        clientSessionId='226A6EAB', <- Replace with the corrrect Id
                        scope='C')

The project is migrated from 7.9, to 8.1.48 (don’t remember exactly this step), to 8.3.1, to 8.3.4. I don’t know if migrating generated the problem. I’m running it with the trial as I’m doing the migration in the DEV server. In the version 8.3.1 also happened, but at the time I got a lot more issues to solve.

Also, the project inherits from another (a global project generated during migration). The message handlers are all in the main project and the global project has no messages.

I tried adding a message in the global project, as I’ve seen somewhere that if there are no messages the HandlerManager may not be initialized, and the error keeps happening.

This happens if one client calls another or if calling the message handler from the console using the following:

sessions = system.util.getSessionInfo()
for session in sessions:
    system.util.sendMessage(session['project'],
                            'message',
                            {'clientId': session['clientId']},
                            clientSessionId=session['clientId'],
                            scope='C')

Only sends to the vision client (the desinger is opened but it is not sent anything).

I hope this is enough to debug, if you cannot reproduce I’ll make a sanitized version of the project and send it to you.