Updating to node-red-node-sqlite v2.0.0 broke my flows

Has anyone else updated their node-red-node-sqlite to v2.0.0 and experienced missing nodes and thus a broken flow?

Hi is it the sqlite node that is "missing" or are other nodes showing as missing?

If you want to revert temporarily in FlowFuse you can set the module version number in settings -> palette, add or update the entry node-red-node-sqlite, save

Any chance you could post a copy of the logs from the node-red instance (from the node-red logs tab in flowfuse) before you revert though please? (feel free to DM me if sensitive)

I had already reverted back to node-red-node-sqlite v1.1.1 by installing it manually from the command line, but I just updated it again so I could capture the logs for you.

OK, so this is a Remote instance running on a Pi?

Looks like a 64bit Pi from the logs.

I'm about to hit the road, but will test the 2.0.0 build on a Pi when I get home.

1 Like

Ahhh, just spotted the error in the logs.

What version of Raspbery Pi OS are you running (how old is it, it looks like the sqlite binary is expecting a newer glibc version)

It's a Pi 5 running running Bookwork with all of the latest updates.

Just checked the version of GLIBC on the Pi using ldd --version and it is 2.36.

I have another Pi here running Trixie and I checked it and it has version 2.41.

The issue would be that I have a lot of Pi's in production running Bookworm already.

Yeah, the sqlite binary is expecting at least GLIBC 2.38.

The problem is the nodejs pacakge this is all based on has been basically abandoned, the last update (a few weeks ago) is very likely to be the last ever build and we needed to move up to close a HUGE number of CVEs that were open for it's tar dependency.

So the choices are going to be live with the old version of the node-red-node-sqlite or upgrade to Trixie.

I am now glad that @dceejay made it a major version bump as that does imply a possible breaking change.

1 Like

You may also be able to force a local recompile once it's been installed by running

npm run rebuild

in the sqlite3 directory under the /opt/flowfuse-device/project/node_modules directory, but that would be a manual step after the deploy, so not great

OK, tested npm run rebuild and that works for bookworm

1 Like

Did you mean npm rebuild?

Did you mean npm rebuild?

Very much no

npm rebuild does not actually rebuild from the source code in this case, it just downloads the pre-built version

npm run rebuild is a script in the sqlite3 package.json that actually does rebuild from source.

Yes I know this breaks the built in commands, but not my circus and not my monkeys

Which folder is it necessary to run that from? When I run it in .node-red it says it is missing the script 'rebuild'.

My first post is pretty clear, it needs to be run in the sqlite3 directory.

The original question is specific to the FlowFuse Device Agent, but in a generic Node-RED install it would be .node-red/node_modules/sqlite3

Sorry, I missed that post (or forgot about it).

I looked up the process for upgrading Bookworm to Trixie, and it looks like a lot of work, especially as a clean install is recommended. I understand that versions have to move forward, but it leaves me wondering if GLIBC 2.38 is such a leap forward from 2.36, and if it was really that difficult to accommodate both. As they say, is the juice worth the squeeze?

I doubt this was a conscious choice by the sqite3 folk is will just be down to what they built the pre-compiled binaries on, which I suspect will be a version of Ubuntu (most likely a GitHub Action runner) which is using GLIBC 2.38.

But as I mention, that team is no more, this was the last build to clear a bunch of tar dependency CVEs and sqlite3 is now listed as deprecated and unmaintained.

We will need to find a replacement long term, but this was a best option in the short term.

I think that should be 'now listed as deprecated'.

yes, it should