# Message not reaching session message handler

**URL:** <https://forum.inductiveautomation.com/t/message-not-reaching-session-message-handler/116138>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [June 24, 2026, 6:33pm UTC](https://forum.inductiveautomation.com/t/message-not-reaching-session-message-handler/116138 "2026-06-24T18:33:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aymen.mehrez.ca](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aymen.mehrez.ca](https://forum.inductiveautomation.com/u/aymen.mehrez.ca)\
**Post date:** [June 24, 2026, 6:33pm UTC](https://forum.inductiveautomation.com/t/message-not-reaching-session-message-handler/116138/1 "2026-06-24T18:33:21Z")

</div>

Hi,  
I'm sending a message from a button to a Session-scoped message handler, but the handler never fires.

Button runAction:

```python
def runAction(self, event):
    system.perspective.sendMessage(self.view.params.MessageHandler,payload={},scope=self.view.params.MessageHandlerScope)
	system.util.getLogger('button').info('message sent to |' + self.view.params.MessageHandlerScope + '| '+ '|' + self.view.params.MessageHandler + '|')

```

Console output:

```python
message sent to |Session| |LeaveSession|

```

Session Event \> Message: LeaveSession:

```python
def handleMessage(session, payload):
	system.util.getLogger('handler').info('message received')

```

The button logs that the message was sent, but the handler's 'message received' log never appears. am i missing something?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 24, 2026, 6:42pm UTC](https://forum.inductiveautomation.com/t/message-not-reaching-session-message-handler/116138/2 "2026-06-24T18:42:54Z")

</div>

Unless it's something new to me, your syntax should be:

```python
system.perspective.sendMessage(
    self.view.params.MessageHandler,
    payload = {},
    scope = 'view'
)

```

> **[system.perspective.sendMessage | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.3/appendix/scripting-functions/system-perspective/system-perspective-sendMessage)**
>
> Send a message to a message handler within the same session.

---

<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:** [June 24, 2026, 7:24pm UTC](https://forum.inductiveautomation.com/t/message-not-reaching-session-message-handler/116138/3 "2026-06-24T19:24:11Z")

</div>

I'm pretty sure the scope argument is case sensitive.

---

<div class="post-metadata">

**Author:** ![aymen.mehrez.ca](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aymen.mehrez.ca](https://forum.inductiveautomation.com/u/aymen.mehrez.ca)\
**Post date:** [June 25, 2026, 12:19pm UTC](https://forum.inductiveautomation.com/t/message-not-reaching-session-message-handler/116138/4 "2026-06-25T12:19:47Z")

</div>

fixed the syntax but that was not the main issue

```python
message sent to |session| |LeaveSession|

```

as mentioned in the docs:

> **[system.perspective.sendMessage | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.3/appendix/scripting-functions/system-perspective/system-perspective-sendMessage)**
>
> Send a message to a message handler within the same session.

> Send a message to a **[component message handler](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/scripting-in-perspective/component-message-handlers)** within the same session. This function cannot interact with Session Message Handlers configured in Session Events, even if the `scope` of session is specified.

instead i have to use

```python
system.util.sendMessage(...)

```
