Skip to content

flutter/flutter tree broken on Mac_ios platform_views_scroll_perf_ios__timeline_summary failure #156606

Closed

Description

@christopherfujino

For example: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20platform_views_scroll_perf_ios__timeline_summary/19226/infra

[2024-10-11 11:13:37.722115] [STDOUT] stdout:                    {
[2024-10-11 11:13:37.722151] [STDOUT] stdout:                      "_type" : {
[2024-10-11 11:13:37.722252] [STDOUT] stdout:                        "_name" : "IssueSummary"
[2024-10-11 11:13:37.722265] [STDOUT] stdout:                      },
[2024-10-11 11:13:37.722273] [STDOUT] stdout:                      "issueType" : {
[2024-10-11 11:13:37.722295] [STDOUT] stdout:                        "_type" : {
[2024-10-11 11:13:37.722304] [STDOUT] stdout:                          "_name" : "String"
[2024-10-11 11:13:37.722325] [STDOUT] stdout:                        },
[2024-10-11 11:13:37.722353] [STDOUT] stdout:                        "_value" : "Warning"
[2024-10-11 11:13:37.722366] [STDOUT] stdout:                      },
[2024-10-11 11:13:37.722400] [STDOUT] stdout:                      "message" : {
[2024-10-11 11:13:37.722455] [STDOUT] stdout:                        "_type" : {
[2024-10-11 11:13:37.722494] [STDOUT] stdout:                          "_name" : "String"
[2024-10-11 11:13:37.722532] [STDOUT] stdout:                        },
[2024-10-11 11:13:37.722580] [STDOUT] stdout:                        "_value" : "Could not find or use auto-linked library 'swiftXPC': library 'swiftXPC' not found"
[2024-10-11 11:13:37.722653] [STDOUT] stdout:                      }
[2024-10-11 11:13:37.722691] [STDOUT] stdout:                    },

After: #156549

I reverted that PR, but this is now blocking the pub roll.

Activity

  1. added a commit that references this issue on Oct 11, 2024
  2. christopherfujino commented on Oct 11, 2024

    @christopherfujino
    ContributorAuthor

    So reverting my PR fixed the tree, so the pub roll definitely broke this iOS build.

    Looking at the diff from the PR: e6f7aa3c4b786d692a264b4477774676ac399c6298d717023c2c09565132d1bd

    I am almost certain it was due to either:

    Of which I suspect it's the former.

  3. stuartmorgan-g commented on Oct 11, 2024

    @stuartmorgan-g
    Contributor

    It's definitely the former:

    [2024-10-11 11:12:50.632237] [STDOUT] stdout:             ld: warning: Could not find or use auto-linked library 'swiftXPC': library 'swiftXPC' not found
    [2024-10-11 11:12:50.632260] [STDOUT] stdout:             ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
    [2024-10-11 11:12:50.632361] [STDOUT] stdout:             ld: warning: Could not find or use auto-linked framework 'MarketplaceKit': framework 'MarketplaceKit' not found
    [2024-10-11 11:12:50.632379] [STDOUT] stdout:             ld: Undefined symbols:
    [2024-10-11 11:12:50.632417] [STDOUT] stdout:               enum case for MarketplaceKit.AppDistributor.testFlight(MarketplaceKit.AppDistributor.Type) -> MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.632425] [STDOUT] stdout:                   l007 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632490] [STDOUT] stdout:                   l008 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632511] [STDOUT] stdout:               enum case for MarketplaceKit.AppDistributor.marketplace(MarketplaceKit.AppDistributor.Type) -> (Swift.String) -> MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.632580] [STDOUT] stdout:                   l007 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632591] [STDOUT] stdout:                   l008 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632598] [STDOUT] stdout:               enum case for MarketplaceKit.AppDistributor.other(MarketplaceKit.AppDistributor.Type) -> MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.632606] [STDOUT] stdout:                   l007 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632656] [STDOUT] stdout:                   l008 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632679] [STDOUT] stdout:               static MarketplaceKit.AppDistributor.current.getter : MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.632686] [STDOUT] stdout:                   function signature specialization <Arg[0] = Dead> of static GoogleMobileAds.GADMarketplaceKitSignals.appDistributor() async -> Swift.String in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632729] [STDOUT] stdout:               async function pointer to static MarketplaceKit.AppDistributor.current.getter : MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.632759] [STDOUT] stdout:                   function signature specialization <Arg[0] = Dead> of static GoogleMobileAds.GADMarketplaceKitSignals.appDistributor() async -> Swift.String in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632831] [STDOUT] stdout:               enum case for MarketplaceKit.AppDistributor.appStore(MarketplaceKit.AppDistributor.Type) -> MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.632862] [STDOUT] stdout:                   l007 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632886] [STDOUT] stdout:                   l008 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.632966] [STDOUT] stdout:               type metadata accessor for MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.632994] [STDOUT] stdout:                   l007 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.633002] [STDOUT] stdout:                   l008 in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.633010] [STDOUT] stdout:               nominal type descriptor for MarketplaceKit.AppDistributor, referenced from:
    [2024-10-11 11:12:50.633034] [STDOUT] stdout:                   _symbolic _____Sg 14MarketplaceKit14AppDistributorO in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.633044] [STDOUT] stdout:               __swift_FORCE_LOAD_$_swiftXPC, referenced from:
    [2024-10-11 11:12:50.633053] [STDOUT] stdout:                   __swift_FORCE_LOAD_$_swiftXPC_$_GoogleMobileAds in GoogleMobileAds[arm64][422](GADMarketplaceKitSignals.o)
    [2024-10-11 11:12:50.633062] [STDOUT] stdout:             clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    I'm not sure why it's not finding those frameworks though. MarketplaceKit is 17.4+ so I thought it might be that, but that wouldn't explain swiftXPC and CoreAudioTypes. Although CoreAudioTypes may be noise here since none of the missing symbols are from there.

  4. loic-sharma commented on Oct 14, 2024

    @loic-sharma
    Member

    I'll take a look

  5. loic-sharma commented on Oct 14, 2024

    @loic-sharma
    Member

    I seem to be getting a different linker error.

    Steps:

    git checkout 184deff0f2886f60826a0d2808905654db107941
    git clean -Xfd
    cd dev/benchmarks/platform_views_layout
    
    flutter drive -v --profile -t test_driver/uikit_view_scroll_perf.dart --driver test_driver/scroll_perf_test.dart -d 00008120-001665D90E51A01E
    

    The app appears to build fine. I don't see any ld: warning: Could not find or use auto-linked... warnings in my build output.

    However, Xcode traps immediately upon launching the application with the following output:

    dyld[3023]: Library not loaded: @rpath/libswiftCore.dylib
      Referenced from: <B53D6443-1D50-3CA4-B9BA-A49F761D2D6C> /private/var/containers/Bundle/Application/40927258-5A5C-471D-BA8D-E5144E9A7A1F/Runner.app/Runner
      Reason: tried: '/usr/lib/system/introspection/libswiftCore.dylib' (no such file, not in dyld cache), '/private/var/containers/Bundle/Application/40927258-5A5C-471D-BA8D-E5144E9A7A1F/Runner.app/Frameworks/libswiftCore.dylib' (no such file), '/private/var/containers/Bundle/Application/40927258-5A5C-471D-BA8D-E5144E9A7A1F/Runner.app/Frameworks/libswiftCore.dylib' (no such file)
    

    The same command works on the parent commit, 82ebb74.

    I can reproduce on the parent commit 82ebb74 by bumping google_mobile_ads to 5.2.0:

    Bump google_mobile_ads to 5.2.0
    diff --git a/dev/benchmarks/platform_views_layout/pubspec.yaml b/dev/benchmarks/platform_views_layout/pubspec.yaml
    index b84db8e863..256bb5cdc9 100644
    --- a/dev/benchmarks/platform_views_layout/pubspec.yaml
    +++ b/dev/benchmarks/platform_views_layout/pubspec.yaml
    @@ -9,7 +9,7 @@ dependencies:
         sdk: flutter
       flutter_driver:
         sdk: flutter
    -  google_mobile_ads: 5.1.0
    +  google_mobile_ads: 5.2.0
       # To change the version of the gallery assets, edit
       #   //packages/flutter_tools/lib/src/commands/update_packages.dart
       # and run

    Changes to google_mobile_ads SDK between 5.1.0 and 5.2.0 seem to be roughly this commit range: googleads/googleads-mobile-flutter@3eb6f4c...0330590

  6. loic-sharma commented on Oct 15, 2024

    @loic-sharma
    Member

    Ah I was able to reproduce the same linker error by downgrading to Xcode 15.0, using the "good" parent commit 82ebb74, and applying a patch to bump google_mobile_ads to 5.2.0:

    Patch to bump google_mobile_ads to 5.2.0...
    diff --git a/dev/benchmarks/platform_views_layout/pubspec.yaml b/dev/benchmarks/platform_views_layout/pubspec.yaml
    index b84db8e863..256bb5cdc9 100644
    --- a/dev/benchmarks/platform_views_layout/pubspec.yaml
    +++ b/dev/benchmarks/platform_views_layout/pubspec.yaml
    @@ -9,7 +9,7 @@ dependencies:
         sdk: flutter
       flutter_driver:
         sdk: flutter
    -  google_mobile_ads: 5.1.0
    +  google_mobile_ads: 5.2.0
       # To change the version of the gallery assets, edit
       #   //packages/flutter_tools/lib/src/commands/update_packages.dart
       # and run

    Nothing jumps out as suspicious in the commits between 5.1.0 and 5.2.0, I suspect the issue may be in the closed-source Google-Mobile-Ads-SDK.

  7. christopherfujino commented on Oct 15, 2024

    @christopherfujino
    ContributorAuthor

    Nothing jumps out as suspicious in the commits between 5.1.0 and 5.2.0, I suspect the issue may be in the closed-source Google-Mobile-Ads-SDK.

    Ahh, I didn't realize the ads SDK was closed source, but I also couldn't find it under https://github.com/googleads so that makes sense.

    @LTPhantom, as the author of googleads/googleads-mobile-flutter#1182, do you have any insight into exactly which dependencies were changed upstream and how we can fix this build?

  8. loic-sharma commented on Oct 15, 2024

    @loic-sharma
    Member

    I was able to bisect this build failure to Google-Mobile-Ads-SDK version 11.6.0.

    Steps to bisect...
    1. Setup your repro environment...

      1. Switch to Xcode 15.0

      2. Checkout "good" framework commit 82ebb74

      3. Edit dev/benchmarks/platform_views_layout/pubspec.yaml and bump google_mobile_ads dependency to 5.2.0

      4. Navigate to the platform_views_layout benchmark app:

        cd path/to/flutter
        cd dev/benchmarks/platform_views_layout
        
      5. Build the app:

        flutter build ios
        

        This fails.

    2. Check that downgrading Google-Mobile-Ads-SDK to version 11.6.0 does not fix the build error...

      1. Edit dev/benchmarks/platform_views_layout/ios/.symlinks/plugins/google_mobile_ads/ios/google_mobile_ads.podspec and downgrade Google-Mobile-Ads-SDK to 11.6.0

      2. Delete dev/benchmarks/platform_views_layout/ios/Podfile.lock to make CocoaPods re-download dependencies

      3. Build the app:

        flutter build ios
        

        This fails.

    3. Check that downgrading Google-Mobile-Ads-SDK to version 11.5.0 does fix the build error...

      1. Edit dev/benchmarks/platform_views_layout/ios/.symlinks/plugins/google_mobile_ads/ios/google_mobile_ads.podspec and downgrade Google-Mobile-Ads-SDK to 11.5.0

      2. Delete dev/benchmarks/platform_views_layout/ios/Podfile.lock to make CocoaPods re-download dependencies

      3. Build the app:

        flutter build ios
        

        This succeeds.

    Patch to bump google_mobile_ads to 5.2.0...
    diff --git a/dev/benchmarks/platform_views_layout/pubspec.yaml b/dev/benchmarks/platform_views_layout/pubspec.yaml
    index b84db8e863..256bb5cdc9 100644
    --- a/dev/benchmarks/platform_views_layout/pubspec.yaml
    +++ b/dev/benchmarks/platform_views_layout/pubspec.yaml
    @@ -9,7 +9,7 @@ dependencies:
         sdk: flutter
       flutter_driver:
         sdk: flutter
    -  google_mobile_ads: 5.1.0
    +  google_mobile_ads: 5.2.0
       # To change the version of the gallery assets, edit
       #   //packages/flutter_tools/lib/src/commands/update_packages.dart
       # and run
    Patch to downgrade Google-Mobile-Ads-SDK to 11.5.0...
      s.dependency 'Flutter'
    - s.dependency 'Google-Mobile-Ads-SDK','~> 11.10.0'
    + s.dependency 'Google-Mobile-Ads-SDK','~> 11.5.0'
      s.dependency 'webview_flutter_wkwebview'
      s.ios.deployment_target = '12.0'
      s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS' => 'armv7 arm64 x86_64' }
  9. loic-sharma commented on Oct 15, 2024

    @loic-sharma
    Member

    I was able to repro on a clean Flutter app. I filed a bug on the google_mobile_ads repo: googleads/googleads-mobile-flutter#1193

  10. christopherfujino commented on Oct 15, 2024

    @christopherfujino
    ContributorAuthor

    I was able to repro on a clean Flutter app. I filed a bug on the google_mobile_ads repo: googleads/googleads-mobile-flutter#1193

    Now that we've filed a bug upstream, should we pin this package in flutter/flutter to unblock autorolling everything else?

  11. loic-sharma commented on Oct 15, 2024

    @loic-sharma
    Member

    @christopherfujino Good idea, I sent a PR here: #156911

  12. loic-sharma commented on Oct 15, 2024

    @loic-sharma
    Member

    Closing this as the google_mobile_ads dependency has been pinned. Unpinning this dependency once it's been fixed is tracked by: #156912

    (I'm assuming this is the correct process. Chris feel free to reopen if I got this wrong!)

  13. christopherfujino commented on Oct 15, 2024

    @christopherfujino
    ContributorAuthor

    Closing this as the google_mobile_ads dependency has been pinned. Unpinning this dependency once it's been fixed is tracked by: #156912

    (I'm assuming this is the correct process. Chris feel free to reopen if I got this wrong!)

    looks good to me, thanks for investigating this!

  14. github-actions commented on Oct 30, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  15. locked as resolved and limited conversation to collaborators on Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-iosOwned by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions