Snapshots starting with 2.5.0~S1568-1 broke JSONDB parsing

  • Platform information:
    • Hardware: Raspberry Pi 3B
    • OS: Openhabian / Debian Stretch
    • openHAB version: 2.5.0~S1569-1

I just updated to the above snapshot. Now I all my zwave devices disappeared from the configuration and I got a whole bunch of errors in the log which all look like this:

2019-04-13 20:42:15.108 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn’t deserialize value ‘org.eclipse.smarthome.storage.json.internal.StorageEntry@11bd7de’. Root cause is: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $.channels[0]
2019-04-13 20:42:15.274 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn’t deserialize value ‘org.eclipse.smarthome.storage.json.internal.StorageEntry@1a14140’. Root cause is: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at path $.channels.segments

Is there a known issue. Any idea how to resolve that? I was on a slightly older snapshot already so it wasn’t a big jump in the snapshot version at all. I even think that yesterday there was no update shown.

Any hint how to fix the issue would be very nice.

This appears to be an issue with the database rather than the binding - the binding doesn’t interact with the database. It looks like the database is corrupt - you could try one of the backups, although the database should have tried them automatically.

Sounds similar to Released: Openhab2 Amazon Echo Control Binding (controlling alexa from openhab2), where things are also disappearing…

@maggu2810, @cweitkamp, @wborn Would you know of any recent change that could have caused this?

1 Like

Interesting is just that all my Hue connected devices and Echo things are there, just all z-wave are missing. Could be a conincidence though.
Any hint how to work with “the backups”? I also should have a Amanda based backup available but would need to know what to restore from there. Any pointer?

If I remember correctly, all things are stored in the same database file, so it’s a bit strange that this is only occurring with one binding.

Is there a way to find out which json file might be corrupted?

Tried to understand the Thing db.
From the errors it is often Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $.channels[0]

What I find is that the HUE things now contain channel definitions which are not formatted as array of objects but directly as object. Ok, they seem to be single objects so actually not really an array but does the jsondb implementation still expect an array?

All affected things (with channels) are HUE items if that helps anything.

@cweitkamp I suspect that this broke through https://github.com/openhab/openhab-core/pull/693 as the storage is using the Thing objects (and unfortunately not the DTOs), which have been changed in that PR.

@Wolfgang_Rosenauer May I ask you to enter an issue about it at https://github.com/openhab/openhab-core/issues? Thanks!

Opened an issue on github.
Also downgraded to snaphost 1566 which seems to give me pretty much my system back from a first look. (That means snapshot 1568 already shows the issue for me; not only 1569)

Same

Update to 1569 broke all Zwave things => they are gone. Re add stick and notes: Zwave fine. Edit one of that things: error 409 conflict (think with same thing from version 1562 not deleted and not shown anymore)
Will go back to 1562, because 1566 kills zwave (unititialised) too

I did not see that one coming. Will provide a fix for it or revert the changes in the Thing / Bridge objects. Sry for inconveniences.

1 Like

Same issue. I am on the #1566. Just loosing the settings of the zwave controller when restarting the RPi. Every Zwave Thing is found again at every restart. All settings of other bindings are there.

PR is in place: https://github.com/openhab/openhab-core/pull/719

1 Like

So how can i get this update? Nothing in my openhab is working after i updated a couple of hours ago…

1570 should be her tomorow then ? :stuck_out_tongue: thanks a lot !

Same here.
reverting to m1 make my install really unstable.

I have mannually isntalled openhab , i was easier for me to manage ( except in this rare scenaro)…so i can’t get back to 1566.

Does anyone has a oh2 snapshot 1566 zipfile?

That’s really sad. So we are back on the old, slower implementation with the revert.

Is’nt there a update every 24 hours? Was hoping for a fast fix so i can get my system up and Running again :blush: