DFP AdManagerAdView times out and returns internal Error code 0

509 views
Skip to first unread message

Jonas Schinagl

unread,
Mar 10, 2021, 7:04:32 AM3/10/21
to Google Mobile Ads SDK Developers

Hello everyone,

I ran into a weird behaviour and have no idea how to solve or debug it. Normally ads work perfectly fine, only when navigating to a webview and back to the app Ads are not displayed anymore. I added logs to the onAdFailed callback and with a big delay, the only thing it says is: "Internal error" occurred. I checked what internal error means at should mean that the service returned some error. So I tried to check the response, but now I found out that there is no request fired for the ad. Something times out in the sdk (check out the latency on the error log), but I can't really debug anything there to find out what exactly happens.
My question:
is it possible that some webview implementation can affect how ads behave?

I couldn't find any similar issue on the web so I guess it must be something on my side or its the biggest edge case ever.

would be awesome if you could help me out
thanks

error log:
{
      "Code": 0,
      "Message": "Internal error.",
      "Domain": "com.google.android.gms.ads",
      "Cause": "null",
      "Response Info": {
        "Mediation Adapter Class Name": "",
        "Adapter Responses": [
          {
            "Adapter": "com.google.ads.mediation.admob.AdMobAdapter",
            "Latency": 60003,
            "Credentials": {},
            "Ad Error": {
              "Code": 0,
              "Message": "Internal error.",
              "Domain": "com.google.android.gms.ads",
              "Cause": "null"
            }
          }
        ]
      }

Jonas

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 10, 2021, 10:08:52 AM3/10/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com
Hi Jonas,

Thank you for bringing this issue to our attention. From what I can tell, the ads are displaying ok, but if you go to a webView and then exit that webView? you are no longer able to get ads? We would start by asking if you have a sample app that is able to display this behavior so that we can see it ourselves. You can share it via "Reply to author" button.

I would be careful when putting delays into the SDK, as this could have adverse affects. Especially with timeout issues. The system has those built in and if you add a big enough delay with just whatever natural delays you might have. Could cause unintended crashes.

As for the internal error? This would usually indicate to us that something in the code is causing the crash. What that is I can not tell without looking more into the code.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2DuIGx:ref

Jonas Schinagl

unread,
Mar 10, 2021, 10:22:04 AM3/10/21
to Google Mobile Ads SDK Developers
Hi William,

thanks for the quick reply! Yes, the flow would be:
open app -> see ads -> go to some webview -> go back to app -> no more ads

Sorry for the misunderstanding about the delay. I don't produce or force the delay, that's just something I noticed while debugging.
I will try to create a sample app, that kind of represents what we do in the app. hopefully I will get it done soon.


thanks

Jonas
Message has been deleted

Jonas Schinagl

unread,
Mar 10, 2021, 4:41:33 PM3/10/21
to Google Mobile Ads SDK Developers
Hey William,

I quickly did some example application which kind of represents what we do in the app and also reproduces the issue.
Seems like I can't `reply to author` on your message. I also can't attach the zipped file to this message, data format is not allowed. Do I need some permissions to reply to author?

thanks!

Jonas

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 10, 2021, 8:06:40 PM3/10/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com

Hello Jonas,

Thanks for getting back to us.

You can send your sample project to this email (mobileads...@gmail.com) instead. Rest assured that your data is treated with the utmost confidentiality, and will only be used for the investigation and resolution of this issue.

Regards,

Google Logo
Mark Kevin Albios
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2DuIGx:ref

Jonas Schinagl

unread,
Mar 11, 2021, 3:29:17 AM3/11/21
to Google Mobile Ads SDK Developers
Hey,

I sent an email to the provided email address.

cheers

Jonas

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 11, 2021, 8:13:24 AM3/11/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com
Hi Jonas,

Thank you for providing the requested detail. Unfortunately, I'm having trouble building your app in my work machine. With this, let me raise this to the rest of the team for further investigation and to get their insight as well. I'll let you know the soonest they provide their feedback.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2DuIGx:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 11, 2021, 10:54:25 AM3/11/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com
Hi Jonas,

Thank you for your patience as we wlooked more into this for you. I was able to finally get the app up and running. And saw that no ads are being served. But I also got several other errors of which could be a cause for this.

Here is one:
W/cr_AwContents: Application attempted to call on a destroyed WebView
    java.lang.Throwable
        at org.chromium.android_webview.AwContents.f(PG:379)
        at org.chromium.android_webview.AwContents.a(PG:353)
        at org.chromium.android_webview.AwContents.r(PG:655)
        at Bk.loadingStateChanged(PG:139)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:336)
        at android.os.Looper.loop(Looper.java:174)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)

