-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[google_sign_in] Don't crash a misconfigured iOS app #9486
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
Merged
auto-submit
merged 1 commit into
flutter:main
from
stuartmorgan-g:sign-in-ios-dont-throw
Jul 8, 2025
Merged
[google_sign_in] Don't crash a misconfigured iOS app #9486
auto-submit
merged 1 commit into
flutter:main
from
stuartmorgan-g:sign-in-ios-dont-throw
Jul 8, 2025
+20
−16
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
In flutter/plugins#1180 the plugin was deliberately designed to crash when misconfigured. The reasoning was that the app shouldn't be released this way, which is true, but crashing the entire app means that a developer has to use Xcode to debug the app to understand what's happening, which is a very poor user experience. This removes the throw, so that it can be received as a Dart exception, which is much easier for most developers to debug.
There's no issue linked because this is something I just happened to hit while testing #9484 locally, and had messed up the configuration in my test app. |
LongCatIsLooong
approved these changes
Jul 7, 2025
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.
Thanks for the explanation!
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 9, 2025
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 9, 2025
flutter/packages@cba2e90...4a231ae 2025-07-08 [email protected] [video_player] Adds platform view support on macOS (flutter/packages#9576) 2025-07-08 [email protected] [camera] fix `CameraLensType` export (flutter/packages#9536) 2025-07-08 [email protected] [video_player] Move iOS/macOS to per-player-instance Pigeon APIs (flutter/packages#9529) 2025-07-08 [email protected] Roll Flutter from 28a4e85 to adffe24 (17 revisions) (flutter/packages#9580) 2025-07-08 [email protected] [google_sign_in] Don't crash a misconfigured iOS app (flutter/packages#9486) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 9, 2025
#171879)" (#171897) <!-- start_original_pr_link --> Reverts: #171879 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chinmaygarde <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: #171896 <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: engine-flutter-autoroll <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {fluttergithubbot} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: flutter/packages@cba2e90...4a231ae 2025-07-08 [email protected] [video_player] Adds platform view support on macOS (flutter/packages#9576) 2025-07-08 [email protected] [camera] fix `CameraLensType` export (flutter/packages#9536) 2025-07-08 [email protected] [video_player] Move iOS/macOS to per-player-instance Pigeon APIs (flutter/packages#9529) 2025-07-08 [email protected] Roll Flutter from 28a4e85 to adffe24 (17 revisions) (flutter/packages#9580) 2025-07-08 [email protected] [google_sign_in] Don't crash a misconfigured iOS app (flutter/packages#9486) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <[email protected]>
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 9, 2025
…revisions) (#171879)" (#171897)" (#171910) <!-- start_original_pr_link --> Reverts: #171897 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: matanlurey <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: Was not the reason for the test failure, it was an OOB tag change. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: auto-submit[bot] <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {fluttergithubbot} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: <!-- start_original_pr_link --> Reverts: #171879 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chinmaygarde <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: #171896 <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: engine-flutter-autoroll <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {fluttergithubbot} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: flutter/packages@cba2e90...4a231ae 2025-07-08 [email protected] [video_player] Adds platform view support on macOS (flutter/packages#9576) 2025-07-08 [email protected] [camera] fix `CameraLensType` export (flutter/packages#9536) 2025-07-08 [email protected] [video_player] Move iOS/macOS to per-player-instance Pigeon APIs (flutter/packages#9529) 2025-07-08 [email protected] Roll Flutter from 28a4e85 to adffe24 (17 revisions) (flutter/packages#9580) 2025-07-08 [email protected] [google_sign_in] Don't crash a misconfigured iOS app (flutter/packages#9486) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md <!-- end_revert_body --> <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <[email protected]>
azatech
pushed a commit
to azatech/flutter
that referenced
this pull request
Jul 10, 2025
…r#171879) flutter/packages@cba2e90...4a231ae 2025-07-08 [email protected] [video_player] Adds platform view support on macOS (flutter/packages#9576) 2025-07-08 [email protected] [camera] fix `CameraLensType` export (flutter/packages#9536) 2025-07-08 [email protected] [video_player] Move iOS/macOS to per-player-instance Pigeon APIs (flutter/packages#9529) 2025-07-08 [email protected] Roll Flutter from 28a4e85 to adffe24 (17 revisions) (flutter/packages#9580) 2025-07-08 [email protected] [google_sign_in] Don't crash a misconfigured iOS app (flutter/packages#9486) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
azatech
pushed a commit
to azatech/flutter
that referenced
this pull request
Jul 10, 2025
flutter#171879)" (flutter#171897) <!-- start_original_pr_link --> Reverts: flutter#171879 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chinmaygarde <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: flutter#171896 <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: engine-flutter-autoroll <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {fluttergithubbot} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: flutter/packages@cba2e90...4a231ae 2025-07-08 [email protected] [video_player] Adds platform view support on macOS (flutter/packages#9576) 2025-07-08 [email protected] [camera] fix `CameraLensType` export (flutter/packages#9536) 2025-07-08 [email protected] [video_player] Move iOS/macOS to per-player-instance Pigeon APIs (flutter/packages#9529) 2025-07-08 [email protected] Roll Flutter from 28a4e85 to adffe24 (17 revisions) (flutter/packages#9580) 2025-07-08 [email protected] [google_sign_in] Don't crash a misconfigured iOS app (flutter/packages#9486) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <[email protected]>
azatech
pushed a commit
to azatech/flutter
that referenced
this pull request
Jul 10, 2025
…revisions) (flutter#171879)" (flutter#171897)" (flutter#171910) <!-- start_original_pr_link --> Reverts: flutter#171897 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: matanlurey <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: Was not the reason for the test failure, it was an OOB tag change. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: auto-submit[bot] <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {fluttergithubbot} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: <!-- start_original_pr_link --> Reverts: flutter#171879 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chinmaygarde <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: flutter#171896 <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: engine-flutter-autoroll <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {fluttergithubbot} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: flutter/packages@cba2e90...4a231ae 2025-07-08 [email protected] [video_player] Adds platform view support on macOS (flutter/packages#9576) 2025-07-08 [email protected] [camera] fix `CameraLensType` export (flutter/packages#9536) 2025-07-08 [email protected] [video_player] Move iOS/macOS to per-player-instance Pigeon APIs (flutter/packages#9529) 2025-07-08 [email protected] Roll Flutter from 28a4e85 to adffe24 (17 revisions) (flutter/packages#9580) 2025-07-08 [email protected] [google_sign_in] Don't crash a misconfigured iOS app (flutter/packages#9486) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md <!-- end_revert_body --> <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
autosubmit
Merge PR when tree becomes green via auto submit App
p: google_sign_in
platform-ios
platform-macos
triage-ios
Should be looked at in iOS triage
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.
In flutter/plugins#1180 the plugin was deliberately made to crash when misconfigured. The reasoning was that the app shouldn't be released this way, which is true, but crashing the entire app means that a developer has to use Xcode to debug the app to understand what's happening, which is a very poor user experience.
The PR indicated that the error would be printed from the Dart side after that PR, but that's not actually what happens; method channel returns are asynchronous, whereas crashing the app on the native side with an unhandled exception happens immediately, so even though the native side does call the completion, the async process of that completion being received on the Dart side as a
PlatformException
was never happening, and the crash was silent outside the context of a native debugger.This removes the throw, so that it can be received as a Dart exception, which is much easier for most developers to debug.
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3