Using bucket in Analysis with "Device Data Optimized (immutable)" type on Device

Using bucket in Analysis with "Device Data Optimized (immutable)" type on Device

Greetings,

I'm having problem with using bucket on my analysis. For example, my code is:

  const bucket_device = scope[0].bucket;
  console.log("bucket:  ",bucket_device);

With a device created using "Not Optimized (Legacy)" type, I have the output:

[2023-04-21 18:37:16] bucket: 62e851d1cd808e0019cb56fx

With a device created using "Device Data Optimized (immutable)" type I have this:

[2023-04-21 18:44:24] bucket: undefined
And because of this error my automation are not working. Another information is that this 2 devices are in different profiles, but I check and didn't see anything strange.


Could please someone help me?

If more information is needed please let me know.


Thanks in advance,


Felipe