I have this bug with OH Build 2.2 and 2.2.0 Javascript Transformation and after with
2.3 and 2.3.0 Javascript Transformation. I can try but i’m not sure that it corrects the problem.
Maybe I will try to downgrade java runtime.
(function(i) {
if (i === 'on')
return "ON";
else if (i === 'off')
return "OFF";
})(input)
there is nothing in rules for this
all this “copy past” is the last version of my code, this code generate always the same error since the start
sometimes this error happen in 4 days, sometimes in 10 days.
2018-10-06 02:37:03.040 [ERROR] [ab.binding.exec.internal.ExecBinding] - transformation throws exception [transformation=JS(parseEpson.js), response=]
org.openhab.core.transform.TransformationException: An error occurred while loading script.
Since it happens intermittently, it could be that you have a time out and that would generate an error in the transformation.
Have you tried increasing the timeout to 10 seconds or maybe more?
I haven’t been following this thread that closely so I apologize if this has already been mentioned.
What if i !== 'on' and i !== 'off'? The transform doesn’t return anything. I can easily see that causing an error. I’d at least add an else and return something meaningful for the case when i doesn’t match either if clause.
Hello rlkoshak
No because at the beginning of the problem I had an ELSE for this situation.
For the lasted test I have removed it but I think It’s better with a ELSE.
Dear all,
For the moment I have removed the line with parseEpson.js
But this morning new problem without the line :
2018-10-12 22:47:43.139 [WARN ] [lipse.jetty.server.AbstractConnector] -
java.io.IOException: Too many open files
Maybe there is a link between parseEpson.js error and this error
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1418
virtual memory (kbytes, -v) unlimited
I’m on Mac Sierra OS.
I think if I increase the number of max file I probably stop the error of parseEpson.js
I will do it Monday !
I will let you know if it corrects the problem.