parse-community/parse-embedded-sdks

Arduino Yún: Error 107 "invalid JSON" when repeatedly saving an object

pascalgiguere opened this issue · 6 comments

I have a very basic Arduino Yún sketch which only saves a new object with a hardcoded key-value pair every minute.

void loop() {
  ParseObjectCreate create;
  create.setClassName("TestObject");
  create.add("testKey", 27.6);

  ParseResponse response = create.send();
  Serial.print(response.getJSONBody());
  response.close();

  delay(60000);
}

This will successfully save the object initially.

However if I keep the sketch running for a while (~30 minutes), I will start getting the error {"code":107,"error":"invalid JSON"} on every save.

Restarting the sketch will make saves work again, until I wait ~30 minutes and it stops working again.

Hi, I suspect this happens because of memory leaks. What version of the library do you use? We fixed number of memory leaks back in April and we had some performance fixes recently.
If you are not using 1.0.1-rc3 can you try it?

I was using version 1.0.0 (which is currently linked in Parse.com's guides).
It does seem like a memory leak. I will try 1.0.1-rc3 and report back.

7 hours running and no error anymore, so the issue seems resolved.
Thanks for the quick reply!

Glad to hear. I am going close this issue then. If you encounter it again please reopen.

How can i update my library to 1.0.1-rc3. Can you please help? @mtl2034

@abhirocks550, what platform do you use? Please note we recently released version 1.0.1. If it is for Arduino Yun follow this updated quickstart: https://www.parse.com/apps/quickstart#embedded/arduinoyun