Search code examples
flutterfirebase-admob

Too many messages - The webview is destroyed. Ignoring action


After the admob was added to the project and used I constantly get such messages in console when nothing happens on screen adn the app gets too slow.

I/Ads ( 3001): This request is sent from a test device.

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

I/chatty ( 3001): uid=10080(com.github.testapp) identical 1 line

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

I/chatty ( 3001): uid=10080(com.github.testapp) RenderThread identical 18 lines

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

I/chatty ( 3001): uid=10080(com.github.testapp) identical 1 line

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

I/Choreographer( 3001): Skipped 30 frames! The application may be doing too much work on its main thread.

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

I/chatty ( 3001): uid=10080(com.github.testapp) RenderThread identical 88 lines

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

D/EGL_emulation( 3001): eglMakeCurrent: 0xe63abce0: ver 3 0 (tinfo 0xbf992bc0)

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

I used it in a Stateless widget this way:

 @override
 Widget build(BuildContext context) {
    BannerAd _currentBannerAd = BannerAd(
      adUnitId: AdManager.bannerAdUnitId,
      size: AdSize.banner,
    );
    
    void _loadBannerAd() {
      _currentBannerAd
        ..load()
        ..show(anchorType: AnchorType.bottom);
    }
    
    _loadBannerAd();

    return FutureBuilder<List<String>>(...

Solution

  • As mentioned in the docs, dispose() should be called when access to the ad is no longer needed. The cause for the app slow down is likely because of the ad being initialized multiple times without being disposed.