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

Node-RED failing to update Smart-Nora with devices #102

Closed
sumnerboy12 opened this issue Sep 21, 2021 · 8 comments
Closed

Node-RED failing to update Smart-Nora with devices #102

sumnerboy12 opened this issue Sep 21, 2021 · 8 comments

Comments

@sumnerboy12
Copy link

sumnerboy12 commented Sep 21, 2021

User ID: BLaxAy5UbNOUhze71xYHedP96D62
Smart-Nora Version: 1.5.0
Node-RED Version: 2.0.6

I recently migrated my Node-RED instance from a docker container to a dedicated LXC container - so that I would get local execution working.

When I exported/imported all the Smart Nora flows I started seeing the error messages below, and https://smart-nora.eu/my-nora is showing zero devices.

I have tried deleting the default group but it keeps coming back with zero devices. I tried deleting the nora-config in Node-RED
and recreating, but no luck.

I tried adding a group name, since the error mentions a missing query param group - but that didn't help either.

Any idea what is going wrong here?

Sep 21 22:02:03 app01 Node-RED[790]: 21 Sep 22:02:03 - [warn] nora: <default> - unhandled error (trying again in 78 sec): HTTP response (400 {"description":"\"group\" query param missing"})
Sep 21 22:02:03 app01 Node-RED[790]: Error: HTTP response (400 {"description":"\"group\" query param missing"})
Sep 21 22:02:03 app01 Node-RED[790]:     at FirebaseSync.doHttpCall (/home/nodered/.node-red/node_modules/node-red-contrib-smartnora/build/nora/sync.js:221:27)
Sep 21 22:02:03 app01 Node-RED[790]:     at runMicrotasks (<anonymous>)
Sep 21 22:02:03 app01 Node-RED[790]:     at processTicksAndRejections (internal/process/task_queues.js:97:5)
Sep 21 22:02:03 app01 Node-RED[790]:     at async FirebaseSync.handleJob (/home/nodered/.node-red/node_modules/node-red-contrib-smartnora/build/nora/sync.js:169:21)
@sumnerboy12
Copy link
Author

After moving some of my nodes back to the docker based Node-RED instance, everything started working again. The Node-RED instance in the LXC container has no TLS certification - is that possibly causing a problem?

@andrei-tatar
Copy link
Owner

Most probably related to a bug in node-fetch: node-fetch/node-fetch#1300
Seems the latest version of node-fetch has a bug sending the query params... As a quick fix, you can manually install node-fetch version 2.6.1

cd ~/.node-red (or where your installation is)
npm install node-fetch@2.6.1

@sumnerboy12
Copy link
Author

That seems to have fixed it - thanks so much!!

So once node-fetch is patched I should be able to upgrade again?

@andrei-tatar
Copy link
Owner

Yes! Will probably be fixed with the next release of node-fetch (2.6.4)

@LinusU
Copy link

LinusU commented Sep 21, 2021

So sorry for the breakage! This was fixed in version node-fetch version 2.6.4 so if you try to upgrade again it should work...

@andrei-tatar
Copy link
Owner

@LinusU no worries, thanks for the update!

@andrei-tatar
Copy link
Owner

Actually, leaving the issue open in case other users installed the plugin yesterday.

@andrei-tatar andrei-tatar reopened this Sep 22, 2021
@andrei-tatar
Copy link
Owner

Haven't seen this error in the logs, so I will close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants