Session message handler not working on 8.1.44

Possible Bug?
So I backup my gateway, and restore it on latest ignition 8.1.44. - Did I miss to configure any setting??

This was working on 8.1.37

Problem: Message Handler configured in View, not receiving Message send by Session

Button Action
image

	
	system.util.sendMessage(
		project = system.project.getProjectName(), 
		messageHandler = "sessionMsgHandler", 
		payload={}, 
		scope="S"
	)
	
	logger = system.util.getLogger("sessionBug")
	
	logger.info("sent message to sessionMsgHandler")

On Session Event Message Handler:

On View's Message Handler:

Logs:

Maybe I'm stating the obvious, but your view with the event handler is open when you're calling it?

1 Like

We are on 3.1.44 too and session messages are working well for us. It must be a problem with your project.

Is there any error in your logs ?

Session message handler are able to received messages.
It is either Session not sending system.perspective.sendMessage or view not listening to "Session" Scope.
-- but view session scope is working, when messages are sent from view.

@diamond are you doing system.perspective.sendMessage from your session?

Nope, no error on gateway log.

I just tried and it works just fine.
As Michael asked: Are you trying this when the view is opened ? It needs to be opened for the message handler to be active.

Thanks for testing on your side.

Yes, view is open.. The button sending message, and the message handler receiving are on the same view.

I will keep on troubleshoot then..

Session messages sent with system.util.sendMessage() can only be caught by message handlers defined on the session. Component message handlers can only catch messages sent with system.perspective.sendMessage().

in perspective I call system.util.sendMessage for session's message handler.
In session message handler I call system.perspective.sendMessage for view's message Handler.

But in my case, view's message handler does not receive the message.

I don't have to time to troubleshoot, as this is urgent, so I reverted back to 8.1.37.

1 Like