flagsmith-flutter-client icon indicating copy to clipboard operation
flagsmith-flutter-client copied to clipboard

Dependency dio produces errors dio version >= 4.0.4 fails with "Future already completed"

Open jdde opened this issue 3 years ago • 2 comments

Hi guys, I just tried to see if the new dio v4.0.6 resolved the issue mentioned in your documentation https://docs.flagsmith.com/clients/flutter#known-issues "If using the package Dio, you may encounter an error saying Bad state: Future already completed. There is a bug in the Dio package, introduced in 4.0.5 (and as of writing this on 12/09/2022, is unresolved). To resolve, you'll need to pin your Dio version in pubspec.yaml to 4.0.4 or earlier."

Unfortunately this is not the case.

I'll attach my test results as screenshots. I reproduced it easily, by just locking the dio version in the sdk itself & in the example application. Then start it for web - see if the error occurs.

Here you can see the result with different version - 4.0.4, 4.0.5, 4.0.6

Web state with dio 4.0.4 dio_4_0_4

Web state with dio 4.0.5 dio_4_0_5

Web state with upgrading dio to 4.0.6 dio_4_0_6

jdde avatar Nov 30 '22 09:11 jdde

@dabeeeenster just mentioned this dio issue in discord: https://github.com/flutterchina/dio/pull/1550 worth to link it in here

jdde avatar Nov 30 '22 09:11 jdde

@matthewelwell can we close this issue on account of https://github.com/Flagsmith/flagsmith-flutter-client/pull/48 ?

dabeeeenster avatar Mar 23 '23 23:03 dabeeeenster