Error while trying firmware OTA

Hello,

I am testing the firmware OTA operation in Cumulocity and although the procedure was working ok yesterday, today I get this error:

Operation updated: status: "FAILED", failure reason: "Unexpected failure of operation. Details: Cannot invoke "com.cumulocity.lwm2m.agent.server.device.nodevisitors.C8yLwM2mNodeVisitor.getValue(String)" because "this.visitor" is null ...", description: "Update firmware to:

So it seems that there is an issue with Cumulocity itself as I get this error as soon as I press the install firmware button.

thanks

Hi Haris,

We investigated the issue and found that the operations are failing because the server evaluates the device as offline.

The Root Cause:
The device is currently configured with a registration lifetime of only 1 second (lifetimeInSec=1). This means that exactly one second after the device do a new registration or registration update, the server marks it as offline, blocking any subsequent operations.

How to Resolve This:
To fix this, the registration lifetime needs to be increased. You can do this in one of two ways:

  • Device-Side Update: Increase the lifetime value directly within the device’s configuration.
  • Via LwM2M Configuration UI from the Device management: Go to the device’s LwM2M Configuration UI → Servers written during bootstrap, update the “Registration lifetime” field (which is written during bootstrap), and then trigger a new bootstrap for the device.

Note: We recognize that the error message you encountered wasn’t very clear, and our team will be updating it to ensure it provides better context in the future.

Weird. It was working yesterday and as I stated the error is immediate after the button press. The operation is normally scheduled for next registration so the device is not registered when we press the button for OTA.

After I press the button I get this:

  • Jun 4, 2026, 1:20:03 PMOperation created.

    Operation created: status: “PENDING’, description=‘Update firmware to: “ads700_v5.10.1” (version: 5.10.1)’, device name='ADS700”.

  • Jun 4, 2026, 1:20:03 PMOperation updated.service_lwm2m-agent

    Operation updated: status: “EXECUTING”, description: “Update firmware to: “ads700_v5.10.1” (version: 5.10.1)”", device name: “ADS700”.

It states Executing without the device having received the command.

When an operation is in the Executing status, the LWM2M Service sends the command directly to the device. If a response is not received until time out, the service is designed to automatically revert the operation back to a PENDING status so it can be retried as soon as the device reconnects during its next registration.
The timeout period is by default is 3 minutes and this is also configurable in device’s LWM2M Configuration UI.

If the service already detects that a device is offline, it intentionally holds back the operation to prevent unnecessary failed delivery attempts. However, in your case, instead of gracefully moving the operation back to PENDING to wait for the next check-in, the service failed it directly.

This is not the intended behavior, and we will soon updating the handling on the Service side so that these operations are correctly queued for retry in the future.

We still highly recommend increasing your device’s registration lifetime value. The currently set to 1 second (lifetimeInSec=1) window is incredibly narrow; it causes the device to be considered as offline almost instantly from the service’s perspective.

Gotcha. Thanks.

One more thing, it seems that if I include both objects 5000 and 5 (firmware) then the registration fails. But when I include only one of the two, registration is successful. Do you recommend anything here?:

objArray\[0\] = get_security_object_x509(

    123,

    "coaps://lwm2m.eu-latest.cumulocity.com:5784",

    NULL, 0, NULL, 0, false);

objArray\[1\] = get_server_object(123, "U", 1, 0);

objArray\[2\] = get_object_device();

objArray\[3\] = get_object_senml();

objArray\[4\] = get_object_firmware();

I am using the wakaama library. I did change the lifetime variable btw that’s just old code

Cumulocity’s LWM2M Service don’t have a restriction regarding the objects and you can include all the supported objects.

However, in order to do firmware updates with Cumulocity object 5 should be available.