-
-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[oauth] Fix access token serialization/deserialization #3083
Conversation
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
691bb59
to
25b3d84
Compare
I believe there is a kind of urgency to review & merge this fix. |
Thanks. |
@jlaur : do you know if the bug was included in a 3.4 milestone? |
@lolodomo - it was unfortunately introduced in 3.4M2. |
Ok, we know what to say in case the problem would be reported in the community forum. I saw myself an exception the last time I installed a snapshot. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/mercedes-me-binding/136852/55 |
@jlaur : I just installed snaspshot 3089 generated yesterday and at startup, I still see that error: Edit: it could be an old data from the JSON DB. I try to delete it and restart. |
I'm wondering how that data was created, and with which version:
That timestamp is 20.09.2022 09:53:47 CET (with DST), i.e. this morning. Current snapshot version: Lines 251 to 253 in 4a84b80
uses Since you installed the snapshot yesterday and this JSON seems to have been generated today, I don't have a good feeling about this. Which binding do you use, and is it possible somehow to reproduce? EDIT: Okay, now I saw that it's homeconnect. Is that also current shapshot version? |
Sorry, don't loose your time, I think there is no problem, it was my file from the previous version which was read. The new version has just been installed one hour ago (while the home-connect token was probably updated this morning by my old snapshot). |
Okay, thanks. Still, I'm wondering how this was created, and if this scenario has to be supported also. Serialized tokens generated before #3066 shouldn't look like this, and they should also be correctly deserialized now. Tokens generated after this PR should also not look like this, and should also be correctly deserialized. Perhaps some permutation of pre/post #3066/#3083 vs. core/addons can cause this. |
Here is how it looks now in the DB:
|
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/oh4-0-0-snapshot-and-m1-google-tts-exception/145046/6 |
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> GitOrigin-RevId: 27c2887
This fixes a regression of #3066 where serialization and deserialization to and from storage was broken after migrating from
LocalDateTime
toInstant
:Value will now correctly be serialized as
Instant
into the store, and deserialization supports bothInstant
andLocalDateTime
(for backwards compatibility).