I was also constantly getting the following message with various results when it looks like I click on the "Go to Search" engine button:
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef
    glUtilsParamSize: unknow param 0x000088ef
D/eglCodecCommon: setVertexArrayObject: set vao to 9 (9) 0 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 8 (8) 0 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/EGL_emulation: eglMakeCurrent: 0xd5c131c0: ver 3 0 (tinfo 0xb95dcd60)
D/eglCodecCommon: setVertexArrayObject: set vao to 9 (9) 0 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
    setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
    setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
    setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
    setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
    setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 9
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

There is also no way for me to go to a webView. When I click on the button it starts to build the setVertexArrayObject. I get the toast on a start up of the app every time but it appears to be an issue with the webView being destroyed after the 1st click of the button.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2DuIGx:ref

Jonas Schinagl

unread,
Mar 11, 2021, 11:00:38 AM3/11/21
to Google Mobile Ads SDK Developers
Hey William,

Seems like a problem with emulators, on a physical device it works. Sorry I didn't check the app on an emulator as I was quickly patching this up. I will try to fix this.

cheers,

Jonas

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 11, 2021, 12:49:28 PM3/11/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com
Hi Jonas,

Thanks for the additional information. I was able to test it on a hard device. So with that being said, I have a few thoughts. first, I would suggest adding in the test ids that we offer to use during testing, here is banner ad unit id. This will help with the second part I will mention.

Second part of this is that yes we get the toast on app launch as expected. But what has me concerned is that when clicking the button to go to the fragment. We still are able to see the main view under it. This could be one point of concern. The other is that this could be an issue where the ad has just not refreshed yet. And thus why I would suggest at least during testing putting a banner ad in to see if we are getting the refresh. Also I would look into changing the fragment somehow. Or even just having that switch to a new activity with the webView in that. At minimal, I would definitely look into making the background of the fragment not so transparent, or on button click having the xml change between the main view and the search view. So you can keep like a single page app structure if you want.

I also know the toast should show on refrh. But maybe something in the SDK is causing that to not happen, again this is why I just would want to make sure that there is a refresh happening.

Jonas Schinagl

unread,
Mar 14, 2021, 10:10:13 AM3/14/21
to Google Mobile Ads SDK Developers
Hey,

sorry for the late answer. I did some changes based on your comment. I sent the url to the GitHub repo via gmail.

cheers

Jonas

Jonas Schinagl

unread,
Mar 17, 2021, 4:49:07 AM3/17/21
to Google Mobile Ads SDK Developers
Hey team,

did you have some time to take a look at the updated example app?

cheers

Jonas

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 17, 2021, 11:40:30 AM3/17/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com
Hi Jonas,

Thank you for the response back. I have been able to look over the code. As well as test the newer sample that you gave us. I was able to see the issue more clearer and am seeing that the ad does not reappear after switching to the webView.

Having looked at our sample from our documents. I would suggest to go back over that. While also looking at one of our samples. Just a quick look and comparision. I see a few things that are different. Also I see that our documents are using some depreciated methods. So this also appears to be a possible cause of this.

Allow me to bring this to my team to look more into. Once we get some feedback, we will be certain to pass it along to you.

Jonas Schinagl

unread,
Mar 17, 2021, 12:01:58 PM3/17/21
to Google Mobile Ads SDK Developers
Hey William,


awesome! thank you for the response.

ps.
seems like the `sample` link you provided doesn't work. I always get `service unavailable`.

cheers

Jonas

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 17, 2021, 4:43:34 PM3/17/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com
Hi Jonas,

Thank you. and my apology about the link. Also I would suggest looking at the section about preparing for v20 of the SDK as this shows some of the changes made regarding the callbacks and changes of some names. Which I was looking at and wondering if this might be causing some of the errors.

Documents and Preparing for SDK v 20 .

Jonas Schinagl

unread,
Apr 9, 2021, 5:14:00 AM4/9/21
to Google Mobile Ads SDK Developers
Hello,

sorry I was on vacation. Did you have any chance to check this issue with the team?
the needed changes for v20 are already implemented in the example app. So I think this shouldn't be the issue.

thanks


cheers
Jonas

Mobile Ads SDK Forum Advisor Prod

unread,
Apr 9, 2021, 12:21:24 PM4/9/21
to jonas.s...@gmail.com, google-adm...@googlegroups.com
Hi Jonas,

Thank you for reaching back out to us. I have messaged my team regarding this and have not yet heard anything back. As of this moment it still looks like they are looking into this. Once we have more information we will be certain to pass this along.
Reply all
Reply to author
Forward
0 new messages