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

Crash without iOSOptions in v3.3.0 #73

Closed
knaoe opened this issue Sep 10, 2019 · 3 comments
Closed

Crash without iOSOptions in v3.3.0 #73

knaoe opened this issue Sep 10, 2019 · 3 comments

Comments

@knaoe
Copy link

knaoe commented Sep 10, 2019

Environment:

Flutter 1.9.1+hotfix.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2d2a1ffec9 (3 days ago) • 2019-09-06 18:39:49 -0700
Engine • revision b863200c37
Tools • Dart 2.5.0

When trying to read from the storage in iOS Simulator 12.2:

await secureStorage.read(key: 'some_key');

I get:

*** First throw call stack:                                             
(                                                                       
        0   CoreFoundation                      0x000000010cfd16fb __exceptionPreprocess + 331
        1   libobjc.A.dylib                     0x000000010c575ac5 objc_exception_throw + 48
        2   CoreFoundation                      0x000000010cfefab4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
        3   CoreFoundation                      0x000000010cfd6443 ___forwarding___ + 1443
        4   CoreFoundation                      0x000000010cfd8238 _CF_forwarding_prep_0 + 120
        5   flutter_secure_storage              0x000000010c4800d7 -[FlutterSecureStoragePlugin handleMethodCall:result:] + 327
        6   Flutter                             0x0000000109c4069e __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 115
        7   Flutter                             0x0000000109be0016 _ZNK7flutter21PlatformMessageRouter21Handl<…>

And I can fix this by adding iOptions field which is added in v3.3.0:

await secureStorage.read(key: 'some_key', iOptions: iOSOptions(groupId: 'default');

It seems some null handling is missing for the options.

mogol added a commit that referenced this issue Sep 10, 2019
@kgrigorian
Copy link

will be there reelase for this?

@mogol
Copy link
Owner

mogol commented Sep 10, 2019

@mogol
Copy link
Owner

mogol commented Sep 10, 2019

@knaoe thanks for reporting!

@mogol mogol closed this as completed Sep 10, 2019
danielwii pushed a commit to danielwii/flutter_secure_storage that referenced this issue Mar 25, 2020
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

3 participants