# Session message handler not working on 8.1.44

**URL:** <https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 15, 2024, 3:10am UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647 "2024-11-15T03:10:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [November 15, 2024, 3:10am UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/1 "2024-11-15T03:10:11Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3eba8a76b8c41bd12280d363c6ecd9dc0aa2a1c7.png)

```python
	
	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:**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/403efd35b798d7699affacefaa65dbe8c89981cf.png)

**On View's Message Handler:**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b0ee4736db724125839b1abb3f95321439544c92.png)

**Logs:**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/619b4bd8731dfa7757b7857eaf2996bf08ab1177.png)

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [November 15, 2024, 4:33am UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/2 "2024-11-15T04:33:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [November 15, 2024, 7:15am UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/3 "2024-11-15T07:15:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 15, 2024, 12:19pm UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/4 "2024-11-15T12:19:07Z")

</div>

Is there any error in your logs ?

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [November 15, 2024, 1:41pm UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/5 "2024-11-15T13:41:19Z")

</div>

> [@diamond](#):
>
> We are on 3.1.44 too and session messages are working well for us. It must be a problem with your project.

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?

> [@pascal.fragnoud](#):
>
> Is there any error in your logs ?

Nope, no error on gateway log.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 15, 2024, 1:46pm UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/6 "2024-11-15T13:46:43Z")

</div>

> [@Eugene49](#):
>
> @diamond are you doing `system.perspective.sendMessage` from your session?

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.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [November 15, 2024, 1:50pm UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/7 "2024-11-15T13:50:29Z")

</div>

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..

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 15, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/8 "2024-11-15T14:09:28Z")

</div>

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()`.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [November 16, 2024, 12:59am UTC](https://forum.inductiveautomation.com/t/session-message-handler-not-working-on-8-1-44/98647/9 "2024-11-16T00:59:15Z")

</div>

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.
