Skip to content
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

fix: hydrated bloc stopped persisting state after update (^9.1.3) #4038

Open
devopsean opened this issue Jan 8, 2024 · 8 comments
Open

fix: hydrated bloc stopped persisting state after update (^9.1.3) #4038

devopsean opened this issue Jan 8, 2024 · 8 comments
Assignees
Labels
bug Something isn't working needs repro info The issue is missing a reproduction sample and/or steps pkg:hydrated_bloc This issue is related to the hydrated_bloc package waiting for response Waiting for follow up

Comments

@devopsean
Copy link

Description
Hydrated bloc stopped persisting and restoring states after I updated beyond v9.1.0. When I lock in v9.1.0 in my pubspec.yaml, it works fine but when I let it run to the max possible version using "^", it does not work.

Steps To Reproduce

  1. Test state persistence using hydrated_bloc: ^9.1.0
  2. Compare with state persistence using hydrated_bloc: 9.1.0

Expected Behavior
State should correctly persist.

Additional Context
I get null data from persistence using hydrated_bloc: ^9.1.0

@devopsean devopsean added the bug Something isn't working label Jan 8, 2024
@JoseGeorges8
Copy link

+1, My app seems to persist with 9.1.2 but not with 9.1.3

@felangel felangel self-assigned this Jan 18, 2024
@felangel felangel added the investigating Investigating the issue label Jan 18, 2024
@felangel
Copy link
Owner

Sorry for the delay! I'll investigate and try to get a fix in by the end of the week, thanks!

@felangel felangel added the pkg:hydrated_bloc This issue is related to the hydrated_bloc package label Jan 18, 2024
@felangel
Copy link
Owner

felangel commented Jan 19, 2024

@JoseGeorges8 @devopsean I tried to reproduce and was unable. Are either of you able to provide a link to a minimal reproduction sample with detailed steps to reproduce the error (e.g. what platform you're running on what host machine you're using, what version of flutter/dart etc)? Thanks!

@felangel felangel added waiting for response Waiting for follow up needs repro info The issue is missing a reproduction sample and/or steps and removed investigating Investigating the issue labels Jan 19, 2024
@Akshaymain
Copy link

Akshaymain commented Jan 22, 2024

@felangel
Steps to reproduce the error:-

  1. Use hydrated_bloc: 9.1.2
  2. Hold isLoggedIn flag in a bloc which uses HydratedMixin to store the data.
  3. Refer isLoggedIn flag whenever user access the application and route him to home-screen if it is true or login-screen if it is false.
  4. Now update hydrated_bloc version to 9.1.3 and then check. In 9.1.2 it works as expected but in 9.1.3 it routes user to login-screen all the time.

Platform:
Web, Android and iOS.

Mac OS: 14.2.1 (23C71)

VS code: 1.85.2 (Universal)

Flutter and Dart version:
Flutter 3.10.5 • channel stable
Dart 3.0.5 • DevTools 2.23.1

@devopsean
Copy link
Author

@JoseGeorges8 @devopsean I tried to reproduce and was unable. Are either of you able to provide a link to a minimal reproduction sample with detailed steps to reproduce the error (e.g. what platform you're running on what host machine you're using, what version of flutter/dart etc)? Thanks!

Flutter 3.16.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db7ef5bf9f (10 weeks ago) • 2023-11-15 11:25:44 -0800
Engine • revision 74d16627b9
Tools • Dart 3.2.0 • DevTools 2.28.2

Mac OS: 13.5.1 (22G90)

Android Studio Giraffe | 2022.3.1 Patch 2

@felangel
Copy link
Owner

felangel commented Feb 1, 2024

Thanks, I'll try to reproduce with the Flutter/Dart versions you both provided and get back to you.

@felangel felangel added investigating Investigating the issue and removed waiting for response Waiting for follow up labels Feb 1, 2024
@Akshay-Niveus
Copy link

Akshay-Niveus commented May 2, 2024

@felangel Any update on this?

@felangel
Copy link
Owner

felangel commented May 3, 2024

@Akshay-Niveus i'd really appreciate any reproduction steps as so far I've been unable to reproduce the issue, thanks!

@felangel felangel added waiting for response Waiting for follow up and removed investigating Investigating the issue labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro info The issue is missing a reproduction sample and/or steps pkg:hydrated_bloc This issue is related to the hydrated_bloc package waiting for response Waiting for follow up
Projects
None yet
Development

No branches or pull requests

5 participants