myDevice.insert() error

Trying to populate a bucket but .insert keep returning error (sample below from console):

[2020-06-02 22:21:38] Field [variable] is missing
[2020-06-02 22:21:38] [{“variable”:“ordem”,“value”:“C41081”,“serie”:“315”,“time”:“06-02-2020 19:52:21”,“location”:{“lat”:-23.02194,“lng”:-43.48248},“metadata”:{“velocidade”:0,“direcao”:""}},{“variable”:“ordem”,“value”:“A41322”,“serie”:“315”,“time”:“06-02-2020 21:51:06”,“location”:{“lat”:-22.87433,“lng”:-43.24132},“metadata”:{“velocidade”:0,“direcao”:32}}, …

Which [variable] is it referring to? If I copy the JSON from console it imports fine using Emulator but gives error inside the Analysis.

Hi @mmoritz,
It seems that somewhere in your code you’re trying to insert a data without the variable parameter.

If this is not the case, maybe you have a payload parser in your device that is changing what you’re sending through the analysis.

In any case, I suggest you to go to your devices page Live Inspector and check what’s is being sent. The Live Inspector show any data that is being sent to your device, whatever it is wrong formated or not.

Thanks Vitor for your help. I found the problem, fixed and is working now.