bestlong / node-red-contrib-mssql-plus

A Node-RED node to read and write to Microsoft MS SQL Databases
MIT License
31 stars 18 forks source link

Older SQL Node are not properly configured #94

Closed softy2k closed 2 weeks ago

softy2k commented 4 months ago

About 5 years ago I created a flow with various nodes, including some nodes with SQL. Over time, I updated nodeJS, Node-Red etc.

Most of the SQL nodes are unchanged in the editor (about 5 years old). Now, if I want to edit any old SQL node, I get the error:

The workspace contains some nodes that are not properly configured:
     [Home] Test (MSSQL)
Are you sure you want to deploy?

NodeError

So, it is enough just to edit a SQL node (Edit MSSQL node), click randomly in the open editing window) even without changing anything, and then when I press the Done button I receive the message The workspace contains some nodes that is not properly configured.

The machine on which the flow runs:

The SQL node runs without problems, only this disturbing message appears. And if I refresh the page in the browser, the error message disappears, but reappears if I try to edit the respective SQL node again. Most likely this bug is quite old.

I am also attaching a sample of the exported node: OldSqlNode.json

bestlong commented 4 months ago

Hi @softy2k change SQL node Output property from [realmin] to [payload] then deploy flow and reflash browser.

softy2k commented 4 months ago

Nothing changed, same issue...

Steve-Mcl commented 4 months ago

5 years is a very long time and it is possible something that changed in the node or config node does not have a clean and direct in-place upgrade.

My recommendation is: Open the node, edit the config node, press done on the config node, press done on the mssql node. Deploy, refresh.

If that doesn't work, delete the config node and add a new one (it can be set exactly the same)

Let me know if that solves it please.

softy2k commented 4 months ago

If I create a new SQL node ... all is OK. But I have a few dozen old SQL node. To manually edit each one separately would take me too much time.

Steve-Mcl commented 4 months ago

Did you try editing 1 config node? Did that not fix all?

Try explicitly what I asked please:

Open the node, edit the config node, press done on the config node, press done on the mssql node. Deploy, refresh

Steve-Mcl commented 4 months ago

Also, export a good node and a bad node. See what the differences are. It will be helpful for us to fix something broke and to provide you with a quick fix.

softy2k commented 4 months ago

Did you try editing 1 config node? Did that not fix all? Already tried...

Sql Nodes: Old and New (created from 0) OldAndNew.json

softy2k commented 4 months ago

I found 3 differences: modeOpt , queryOpt and rows. All 3 are empty (have value "").

In Old node I have : "rows": "" If I change in file to "rows": "rows" , it seems to work

softy2k commented 4 months ago

Can I help with anything else?

Steve-Mcl commented 4 months ago

Hey @softy2k I think that is enough to see what is going on.

Tbh, this is quite the edge case and your fix has been recorded in this issue so if one of us don't get around to handling this large step upgrade issue, at least there is a way to get up and running.

caccia86 commented 1 month ago

Hi, just for notice I also encountered the same issue and I temporarily resolved with the workaround. (https://github.com/bestlong/node-red-contrib-mssql-plus/issues/94#issuecomment-1959113621).

softy2k commented 1 month ago

I'm still waiting for a fix (new release)

Steve-Mcl commented 2 weeks ago

See this thread for how to get working with Node 20

https://discourse.nodered.org/t/unsupported-engine/88759/7?u=steve-mcl