listDeviceRequest is returning an empty list

Hi All,

I am using grpc C++ API on V4 Chirpstack.

When I query using any list operation, specifically lets say listDeviceRequest. I can see that total_count returns a valid value, but the list in the result is empty and the iterator loop terminates immediately.

Here is the code snippet. total_count is 1 but result() returns an empty list.

  std::cout << "Total Devices Count = " << listDeviceResponse->total_count() << std::endl;
  for (const auto& device : listDeviceResponse->result())
    std::cout << "\tDevice " << << std::endl;
    std::cout << "\t\tID: " << device.dev_eui() << std::endl;

I tried both mutable result and non mutable result and the behaviour is same. Can anyone please help here?


If you are not specifying the limit field, then the default is 0, which only gives you the count as the result. To get a result-set, set the limit to for example 10.


Thanks Brocaar. It worked for devices. But not for tenants, Strange though.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.