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

[google_sign_in_ios] Update iOS SDK to 7.1.0 (was: Failing check_podspecs.) #145866

Closed
ditman opened this issue Mar 27, 2024 · 4 comments · Fixed by flutter/packages#6404
Closed
Assignees
Labels
p: google_sign_in The Google Sign-In plugin P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team

Comments

@ditman
Copy link
Member

ditman commented Mar 27, 2024

The recent update of the GoogleSignIn iOS SDK to v7.1.0 seems to have broken our CI in 2 ways:

  1. Mac_x64 check_podspecs - Build failure.
  2. Mac_arm64 ios_platform_tests_shard_1 master - Build failure.

As a mitigation, the version of the SDK has been pinned to 7.0.0, here:

But the pin needs to be cleaned up.


Earlier description

The "Mac_x64 check_podspecs" seems to be consistently failing in flutter/packages; there's a warning while checking google_sign_in_os:

 - WARN  | swift: The validator used Swift `4.0` by default because no Swift
version was specified. To specify a Swift version during validation, add the
`swift_versions` attribute in your podspec. Note that usage of a `.swift-version`
file is now deprecated.

(Example of the Failure.)

In the meantime, --allow-warnings has been added to podspec_check_command.dart to unblock the tree. (Please, revert flutter/packages#6416 as part of this fix!) Reverted, as the change exposed another issue, mentioned below!

@ditman ditman added platform-ios iOS applications specifically p: google_sign_in The Google Sign-In plugin package flutter/packages repository. See also p: labels. P1 High-priority issues at the top of the work list team-ios Owned by iOS platform team labels Mar 27, 2024
@ditman
Copy link
Member Author

ditman commented Mar 28, 2024

Here's a full run of the tool with the warnings allowed:

@ditman
Copy link
Member Author

ditman commented Mar 28, 2024

Skipping the podspec validation now exposes another error in Mac_arm64 ios_platform_tests_shard_1 stable for the package: extension_google_sign_in_as_googleapis_auth (which depends on google_sign_in):

...
    -> Installing google_sign_in_ios (0.0.1)
      - Running pre install hooks
    [!] The following Swift pods cannot yet be integrated as static libraries:

    The Swift pod `GTMAppAuth` depends upon `GTMSessionFetcher` and `AppAuth`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/xcode/target_validator.rb:151:in `verify_swift_pods_have_module_dependencies'
    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/xcode/target_validator.rb:40:in `validate!'
    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:666:in `validate_targets'
    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:164:in `install!'
    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/lib/cocoapods/command/install.rb:52:in `run'
    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/lib/cocoapods/command.rb:52:in `run'
    /Volumes/Work/s/w/ir/cache/ruby/.cipd/pkgs/0/pZTfjoFUwZNnilFjCkjEo8rdpdqPNerhy3XDi6ly8kAC/bin/darwin_ruby/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/bin/pod:55:in `<top (required)>'
    /Volumes/Work/s/w/ir/cache/ruby/bin/darwin_ruby/bin/pod:36:in `load'
    /Volumes/Work/s/w/ir/cache/ruby/bin/darwin_ruby/bin/pod:36:in `<main>'

Error output from CocoaPods:
↳
         Cloning into '/Volumes/Work/s/w/ir/x/t/d20240327-17982-ixo7ae'...
         Cloning into '/Volumes/Work/s/w/ir/x/t/d20240327-17982-k58n62'...

    [!] Automatically assigning platform `iOS` with version `12.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install

Build: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64%20ios_platform_tests_shard_1%20stable/1755/overview


Seems to work just fine in master?

Build: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64%20ios_platform_tests_shard_1%20master/1804/overview

auto-submit bot added a commit to flutter/packages that referenced this issue Mar 28, 2024
#6416)" (#6419)

Reverts: #6416
Initiated by: ditman
Reason for reverting: Failures happen (later) in other plugins (more updates in the related issue)

flutter/flutter#145866
Original PR Author: ditman

Reviewed By: {jmagman}

This change reverts the following previous change:
Adds `--allow-warnings` to podspec_check_command.dart so stuff can keep rolling.

**To be removed soon!**
@ditman
Copy link
Member Author

ditman commented Mar 28, 2024

This seems to be related to the update of the GoogleSignIn iOS SDK to version 7.1.0.

See:

I've posted a PR to pin our package to the 7.0.0 version, here:

(But we definitely want to update to 7.1.0, because it comes with Privacy Manifest)

@ditman ditman changed the title [google_sign_in_ios] Failing check_podspecs. [google_sign_in_ios] Update iOS SDK to 7.1.0 (was: Failing check_podspecs.) Mar 28, 2024
@ditman
Copy link
Member Author

ditman commented Mar 28, 2024

A proper fix for this issue exists here:

auto-submit bot pushed a commit to flutter/packages that referenced this issue Mar 28, 2024
This PR temporarily pins the GoogleSignIn iOS SDK to version 7.0.0 in the darwin podspec configuration.

This'll enable our CI to keep going, until a more proper fix to `google_sign_in_ios` lands, with an update to the latest [7.1 version](https://github.com/google/GoogleSignIn-iOS/releases). See:

* flutter/flutter#145866

For more information about the current CI failures.

## Testing

This PR should help with the tests that are currently broken in CI.
auto-submit bot pushed a commit to flutter/packages that referenced this issue Apr 17, 2024
1. Update GoogleSignIn iOS SDK dependency to [7.1](https://github.com/google/GoogleSignIn-iOS/releases/tag/7.1.0), which supports privacy manifests.
1. Update "fetch deps step" to run `pod repo update` every time to avoid missing spec failure. Also added a fetch deps step to the all_packages builds, since those could also use a `pod repo update` but I didn't want to add more logic to those bash scripts.
```
     [!] CocoaPods could not find compatible versions for pod "GoogleSignIn":
       In Podfile:
         google_sign_in_ios (from `Flutter/ephemeral/.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
           GoogleSignIn (~> 7.1)
     None of your spec sources contain a spec satisfying the dependency: `GoogleSignIn (~> 7.1)`.
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8752192509749702705/+/u/Run_package_tests/download_Dart_and_iOS_deps/stdout

3. Looks like the new versions of [`GTMSessionFetcher`](https://github.com/CocoaPods/Specs/blob/master/Specs/c/e/3/GTMSessionFetcher/3.3.2/GTMSessionFetcher.podspec.json) and [`AppAuth`](https://github.com/CocoaPods/Specs/blob/master/Specs/b/b/9/AppAuth/1.7.3/AppAuth.podspec.json) don't define modules, so there's an error building it statically:
```
     [!] The following Swift pods cannot yet be integrated as static libraries:
     The Swift pod `GTMAppAuth` depends upon `GTMSessionFetcher` and `AppAuth`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```
I filed google/gtm-session-fetcher#384 and openid/AppAuth-iOS#844.

In the meantime, I updated the example apps to `use_frameworks!`, which would be on for Flutter Swift apps, but not Objective-C ones.  We could add something to the tool to detect this case, and suggest `use_frameworks!` be added?  

4.  Even though google_sign_in_ios does not contain Swift files, for some reason, there is a "pod lib lint" warning complaining `swift_version` isn't set. This seems related to `GTMAppAuth` dependency constraint that went from an Objective-C-only to Swift pod.  So I set `swift_version` since it's harmless.

```
- WARN  | swift: The validator used Swift `4.0` by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_versions` attribute in your podspec. Note that usage of a `.swift-version` file is now deprecated.
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8752100979634945505/+/u/Run_package_tests/validate_iOS_and_macOS_podspecs/stdout

## Issues

* Fixes flutter/flutter#145777
* Fixes flutter/flutter#145866
* See also flutter/flutter#137140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: google_sign_in The Google Sign-In plugin P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants