parse-community / parse-embedded-sdks

The Embedded SDKs for the Parse Platform
http://parseplatform.org
Other
246 stars 118 forks source link

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

Closed pascalgiguere closed 9 years ago

pascalgiguere commented 9 years ago

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.

mtl2034 commented 9 years ago

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?

pascalgiguere commented 9 years ago

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.

pascalgiguere commented 9 years ago

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

mtl2034 commented 9 years ago

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

abhirocks550 commented 8 years ago

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

mtl2034 commented 8 years ago

@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