iOS 17.2 - GoogleMobilesAds 10.14.0

813 views
Skip to first unread message

mandriao84

unread,
Dec 13, 2023, 1:41:50 PM12/13/23
to Google Mobile Ads SDK Developers
Hello,

Why am i having the following error when i load my class that manage my google ads at the launch of the app ?

```
Main thread blocked by synchronous property query on not-yet-loaded property (assetProperty_Tracks) for HTTP(S) asset. This could have been a problem if this asset were being read from a slow network.

Main thread blocked by synchronous property query on not-yet-loaded property (NaturalSize) for HTTP(S) asset. This could have been a problem if this asset were being read from a slow network.

Main thread blocked by synchronous property query on not-yet-loaded property (PreferredTransform) for HTTP(S) asset. This could have been a problem if this asset were being read from a slow network.

Main thread blocked by synchronous property query on not-yet-loaded property (EstimatedDataRate) for HTTP(S) asset. This could have been a problem if this asset were being read from a slow network.

Main thread blocked by synchronous property query on not-yet-loaded property (NominalFrameRate) for HTTP(S) asset. This could have been a problem if this asset were being read from a slow network.

Is there a way to perform the following in the background thread, because somehow it seem that the completionHandler inside the .load is always perform on the main thread :
```
```

    func loadGADRewardedAd() async -> Void {

        while (self.ads.count < 2) {

            let request = GADRequest()

            guard let ad = try? await GADRewardedAd.load(withAdUnitID: "ca-app-pub-3940256099942544/1712485313", request: request) else {

                print("CLASS> AD> loadGADRewardedAd> FAILED")

                return

            }

            self.ads.append(ad)

        }

    }

```

Best.

Mobile Ads SDK Forum Advisor

unread,
Dec 13, 2023, 1:50:14 PM12/13/23
to glo...@gmail.com, google-adm...@googlegroups.com

Hi Mandriao, 

Thank you for contacting the Mobile Ads SDK support team.

It sounds like an integration specific issue. I do not notice any issues with our Google sample project. Can you provide us complete device logs and Charles log along with your sample project which replicates the issue via “Reply to author” for further investigation.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r1dYg:ref"

Thanks,
 
Google Logo Mobile Ads SDK Team


bojand...@gmail.com

unread,
Jan 30, 2024, 4:03:48 PM1/30/24
to Google Mobile Ads SDK Developers
I have the same issue in my app, are you using the latest Xcode?

Mobile Ads SDK Forum Advisor

unread,
Jan 30, 2024, 4:32:36 PM1/30/24
to bojand...@gmail.com, google-adm...@googlegroups.com
Hi,

Thank you for getting back to us.

As mentioned before by using Google sample project, i am unable to replicate this issue from my end. Could you try once from your end also.

Kindly share your Sample Project to us for further investigation so that we can see your implementation.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, kindly provide requested information to us via reply privately to author option or using the steps below:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002r1dYgQAI&entry.80707362=00215258

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Jamie

unread,
Apr 8, 2024, 10:28:30 AM4/8/24
to Google Mobile Ads SDK Developers
Hi Team,

Want to add some context on this, experiencing the same issue in my project. I set about trying to reproduce this with the simplest possible example:

```

@main

struct AdMobSampleApp: App {

  var adCoordinator = AdCoordinator()

  

  var body: some Scene {

    WindowGroup {

      ContentView()

        .environmentObject(adCoordinator)

        .task {

          await adCoordinator.loadRewardedAd()

        }

    }

  }

}


class AdCoordinator: NSObject, ObservableObject, GADFullScreenContentDelegate {

  private var rewardedAd: GADRewardedAd?

  

  override init() {

    DispatchQueue.main.async {

      GADMobileAds.sharedInstance().start()

    }

    

    super.init()

  }


  func loadRewardedAd() async {

    do {

      rewardedAd = try await GADRewardedAd.load(withAdUnitID: "ca-app-pub-3940256099942544/1712485313", request: GADRequest())

      rewardedAd?.fullScreenContentDelegate = self

    } catch {

      print("Rewarded ad failed to load rewarded ad with error: \(error.localizedDescription)")

    }

  }

}

```


Couldn't get it reproduced at all in the new project, started reducing my main project down until it became exactly this code (even as far as diffing the project files and build flags etc.). Still the issue would only recur from my main project. I believe this is triggered by something in the app container (so where AdMob writes it's cache / data files / whatever). Only after deleting my main app from device & reinstall (thus clearing app container) with the exact same code was able to get the issue to go away.


Reply all
Reply to author
Forward
0 new messages