# Notification Shows on Multiple Sessions

**URL:** <https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126>\
**Category:** Dashboard\
**Created:** [10 July 2019 19:26 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126 "2019-07-10T19:26:27Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Adl](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Adl](https://discourse.nodered.org/u/Adl)\
**Post date:** [2 December 2019 22:23 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/21 "2019-12-02T22:23:41Z")

</div>

it 's ok by checkbox Send to all browser sessions.

---

<div class="post-metadata">

**Author:** ![notnice](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@notnice](https://discourse.nodered.org/u/notnice)\
**Post date:** [12 March 2021 09:09 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/22 "2021-03-12T09:09:04Z")

</div>

I'm facing this issue of one of my Notifications being displayed in all browser windows although the Notification is configured not to:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/0/d0f9bfdc616094961116b8b82ac987d1e61fc54b.png)

I have other Notiifcation nodes in the workflow and they behave correctly. The only difference with this one is that its not got an output connected to it like the other do. Any ideas why the Notification is being sent to all browsers?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/1/d1baabaed26d2ff12386f23572d54ca74608335c.png)

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f1d55fc84a4933d8141884fda09f3442bef44824.jpeg)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [12 March 2021 09:52 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/23 "2021-03-12T09:52:35Z")

</div>

somewhere in the flow (probably that function just before) the `msg.socketid` that ties it to the correct session has been removed from the msg.

---

<div class="post-metadata">

**Author:** ![notnice](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@notnice](https://discourse.nodered.org/u/notnice)\
**Post date:** [12 March 2021 10:10 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/24 "2021-03-12T10:10:13Z")

</div>

Ok, saw mention about that in thread, but thought that was related to pre- the new option to disable sending to all browsers. I'll take a look, but not sure offhand why it would be removed just for this one.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [12 March 2021 10:22 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/25 "2021-03-12T10:22:20Z")

</div>

depends what that function is doing - if it is creating a new msg for the 3rd port then it won't have the socketid attached.

---

<div class="post-metadata">

**Author:** ![notnice](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@notnice](https://discourse.nodered.org/u/notnice)\
**Post date:** [12 March 2021 10:33 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/26 "2021-03-12T10:33:22Z")

</div>

Ah, that will be the problem. I was using good practice in multi-output function nodes not to over-write the original msg. I'll take a look at adding socket id to that msg later and let you know. Thx.

---

<div class="post-metadata">

**Author:** ![notnice](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@notnice](https://discourse.nodered.org/u/notnice)\
**Post date:** [12 March 2021 10:51 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/27 "2021-03-12T10:51:33Z")

</div>

Yep, thats fixed it thanks.  
My bad for assuming that leaving the option "Send to all browser sessions" unchecked would be sufficient. Should have tried the original solutuion before posting 🤐

---

<div class="post-metadata">

**Author:** ![sdrshnptl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdrshnptl/32/40446_2.png) [@sdrshnptl](https://discourse.nodered.org/u/sdrshnptl)\
**Post date:** [25 August 2022 06:20 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/28 "2022-08-25T06:20:57Z")

</div>

Hi @dceejay ,  
OK/Cancel dialog box are getting display to all screen despite unchecking tick box.  
is there any workaround to prevent it?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/4/f4e53f733f6fc29dd567e1bc4fb1790ffbbed60e.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 August 2022 09:45 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/29 "2022-08-25T09:45:07Z")

</div>

Did you clear the caches and refresh the screens in each browser?

---

<div class="post-metadata">

**Author:** ![sdrshnptl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdrshnptl/32/40446_2.png) [@sdrshnptl](https://discourse.nodered.org/u/sdrshnptl)\
**Post date:** [25 August 2022 11:01 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/30 "2022-08-25T11:01:33Z")

</div>

tried clearing cache and refreshing screen. no luck. getting popup on both screen

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [25 August 2022 11:06 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/31 "2022-08-25T11:06:28Z")

</div>

Are you sure that the `msg.socketid` is nowhere removed in your flow? You could check the input messages of your ui node (via Debug node).

---

<div class="post-metadata">

**Author:** ![sdrshnptl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdrshnptl/32/40446_2.png) [@sdrshnptl](https://discourse.nodered.org/u/sdrshnptl)\
**Post date:** [25 August 2022 11:21 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/32 "2022-08-25T11:21:33Z")

</div>

Hi @BartButenaers ,  
I'm not getting socketid at input of notification node, but getting at output side.  
How do i inject socket id from button to notification node?

---

<div class="post-metadata">

**Author:** ![sdrshnptl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdrshnptl/32/40446_2.png) [@sdrshnptl](https://discourse.nodered.org/u/sdrshnptl)\
**Post date:** [25 August 2022 11:27 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/33 "2022-08-25T11:27:51Z")

</div>

> [@BartButenaers](#):
>
> msg.socketid

Yes! you were right!  
I've passed msg.socketid to notification flow, now it's working as expected.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 September 2022 11:28 UTC](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126/34 "2022-09-08T11:28:31Z")

</div>

Closed on 8 September 2022 11:28 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/notification-shows-on-multiple-sessions/13126.md?page=1)
