-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Syntax Error Message on node Remove Binary Prefix and parse DevAddrfunction #1
Comments
I've had that issue as well before. Are you on the latest version that's using Buffers from the UDP in? |
yes, I'm using 'buffer' in the UDP in node and I did a git fetch on friday so I should be on the newest version |
I use the multi protocol packet forwarder (mp_pkt_fwd). May the behaviour of the flow depend on the used packet forwarder? |
I believe the problem are UDP packets send by the GW without any json content. This happens in my configuration about every 5sec. This packest just include
A JSONparse of such a message will lead to the error message. So I changed the JS code of the node to the following content and than the error message will disapear: function reverse (src) { return buffer inputBuf = msg.payload;
}` So you have to test for empty string before parsing. Because I'm no JS expert, maybe there are better solutions. Up to now it works for me. Thanks. |
I get the following error message on node
27.3.2020, 12:46:58node: Remove Binary Prefix and parse DevAddrfunction : (error)
"SyntaxError: Unexpected end of JSON input"
The text was updated successfully, but these errors were encountered: