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

Error: The getter 'IOSAccessibility' isn't defined for the class 'SecureStorage'. #135

Closed
asmith26 opened this issue Aug 5, 2022 · 4 comments

Comments

@asmith26
Copy link

asmith26 commented Aug 5, 2022

I'm hoping to upgrade my android SDK version to v33 (i.e. this number), but when I do this I get the following error:

../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/oauth2_client-2.4.1/lib/src/secure_storage.dart:21:47: Error: The getter 'IOSAccessibility' isn't defined for the class 'SecureStorage'.
 - 'SecureStorage' is from 'package:oauth2_client/src/secure_storage.dart' ('../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/oauth2_client-2.4.1/lib/src/secure_storage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'IOSAccessibility'.
    final options = IOSOptions(accessibility: IOSAccessibility.first

Possible Fix

It would appear this IOSAccessibility name has changed to KeychainAccessibility: mogol/flutter_secure_storage#405

@herrmayr
Copy link

herrmayr commented Aug 8, 2022

I also cannot build my app anymore on iOS and the log seems to point to this issue as well:

../../../flutter/.pub-cache/hosted/pub.dartlang.org/oauth2_client-2.4.1/lib/src/secure_storage.dart:15:47: Error: The getter 'IOSAccessibility' isn't defined for the class 'SecureStorage'.
'SecureStorage' is from 'package:oauth2_client/src/secure_storage.dart' ('../../../flutter/.pub-cache/hosted/pub.dartlang.org/oauth2_client-2.4.1/lib/src/secure_storage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'IOSAccessibility'.
final options = IOSOptions(accessibility: IOSAccessibility.first_unlock);
Failed to package /Users/......
Command PhaseScriptExecution failed with a nonzero exit code

Details:

  • Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-arm, locale de-DE)
  • oauth2_client: ^2.4.1

@felix-barz-brickmakers
Copy link

Adding the following to your pubspec.yaml temporarily overrides the flutter_secure_storage to use the last compatible version until this issue gets fixed:

dependency_overrides:
  flutter_secure_storage: 5.0.2 # https://github.com/teranetsrl/oauth2_client/issues/135

@okrad okrad closed this as completed in 50bad90 Aug 16, 2022
@okrad
Copy link
Collaborator

okrad commented Aug 16, 2022

Thank you @asmith26, let me know if the latest release solves the problem!

@asmith26
Copy link
Author

Thank you @asmith26, let me know if the latest release solves the problem!

Seems to be working well for me so far thanks :)

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

4 participants