[Solved] Error updating Table through API

Hi,

I’m running my own blynk-server version 0.27.1 and I’m trying to update a Table Widget by means of an API call, and I’m getting a HTTP 500 error. This is my API call:

curl -v 'http://energio.tech:8080/[MYTOKEN]/update/v7?value=add&value=2&value=Martes&value=120Kwh'

I’ve checked the blynk.log (with log.level=trace) and what I see is this:

21:49:06.606 DEBUG- In http and websocket unificator handler.
21:49:06.606 DEBUG- GET : /[MYTOKEN]/update/v7?value=add&value=2&value=Martes&value=120Kwh
21:49:06.606 ERROR- Error invoking handler. Reason : null.
21:49:06.606 DEBUG- java.lang.NullPointerException

If the Blynk app is open in my iPhone, nothing is updated, but after closing and re-open it, the table has the updated data despite the 500 error.

Any idea? Sounds like a bug. Let me know if you need more info.

Thanks!

@jschwindt thanks! This was actually a bug. Fixed. Will be available in 0.27.2 release.

Wow, that was fast! Thank you @Dmitriy! I’ll give it a try and let you know how it works.

1 Like

Hi! I’ve have just tried the same API call using yesterday’s server-0.27.2-SNAPSHOT.jar and I got almost the same error:

12:07:16.687 DEBUG- In http and websocket unificator handler.
12:07:16.687 DEBUG- GET : /[MYTOKEN]/update/v7?value=add&value=2&value=Martes&value=120Kwh
12:07:16.687 DEBUG- Re registering http channel. [id: 0x34e3bb23, L:/10.0.0.4:8080 - R:/181.171.196.71:61383]
12:07:16.688 ERROR- Error invoking handler. Reason : null.
12:07:16.688 DEBUG- java.lang.NullPointerException
12:07:16.688 DEBUG- Re registering http channel finished.

Is it suppose to be fixed with the snapshot that I’m using?

Thanks,
Juan.

@jschwindt if you look in the jar it looks like it was created 7th Sept and just in preparation for the next version. Think you need to wait for the official build. The commits look to be at https://github.com/blynkkk/blynk-server/commit/8c754f3698be285da65ac191c55ad6da5cb7941f and https://github.com/blynkkk/blynk-server/commit/24af6145cc9e846a8d25595d3e502e73a352458c but I don’t think you can apply them as patches.

@jschwindt I just made a release with above fix - https://github.com/blynkkk/blynk-server/releases/tag/v0.27.2

Thank you very much! I’ve just tried it and I can confirm that it works as expected!

1 Like