This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Expose exception on the signIn method in Google sign in. #1180
Merged
cyanglaz
merged 3 commits into
flutter:master
from
cyanglaz:google_signin_better_error_message
Feb 8, 2019
Merged
Expose exception on the signIn method in Google sign in. #1180
cyanglaz
merged 3 commits into
flutter:master
from
cyanglaz:google_signin_better_error_message
Feb 8, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cyanglaz
commented
Feb 7, 2019
[[GIDSignIn sharedInstance] signIn]; | ||
} @catch (NSException *e) { | ||
result([FlutterError errorWithCode:@"google_sign_in" message:e.reason details:e.name]); | ||
[e raise]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still Debating myself if we should fail more graciously that was requested by the customer in flutter/flutter#12734 or we should still crashing it to just have better error message to force user to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing configuration is fatal. An app like this should never be released and there's no gracious failure for it. Raising FlutterError is the right way to go for this.
mehmetf
approved these changes
Feb 7, 2019
andreidiaconu
pushed a commit
to andreidiaconu/plugins
that referenced
this pull request
Feb 17, 2019
The app will still crash. Missing configuration is fatal. An app like this should never be released. A crash would be a good reminder for user to provide a proper fix before shipping the product. After this fix, a proper error message is shown to users.
andreidiaconu
added a commit
to andreidiaconu/plugins
that referenced
this pull request
Feb 17, 2019
karantanwar
pushed a commit
to karantanwar/plugins
that referenced
this pull request
Feb 19, 2019
The app will still crash. Missing configuration is fatal. An app like this should never be released. A crash would be a good reminder for user to provide a proper fix before shipping the product. After this fix, a proper error message is shown to users.
karantanwar
pushed a commit
to karantanwar/plugins
that referenced
this pull request
Feb 19, 2019
The app will still crash. Missing configuration is fatal. An app like this should never be released. A crash would be a good reminder for user to provide a proper fix before shipping the product. After this fix, a proper error message is shown to users.
11 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix flutter/flutter#12734
When users are setting up the google sign in plugin, if for some reason, the
<key>CFBundleURLTypes</key>
is not properly set, we do not provide a clear enough error message to make their debugging life happier.We would still like to crash the app since the crash would be a good reminder for the users to set up any necessary properties to use this plugin, and the users should not ship the product without fixing the issue that causes the exception.
After this fix, the error message will be shown as