Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosing downstream messages from widget to node after deploy. #1432

Open
beckflorian opened this issue Oct 31, 2024 · 0 comments
Open

Loosing downstream messages from widget to node after deploy. #1432

beckflorian opened this issue Oct 31, 2024 · 0 comments
Labels
bug Something isn't working needs-triage Needs looking at to decide what to do

Comments

@beckflorian
Copy link

Current Behavior

I am working on a custom node with integrated widget. The Node and the Widget exchange information through a pub/sub model. When I (re)start nodered everything works fine. I send and receive messages via socket.
Now I change something in the flow and deploy.
After that I do not receive the downstream messages via socket any more.
When I reload the browser everything is fine again.

Expected Behavior

Deploying the flow should not change the message flow from the widget to the node.

Steps To Reproduce

This is my first issue...

I am working on an custom node with integrated widget.
https://github.com/beckflorian/ui-mainswitch.git

Currently i am working on (hopefully) the last major bug. I have done a lot of debugging... somehow I loose downstream socket connection after deploy...

When the state of the switch in the widget changes I emit a message to the server:

Client-Side code:

updateMainswitch(){
    console.info('downMainswitch' +  this.id + ': payload: ' + this.condition.mainSwitch)
    this.$socket.emit('downMainswitch' + this.id, this.id, { payload: this.condition.mainSwitch }))
},

console on client:
downMainswitch5ce8f224cea1234b: payload: 1

My server-side code:

onSocket: {
     // widget sends change of mainSwitch
    ['downMainswitch' + node.id]: function (conn, id, msg) {
        console.info('downMainswitch' + node.id + ' received:', conn.id, id, msg)
        setMainSwitch(msg.payload);
    },

console on server:
downMainswitch5ce8f224cea1234b received: 64_P1qA1L1UeAJMoAAAB 5ce8f224cea1234b { payload: 1 }

After Deploy:
Console on client shows the same output.
Console on Server: no output.

Is it a bug in my code or a bug in the dashboard?
Joepavitt sugested to open an isue on this...

Environment

  • Dashboard version: 1.18.1
  • Node-RED version: 4.02
  • Node.js version: 22.5.1
  • npm version: 10.8.2
  • Platform/OS: The same on Raspbian with different versions od termux on android
  • Browser: Firefox or Chrome

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

@beckflorian beckflorian added bug Something isn't working needs-triage Needs looking at to decide what to do labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Needs looking at to decide what to do
Projects
Status: Backlog
Development

No branches or pull requests

1 participant