Cancel is not a member of 'null' group

Hi, I have this rule that works one time, and then stops working with the error below.
Anyone have a clue what I’m doing wrong?

var Timer_genny_auto
rule "Generator"
        when
                Time cron "0 0/1 * * * ?"   // every hour
                //Item Voltage received update
                //Item VoltageTime changed
        then
        if (Generator.state == "ON"){
//                      sendCommand(generator_on, ON)
                        logInfo("voltage.rules", "Generator turned on automatically" )
                        if(Timer_genny_auto!==null) {
                                Timer_genny_auto.cancel
                                Timer_genny_auto = null
                        }
                        Timer_genny_auto = createTimer(now.plusSeconds(30)) [|{
//                        sendCommand(generator_off, ON)
                        logInfo("voltage.rules", "Generator turned off automatically" )
                        }]

                }else{
                        logInfo("voltage.rules", "Nothing works" )
                }
end

The error

 2021-02-02 07:28:00.001 [INFO ] [smarthome.model.script.voltage.rules] - Generator turned on automatically
2021-02-02 07:28:30.003 [INFO ] [smarthome.model.script.voltage.rules] - Generator turned off automatically
2021-02-02 07:29:00.001 [INFO ] [smarthome.model.script.voltage.rules] - Generator turned on automatically
2021-02-02 07:29:00.002 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Generator': 'cancel' is not a member of 'null'; line 12, column 26, length 23
2021-02-02 07:30:00.001 [INFO ] [smarthome.model.script.voltage.rules] - Generator turned on automatically
2021-02-02 07:30:00.002 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Generator': 'cancel' is not a member of 'null'; line 12, column 26, length 23

Have you tried

"!="

instead of

"!=="

The missing part within the body of your timer is setting itself to null, in preparation for future runs. That doesn’t happen automatically - you might want to reschedule it later instead, for example.

I don’t really understand that, I suspect it really means cannot cancel a completed timer. There was some minor bug around reschedule and completed in OH3.0, and it may be a manifestation of that.

It works like a charm now.
Seems to be that you can’t cancel an expired timer, and that threw up the whole rule.
Commented that line out, and now it just runs.

//        Timer_genny_auto.cancel