GADInterstitialViewController shouldAutorotate issue

98 views
Skip to first unread message

Mehmet Karagöz

unread,
Jul 5, 2018, 10:24:30 AM7/5/18
to Google Mobile Ads SDK Developers
Hello, 

We have a crash on our iOS apps, Crash occurs more than 10.000+ of our apps to more than 4000+ users. 
I attached the crash log.


Thanks.
Mehmet.


mobileadssdk-a...@google.com

unread,
Jul 5, 2018, 3:54:06 PM7/5/18
to Mehmet Karagöz, Google Mobile Ads SDK Developers
Hi Mehmet,

Thanks for reaching out to us.  I will need some additional information to debug the issue further:
  • Steps to reproduce the crash, if reproducible locally
  • Charles logs (here are setup instructions)
  • Type of ads being served
  • Crashlytics link/Crash logs
  • Is the crash mostly specific to iOS version?
  • SDK and iOS version being used
If you could provide these details, it would be really helpful so I can take a look and assist you further. You can reply back via Reply privately to author option.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/37e686c0-0b88-4222-a2cc-33a3c0a56b4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Mehmet Karagöz

unread,
Jul 6, 2018, 3:50:10 AM7/6/18
to Google Mobile Ads SDK Developers
 Hi Deepika,

- We cannot reproduce the crash.
- We cannot reproduce the crash.
- We use interstitial and rewarded video on our apps but crash says GADInterstitialViewController
- I already attached Crashlytics link and also new one; http://crashes.to/s/d7667c3b3a1 and http://crashes.to/s/bf43dfef685
- You can see detailed iOS versions on Crashlytics link; iOS9 (%92), iOS10(%1), iOS 11(%7)
- The crash started with Google Mobile Ads 7.31.0 version. 
 
Thanks.
Mehmet Karagoz.
Software Engineer

mobileadssdk-a...@google.com

unread,
Jul 6, 2018, 3:00:33 PM7/6/18
to Mehmet Karagöz, Google Mobile Ads SDK Developers
Hi Mehmet,

Thanks for sharing the requested details. Before I share this with the rest of the team, can you please provide us a sample app with your implementation or code snippets for us to take a look? You can share it using "Reply privately to Author" option.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Mehmet Karagöz

unread,
Jul 9, 2018, 3:47:08 AM7/9/18
to Google Mobile Ads SDK Developers
Hi Deepika,

I send a crashlytics log in my first post and you wanted some details and I gave answers and now you want a sample app.

You can ask them in one post.

I can't share sample code we just have 10000+ crash on crashlytics logs.

Thanks.
Mehmet.

mobileadssdk-a...@google.com

unread,
Jul 9, 2018, 3:36:04 PM7/9/18
to Mehmet Karagöz, Google Mobile Ads SDK Developers
Hi Mehmet,

I understand your concern. As the issue is not reproducible locally, we would need to verify the sample project or atleast code snippets to rule out the possibility that this is not an issue with your implementation. You can use "Reply privately to Author" option to share the details privately.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Mats

unread,
Sep 9, 2018, 3:33:14 PM9/9/18
to Google Mobile Ads SDK Developers
Hi,

Immediately after integrating interstitials using the Google-Mobile-Ads-SDK (7.31.0), we have started seeing similar crashes in our iOS app. Similar to the original poster, we cannot reproduce this issue ourselves. However, I might be able to provide some additional information that could prove useful. Crashlytics is reporting the following:

[UIViewController __supportedInterfaceOrientations]
Fatal Exception: UIApplicationInvalidInterfaceOrientation
Supported orientations has no common orientation with the application, and [GADInterstitialViewController shouldAutorotate] is returning YES



This is indeed true, because we do the following in our AppDelegate.swift:

 
   var allowLandscape = false

    func application
(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
       
// In the target configuration of this project, only portrait is selected.
       
// This ensures that the app can only launch into portrait. From there, this method is used.
       
if allowLandscape {
           
return .allButUpsideDown
       
}
       
return .portrait
   
}

    func applicationWillResignActive
(_ application: UIApplication) {
        allowLandscape
= false
   
}

    func applicationDidBecomeActive
(_ application: UIApplication) {
        allowLandscape
= true
   
}



The reasoning is that the app should never be allowed to enter the foreground in landscape mode. Once the app is running, there are situations in which the app will allow landscape mode (e.g. when an AVPlayer tries to go full screen). Due to a complex view controller hierarchy, there appears to be no way for us to avoid this approach.

Furthermore, our crash logs tell us two things:
1) Crashlytics puts 75% of these crashes in the background state of the app (so likely, these crashes happen shortly before or shortly after entering foreground)
2) In each case, the OS orientation is listed as landscape when the crash happens

Putting all of this together, it seems like the issue is occuring when entering the foreground of an app in landscape mode after having launched it previously. In our case, it seems like Admob is trying to show an interstitial BEFORE `applicationDidBecomeActive` is called, which means our AppDelegate will only support the portrait orientation, which conflicts with Admob's intention of showing a landscape interstitial (because that's the OS orientation).

mobileadssdk-a...@google.com

unread,
Sep 10, 2018, 3:00:12 PM9/10/18
to Mats, Google Mobile Ads SDK Developers
Hello,

I'm Deepika's colleague assisting you on her behalf. Could you please share the following details for us to troubleshoot the issue?

Complete stack trace
Application Link
Steps to reproduce the issue
Sample project of your implementation. 

If you can share these details, it will be really helpful. You can reply back via Reply privately to author option. 

Thanks,
Bharani Cherukuri
Mobile Ads SDK Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages