# Node-red-contrib-ui-web-push Url is called incorrectly

**URL:** <https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [1 February 2023 13:34 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559 "2023-02-01T13:34:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![EIKSEU](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eikseu/32/73538_2.png) [@EIKSEU](https://discourse.nodered.org/u/EIKSEU)\
**Post date:** [1 February 2023 13:34 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/1 "2023-02-01T13:34:13Z")

</div>

Hello, Thanks for the Nodered node works 👍. My problem is that the URL is not called correctly after clicking on the received message. I have the dashboard via a reserve proxy with ssl. The URL is [https://domain](https://domain/), but it calls [http://domain/ui](http://domain/ui) can I change the setting?  
thank you mfg

---

<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:** [1 February 2023 19:02 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/2 "2023-02-01T19:02:35Z")

</div>

Hi @EIKSEU,

I am going to share the link to your Github [issue](https://github.com/bartbutenaers/node-red-contrib-ui-web-push/issues/9) here also. Posting the same question simultaneously on two locations won't speed up the process of getting feedback...

I assume then that there is a bug then in my code that determines the dashboard path (see [here](https://github.com/bartbutenaers/node-red-contrib-ui-web-push/blob/master/web_push_client.js#L456)). You can search that web\_push\_client.js file on your filesystem, and set the `dashboardPath` for example by a hardcode path of your choice until it works. If I know what is wrong in that code snippet (to determine the dashboard path) for your use case, I can try to fix it afterwards.

Bart

---

<div class="post-metadata">

**Author:** ![EIKSEU](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eikseu/32/73538_2.png) [@EIKSEU](https://discourse.nodered.org/u/EIKSEU)\
**Post date:** [2 February 2023 06:38 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/3 "2023-02-02T06:38:31Z")

</div>

Hello, thanks for the quick response, will continue to write here, ok?

I've now entered the correct path at that point but it still appends /ui... and thus opened incorrectly the rest of the path is correct.

Kind regards

---

<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:** [3 February 2023 06:52 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/4 "2023-02-03T06:52:33Z")

</div>

Hmm, that is not what I had expected. Although it is quite a long time ago that I worked on that node, and I might be mistaken...

1. Can you share a screenshot of the code snippet with your change. Just to make sure you have manipulated the code correctly.
2. That code is inside an endpoint that is called by your browser to load the _ **nodered\_push\_service.js** _ file, which will contain your manipulated path. But your browser has cachec that file, so it might be that he keeps using the old cached file (containing the old path). Can you try the flow [here](https://github.com/bartbutenaers/node-red-contrib-ui-web-push#force-reload-of-service-worker) on my readme page. When you inject the message, the browser should reload that file.
3. If that doesn't work, can you try by clearing your browser cache?
4. And if that doesn't work, can you try to find that file somewhere in your browser developer tools? I don't know by head, but I can have a look tonight after work

---

<div class="post-metadata">

**Author:** ![EIKSEU](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eikseu/32/73538_2.png) [@EIKSEU](https://discourse.nodered.org/u/EIKSEU)\
**Post date:** [3 February 2023 19:57 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/5 "2023-02-03T19:57:00Z")

</div>

Ok suddenly it works ... was probably still in the cache. Should that meanwhile also work with an I-Phone?

---

<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:** [3 February 2023 21:01 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/6 "2023-02-03T21:01:25Z")

</div>

> [@EIKSEU](#):
>
> Ok suddenly it works ... was probably still in the cache.

Ah ok, that is good news.

Am I correct that there is no way for my node to calculate your path, since your reverse proxy determines it outside of Node-RED? If that would be the case, my node should offer a way to enter the path manually via the node's config screen?

> [@EIKSEU](#):
>
> Should that meanwhile also work with an I-Phone?

Don't know, I'm not welthy enough to buy Apple stuff 😉

LMGTFY:  
In Safari 16 in macOS 13 or later, Safari supports _web push_ — push notifications that use the cross-browser Push API, Notifications API, and Service Worker standards.

But I have no clue whether my node will work. If you are lucky then somebody will test it, fix it and do a pull request to make sure my node can support Apple devices. But I would not count to much on that ...

---

<div class="post-metadata">

**Author:** ![EIKSEU](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eikseu/32/73538_2.png) [@EIKSEU](https://discourse.nodered.org/u/EIKSEU)\
**Post date:** [4 February 2023 15:50 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/7 "2023-02-04T15:50:14Z")

</div>

Actually, the url domain is recognized, only "/ui" was always appended at the end,  
...yes, that would also be a possibility if you can simply specify the url yourself.  
I also tried the node on an iPhone because Apple now offers web push, but this brings an error "Cannot get subscription from serviceworker: AbortError: No connection to push daemon" This error comes immediately when the website opens without pressing the button. ..and the button is no longer clickable.

---

<div class="post-metadata">

**Author:** ![EIKSEU](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eikseu/32/73538_2.png) [@EIKSEU](https://discourse.nodered.org/u/EIKSEU)\
**Post date:** [4 February 2023 15:55 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/8 "2023-02-04T15:55:44Z")

</div>

can you tell me something about "[https://discourse.nodered.org/t/apache2-reserve-proxy-mp4](https://discourse.nodered.org/t/apache2-reserve-proxy-mp4)"?

Thank you Mfg

---

<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:** [4 February 2023 22:57 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/9 "2023-02-04T22:57:21Z")

</div>

As mentioned above, if somebody will do a pull request for iPhone I will be happy to merge it.  
But I don't have free time enough to digg into this at the moment. Moreover I prefer to migrate my stuff to the Flexdash from @tve, instead of keep spending my time developing stuff in my old ui nodes for the old dashboard.  
Otherwise my stuff will never end up in Flexdash...

---

<div class="post-metadata">

**Author:** ![EIKSEU](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eikseu/32/73538_2.png) [@EIKSEU](https://discourse.nodered.org/u/EIKSEU)\
**Post date:** [6 February 2023 17:37 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/10 "2023-02-06T17:37:04Z")

</div>

Ok thanks for the knot and your help.👍

---

<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:** [7 April 2023 17:37 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-web-push-url-is-called-incorrectly/74559/11 "2023-04-07T17:37:22Z")

</div>

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