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

FlutterError - ParallelWaitError: Instance of 'StorageException' on iOS #805

Open
PabloTortosaLopez opened this issue Oct 11, 2024 · 0 comments

Comments

@PabloTortosaLopez
Copy link

I am encountering a FlutterError - ParallelWaitError: Instance of 'StorageException' when using the flutter_secure_storage package to write data. This error occurs during the SecureStorage.write operation and ONLY on iOS. I can't find the root of the problem, it seems to fail randomly.

Steps to Reproduce

  1. Add flutter_secure_storage 9.2.2 version to your pubspec.yaml
  2. Initialise flutter_secure_storage in your Flutter application:
final storage = FlutterSecureStorage(
              aOptions: AndroidOptions(
                encryptedSharedPreferences: true,
                resetOnError: true,
               ...
              ),
            )
  1. Attempt to write data to secure storage
@override
  Future<void> write({required String key, required String value}) async {
    try {
      await storage.write(key: key, value: value);
    } catch (error, stackTrace) {
      Error.throwWithStackTrace(StorageException(error), stackTrace);
    }
  }
  1. Observe the error
Fatal Exception: FlutterError
0  ???                            0x0 StandardMethodCodec.decodeEnvelope + 648 (message_codecs.dart:648)
1  ???                            0x0 MethodChannel._invokeMethod + 334 (platform_channel.dart:334)
2  ???                            0x0 FlutterSecureStorage.write + 114 (flutter_secure_storage.dart:114)
3  ???                            0x0 SecureStorage.write + 49 (secure_storage.dart:49)

Additional Information
Flutter Version: 3.24.2
flutter_secure_storage Version: 9.2.2
Platform: iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant