ivoleitao / stash

Key-value store abstraction with plain and cache driven semantics and a pluggable backend architecture.
MIT License
82 stars 16 forks source link

TypeError in Hive vault when switching from version 4.5.2 to 5.1.0 #70

Closed stevsimo closed 4 months ago

stevsimo commented 4 months ago

Describe the bug If you store a String value into a hive vault in version 4.5.2 and want to retrieve it in version 5.1.0 a TypeError occurs when the value is decoded in file 'packages/stash/lib/src/api/store.dart'

To Reproduce

  1. Setup a simple vault in version 4.5.2
  2. Store a String value in that vault
  3. Update stash to newest version 5.1.0 in pubspec.yaml
  4. Run app again and try to retrieve value from vault

Here is a simple Example

Expected behaviour Expected behaviour is that value is retrieved without errors.

Screenshots Screenshot 2024-04-11 at 15 14 33

Version Dart SDK version: 3.3.0 (stable) (Tue Feb 13 10:25:19 2024 +0000) on "macos_arm64"

stevsimo commented 4 months ago

I opened a pull request #71

ivoleitao commented 4 months ago

Fixed in the 5.1.1 of stash and 5.1.2 of stash_hive. Thanks for spotting this, it was a tricky one @stevsimo. I will use this opportunity to update a bunch of dependencies on a followup version please choose the best version to you. Either this one or the follow up ones