mogol / flutter_secure_storage

A Flutter plugin to store data in secure storage
https://pub.dartlang.org/packages/flutter_secure_storage
BSD 3-Clause "New" or "Revised" License
1.09k stars 340 forks source link

Flutter secure storage 8.1.0 no longer works #708

Closed RobMW closed 1 month ago

RobMW commented 1 month ago

/C:/Users/.../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage-8.1.0/lib/test/test_flutter_secure_storage_platform.dart:3:7: Error: The non-abstract class 'TestFlutterSecureStoragePlatform' is missing implementations for these members:

class TestFlutterSecureStoragePlatform extends FlutterSecureStoragePlatform { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/Users/.../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_platform_interface-1.1.0/lib/flutter_secure_storage_platform_interface.dart:36:16: Context: 'FlutterSecureStoragePlatform.isCupertinoProtectedDataAvailable' is defined here. Future isCupertinoProtectedDataAvailable(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/Users/.../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_platform_interface-1.1.0/lib/flutter_secure_storage_platform_interface.dart:34:20: Context: 'FlutterSecureStoragePlatform.onCupertinoProtectedDataAvailabilityChanged' is defined here. Stream get onCupertinoProtectedDataAvailabilityChanged; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

BUILD FAILED in 35s

No longer works since the update to flutter_secure_storage_platform_interface: 1.1.0 is marked as compatible via the ^ (caret) in the pubspec of flutter_secure_storage

https://dart.dev/tools/pub/dependencies#version-constraints

RoarGronmo commented 1 month ago

Experiencing the same issue,but a slightly different version scheming:

[ +282 ms] /C:/Users/[...]/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage-9.0.0/lib/test/test_flutter_secure_storage_platform.dart:3:7: Error: The non-abstract class 'TestFlutterSecureStoragePlatform' is missing implementations for these members:
[        ]  - FlutterSecureStoragePlatform.isCupertinoProtectedDataAvailable
[        ]  - FlutterSecureStoragePlatform.onCupertinoProtectedDataAvailabilityChanged
[        ] Try to either
[        ]  - provide an implementation,
[        ]  - inherit an implementation from a superclass or mixin,
[        ]  - mark the class as abstract, or
[        ]  - provide a 'noSuchMethod' implementation.
[        ] class TestFlutterSecureStoragePlatform extends FlutterSecureStoragePlatform {
[        ]       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[        ] /C:/Users/[...]/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_platform_interface-1.1.0/lib/flutter_secure_storage_platform_interface.dart:36:16: Context: 'FlutterSecureStoragePlatform.isCupertinoProtectedDataAvailable' is defined here.
[        ]   Future<bool> isCupertinoProtectedDataAvailable();
[        ]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[        ] /C:/Users/[...]/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_platform_interface-1.1.0/lib/flutter_secure_storage_platform_interface.dart:34:20: Context: 'FlutterSecureStoragePlatform.onCupertinoProtectedDataAvailabilityChanged' is defined here.
[        ]   Stream<bool> get onCupertinoProtectedDataAvailabilityChanged;
[        ]                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[+1700 ms] > Task :app:compileFlutterBuildDebug
[        ] Caching disabled for task ':app:compileFlutterBuildDebug' because:
[        ]   Build cache is disabled
[        ] Task ':app:compileFlutterBuildDebug' is not up-to-date because:
[        ]   Task has failed previously.

[...] = Obfuscating names above

Any short term remedy ?

juliansteenbakker commented 1 month ago

I was fearing this already, you can override the interface version for now. I will fix this in a few hours.

RoarGronmo commented 1 month ago

I was fearing this already, you can override the interface version for now. I will fix this in a few hours.

It seems that this library was used in dependent libraries in my project, I'll rather watch a football game until fixed... ;)

banksAcc commented 1 month ago

I also experience the same problem... I also almost saw a football game... ahahaha ;)

marcoconceicao commented 1 month ago

Same issue here

Yonkokilasi commented 1 month ago

Just experienced this when pushing to production 😢 .. Does upgrading fix the issue ?

RobMW commented 1 month ago

Just experienced this when pushing to production 😢 .. Does upgrading fix the issue ?

Add this to your pubspec if you can't wait for the fix: flutter_secure_storage_platform_interface: 1.0.2

banksAcc commented 1 month ago

This didn't solve the problem for me @RobMW

Screenshot 2024-05-08 alle 18 16 42
RobMW commented 1 month ago

This didn't solve the problem for me @RobMW Screenshot 2024-05-08 alle 18 16 42

Write it without the ^ (caret)

Yonkokilasi commented 1 month ago

Upgrading it to 9.0.0 seems to work

juliansteenbakker commented 1 month ago

Okay so because of the carret, all older versions are failing right now. I am going to revert the breaking changes, and republish them under a new major version. It takes me a few minutes to do this so please hold on. This package is a bit of a dependency disaster.

banksAcc commented 1 month ago

Alright, thanks for the support and help....have a good coding session

Luismi74 commented 1 month ago

Just experienced this and our apps are halted for prod release, hope it gets solved soon. thanks in advance @juliansteenbakker!

juliansteenbakker commented 1 month ago

I have removed the breaking feature from all but the core package, which i am testing right now

juliansteenbakker commented 1 month ago

Thank you all for your patience. I am so sorry for the issues.

I have released v9.1.1, together with updates of all the child packages, that removes the breaking change. This should fix both the latest version but also older versions of this package.

It would be great if someone can verify it's working again.

I will be releasing a new major versions with the new features somewhere in the next days.

This is one of the reasons i am hesitant of updating such a package like this. I am working on my own, so i don't really have Q/A besides you guys in order to catch these issues. This makes managing multiple packages a pain in the a**. However, i hope by implementing melos or some other kind of package management system this will reduce the complexibility of this package.

banksAcc commented 1 month ago

Hi, just tested and works fine...Thanks for the support and fixing things...

Ps. if you need support for these things, 2 extra hands come in handy, don't hesitate to contact me

juliansteenbakker commented 1 month ago

Thank you for your offer! I have tried to add this package to the flutter community (https://github.com/fluttercommunity/community/issues/93) however i never really got an answer. I think i'm gonna try this again, and hope we can get more support via the community.

giann commented 1 month ago

I will be releasing a new major versions with the new features somewhere in the next days.

@juliansteenbakker Will you release this soon? Turns out we experience quite a lot of data temprary loss du to iOS device being unlocked and isCupertinoProtectedDataAvailable would help us a lot

lauroboeni commented 1 month ago

version 9.1.1 does not solve the issue for me. I had to go back to 9.0.0 - that works as expected