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
Failure after upgrading to 2.11.1 #102
Comments
Please can you let me know what versions of NodeJS & npm you are using, the operating system and version number, and whether this is a 'normal' installation or containerised in some way (e.g. Docker or Home Assistant) There have been several reports of similar problems which I have not yet been able to duplicate here. As much console output from Node-RED as it starts as possible would help, as I may be able to work out where the failure is occurring by seeing when the 'normal' messages stop. Also, did you upgrade from the palette, or using npm? |
Thanks for replying and I will try to give you as much detail as I can. I am using a "normal" installation of NodeRed (not containersided) on a VM (ProxMox) on a Debian OS NodeJS version is v10.22.0 (*) Problem was also on v1.1.0 Working node-red-contrib-rfxcom version is v.2.11.0 [info] Upgrading module: node-red-contrib-rfxcom to version: 2.11.1 After restarting NodeRed [info] Waiting for missing types to be registered: In NodeRed Palette it says : node-red-contrib-rfxcom 2.11.1 Hope this helps! I have a working snapshot of my environment so I am free to try / play around if needed. |
Thanks. Please can you send me the output of:
It is possible this file is corrupted somehow (or it may be somewhere down the |
Here is what I did.. I updated to the version 2.11.1 via Palette `2020-07-23T12:16:25.408Z Install : node-red-contrib-rfxcom 2.11.1 2020-07-23T12:16:26.695Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-rfxcom@2.11.1 I restarted NodeRed and entered the command 👍 `
*/ module.exports = function (RED) { // Set the rfxcom debug option from the environment variable // The config node holding the (serial) port device path for one or more rfxcom family nodes // Register the config node // An object maintaining a pool of config nodes
cs@srvlinux:~$ ` |
@cris1 That file looks OK. Your original log showed the "=" token on line 26:
was unexpected, which implies some file corruption somewhere. Do I understand you have tried another re-install from the palette? Do you get the same error, or is it working now? |
Hi Max,
You are right. The file looks ok, but the error is still there :
[image: image.png]
I don't see what is wrong as well.
I have removed some remark codes just to be sure to see the line number change
(and be sure this is the file used)
I have removed the line completely and retyped it...
I can't see what is wrong with the code..
node-red-contrib-rfxcom
2.11.1
SyntaxError: Unexpected token = (line:3)
Its the same line as you mentioned.
const rfxcom = require("rfxcom");
|
Just a wild idea, but try changing |
Unfortunately the same result 2.11.1
let rfxcom = require("rfxcom"); The strange thing is , everything works fine on the previous version.. no other updates are done except this. |
Hello, Same problem here since i upgraded. I don't remember which version i had before upgrading, it's been a long time i did not upgrade. I then uninstall the latest version and tried a previous one. In fact, it's starting version 2.7.0 that i have the error "SyntaxError: Unexpected token = " My nodered is in nodered, on the official nodered image, last version. Maybe this can help Regards Matz |
@matz33 - what version of NodeJS are you using, and which operating system? |
Node JS : v 10.21.0 Below the result of command i ran to have those infos under the docker container : bash-5.0$ nodejs -v bash-5.0$ cat /etc/os-release bash-5.0$ npm version |
@maxwellhadley If it helps you to have an Anydesk session where you can try some things out ,I'd be happy to provide that. Just let me know and we can setup something. |
I forgot : with 2.6.3 it is ok, no error. Except that the node keep saying "connecting..." |
Erm... version 2.6.3 of what? |
Of your module node-red-contrib-rfxcom. If I install 2.7.0 i start to have the error Unexpted token. With 2.6.3 it is ok |
That is odd.. for me the error starts when I upgrade to 2.11.1 .. This is a very strange issue.. (the common thing is is : failure happens after upgrading) .. maybe the version is not important then. |
I think I might be making progress. It's something to do with the version of the dependent package
I had to uninstall all four packages, it looks like npm isn't following the dependency chain all the way. This seems to lie behind the various 'version mismatch' errors people have been seeing - #99. (Note that I am using This isn't the whole story, but it may help. I will keep looking for the underlying cause, which I suspect is some construct provoking a NodeJS (V8) compiler bug |
I ran the command you sent (after installing nvm that i don't know at all), but i still get the error. Like you i don't have a line number) : [warn] [node-red-contrib-rfxcom/rfxcom] SyntaxError: Unexpected token = And after that flows are stopped : |
The line number "error" only appears in the NodeRed Palette for me (after upgrading) Meanwhile I updated another package through Palette (unifi) just to see if this worked , and that worked ok. |
@matz33 - when NodeRED starts, does it report the NodeJS version number as 12.something? I found that I had to start nodeRED from a terminal window to get it to 'see' the nvm-installed version of NodeJS. |
It seems I get the same problem, some details of the log: 29 Jul 11:43:18 - [warn] [node-red-contrib-rfxcom/rfxcom] Error: Cannot find module '@serialport/bindings'
29 Jul 11:43:18 - [info] Waiting for missing types to be registered: |
@paddenstoeltje - it looks like the The problem seems to be linked to NodeJS v10 on Linux |
Hi Max, thank you for your tip. I updated the serial port and it seems to be working with the latest version. |
Hi Max, It seems it's using NodeJS 10.21.0. I'm using the last container published by nodeRed here : https://hub.docker.com/r/nodered/node-red/ I start docker, i uninstall everything concerning rfxcom like you did above : I don't use nvm this time, i don't know how to use it, and it seems i don't have nodejs version 12, so i reinstall everything concerning RFXcom like you did above without "nvm use 12" : I got a looooong log after that, I attached it : Then i start nodered again and here is the log : node-red-docker@1.1.2 start /usr/src/node-red 29 Jul 16:14:21 - [info] Welcome to Node-RED 29 Jul 16:14:21 - [info] Node-RED version: v1.1.2 Your flow credentials file is encrypted using a system-generated key. If the system-generated key is lost for any reason, your credentials You should set your own key using the 'credentialSecret' option in 29 Jul 16:14:25 - [info] Waiting for missing types to be registered: And after that my flows are not launched. All i can do is uninstall node-red-contrib-rfxcom and force an install of version 2.6.3 : After that my flows works. but RFXCom nodes are in "Connecting..." mode, but this is maybe another problem. |
@matz33 - OK so this is the same problem, a just-plain-wrong syntax error message from the NodeJS V10 compiler, on Linux. Something in one of the updated packages, not necessarily Hopefully I will be able to get my Raspberry Pi back into the situation with the syntax error, and try manually reverting source code changes one-by-one until it goes away.. |
Thanks a lot Max. To be noted that now the RFXCom nodes are connected. Sometimes they don't connect. Trying to debug this until I get the latest version (after you will find the solution) is certainly a waste of time. |
@cris1 @matz33 - I think I found the issue. It's in a completely different file, part of another package! To test this out, please can you edit the file:
and comment out lines 156 & 157, like this:
For me, this suppresses the Fingers crossed! |
Hi Max, I might have a different version of security1.js. The file it exactly on the same spot, but it does not have the same text on the same line numbers. I will show you a dump starting from line 130 to 157 (where line 156 = module.exports = Security) My security1.js starts with : * Created by max on 11/07/2017. and is 5.2Kb `
} module.exports = Security1; |
That's the previous version. Are you currently seeing the Edit to add: If you aren't getting the error message, try adding a line
immediately after the closing |
Max It is working now ! I've done a complete reinstall under the nodered folder :
I edited the file "/node_modules/rfxcom/lib/security1.js" like you asked me. Line numbers was correct. I saved, restarted node red and voilà ! It is ok. Flows started with no errors, and my nodes are connected ! To be noted that in the log, with " | grep rfx", I have messages like "Unhandled packet type". I don't know if this happened before as i've never looked at this kind of logs before :
Thank you very much Max |
Oops, you are right.. I forgot to upgrade first. I upgraded to the new version.. then I had the security1.js as you described and I remarked the code as requested. NodeRed starts up perfectly now. |
@matz33 - What has happened there is the that the first few bytes of the response to the receiver start message have been misplaced. The response should have been:
In the lines that follow I can see where some of the missing bytes appear, out of order and mixed in with a bunch of lighting messages! I've not seen anything like this before! What firmware version is your RFXtrx running? |
It seems 1016. I never upgraded it, i'm always afraid of upgrading a firmware. Should i do it ? Here is the log from RFXmgr :
What is strange is that when i change something on node red, and redeploy, i have the "Connecting..." status on the RFX nodes, and logs are :
I unplug the RFXCom and replug, the nodes connect again. During that, including the unplug, logs are :
|
I have published version 2.11.2 to npm which includes this fix. Because it also downgrades |
@matz33 - This problem with messages getting disrupted is why you sometimes get stuck at the The strange thing I see is that bytes are not simply being dropped, but are appearing out of order! This could be happening either in the RFXtrx or in your computer, but not 'on the wire' between the two. I have not heard of such a problem before in the RFXtrx, but it could be a Docker problem with virtualising USB serial ports. Presumably the Docker host you are using was installed by Home Assistant - is it possible to check if it is at the latest (Docker) version? Also check on the HA forums if anyone else is seeing a similar problem. |
I'm not using Home Assistant at all. I don't know what it could give me. Nodered is enough for me. I'm using Docker on Synology. I had to install Domoticz to have the drivers for RFXCom on the Synology. And I added the Maybe i should upgrade firmware ? In your experience, it is not risky at all ? |
I have a couple of RFXtrx's I use for development which I have upgraded (& downgraded) many times without any problems. I always use the latest version of rfxmngr.exe from the RFXCOM website, and I always run on a 'normal' windows machine (i.e. not a virtual PC). I've used Windows 7 & 10 without problems. I have never tried using Docker (or HA, or Domoticz) |
Hi Max, upgraded to v2.11.2 from a snapshot running the v2.11.0 through the NodeRed Palette and that worked flawless. Everything ok now! Thanks a lot! |
Hi, same here : i upgraded successfully. I'm still having problems to get it working though. This is the case since a lot of time, i gave up, and these days i tried to make it run again. That's why i upgraded to last version and then had the installation probleme and my posts here. @maxwellhadley I will open a new case if necessary, unless is it is related to a docker problem. I upgraded the rfxcom to last fimrware (1025). I installed last node-red-contrib-rfxcom version, and you know i uninstall and resintall all serial and rfxcom components. Here is what i have :
Here are the logs (grep rfxcom) with my comments: After sarting nodered and "connecting..." only :
After unplugging and replug of the rfxcom and having "Ok (v1025 ext 2)" after that :
After redeploying the flow and hving only "Connecting..." after that :
|
@matz33 - please open a new issue: this problem may well be Docker related, but it isn't anything to do with the original bug in 2.11.1 which I think is now fixed. I will close this issue and work on the new one, my chance to learn how to use Docker... |
Node-RED v1.1.2
After Palette upgrade software -->
[info] Waiting for missing types to be registered:
[info] - rfxtrx-port
[info] - rfx-lights-in
[info] - rfx-lights-out
Never had this issue before.
The text was updated successfully, but these errors were encountered: