Hi, I am encountering a JavaScript error while working with ChirpStack OS v4.5.4, raspberry pi Zero w and rak2287. The error description is as follows:
I see nothing wrong with the code besides maybe the fact that encodeDownlink doesn’t have a proper return (which I’m sure you’ve tried multiple ways). Have you tried removing the encodeDownlink function entirely? It’s not strictly necessary, I never use it and just send hex from the UI to my devices directly.
Also incase you are unaware: the input given to the decodeUplink function has an input.bytes and an input.fPort property. You must take the input.bytes and extract the temperature yourself from the bytes. Clearly what you are doing is just a test case though.
So I fixed this by modifying the chirpstack.init script so the generated Toml file includes this parameter. Persistent across Chirpstack OK reboots … but not upgrade friendly
Unfortunately, I don’t have enough dev skills to propose a code change to support this param natively
I am hitting that exact same “JS error: Error: interrupted” (aka JS Codec timeout) on my Raspberry PI 0 W with Chirpstack OS v4 (just made a new fresh install because of SD Card corruption on the PI …). I remember I was hitting the same issue on Chirpstack V3 - even for the most basic codec JS code.
As far as I remember, increasing max_execution_time did the trick …
Can you guide me on how to change this value on Chirpstack OS v4 (and make it persistent) ? I am a bit lost with the new UCI config model for Chirpstack OS, which file I should tweak, etc …
Try uci show chirpstack, I don’t have my Pi with me so I can’t do this myself but that should show you all of the configuration options that you can change with UCI. If max_execution_time is a setting there then you can change it with a UCI commit (if you share the output of the UCI show and it has the setting I could tell you the commit command), if it’s not a setting you will likely have to do what you did in V3 of changing the configuration load script.