admob-plus / admob-plus

Trustable AdMob Plugin for Cordova, Capacitor, Ionic, React Native
https://admob-plus.github.io
MIT License
360 stars 150 forks source link

InterstitialAd.isLoaded return an object instead of Promise<boolean> admob-plus-cordova 2.0.0-alpha.13 #623

Open LHLK opened 7 months ago

LHLK commented 7 months ago

Describe the bug I used to execute InterstitialAd.isLoaded checking whether or not the InterstitialAd was loaded without any issues. Recently, after upgrade to the latest version admob-plus-cordova 2.0.0-alpha.13 the isLoaded() return an object instead. So how do I check if the InterstitialAd is loaded or not ? Return objects are as follows: zone_symbolstate : null zone_symbolvalue : Array(4) 0: v {_parent: v, _name: 'angular', _properties: {…}, _zoneDelegate: v} 1: l {zone_symbolstate: null, zone_symbolvalue: Array(0)} 2: Z=> {…} 3: undefined length: 4 [Prototype] : Array(0) Symbol(Symbol.species) : (...) Symbol(Symbol.toStringTag) : (...)

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior InterstitialAd.isLoaded should return Promise as the previous version

Screenshots If applicable, add screenshots to help explain your problem.

Environment Ionic 7 cordova, use cordova without Ionic wrapper.

 AdMob Plus Environment Info:
    System:
      OS: Windows 10 10.0.19045
      CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
      Memory: 7.16 GB / 15.80 GB
    Binaries:
      Node: 16.13.2 - E:\Program Files\nodejs\node.EXE
      npm: 8.5.3 - E:\Program Files\nodejs\npm.CMD
    Languages:
      Java: 17.0.8
    npmPackages:
      admob-plus-cordova: 2.0.0-alpha.13 => 2.0.0-alpha.13
      cordova: ^11.1.0 => 11.1.0
      cordova-android: ^12.0.1 => 12.0.1
      cordova-ios: ^6.3.0 => 6.3.0
      cordova-plugin-add-swift-support: ^2.0.2 => 2.0.2
      cordova-plugin-advanced-http: ^3.3.1 => 3.3.1
      cordova-plugin-app-version: ^0.1.14 => 0.1.14
      cordova-plugin-device: github:apache/cordova-plugin-device => 2.1.1-dev
      cordova-plugin-inappbrowser: ^5.0.0 => 5.0.0
      cordova-plugin-ionic-keyboard: ^2.2.0 => 2.2.0
      cordova-plugin-ionic-webview: ^5.0.1 => 5.0.1
      cordova-plugin-nativeaudio: ^3.0.9 => 3.0.9
      cordova-plugin-nativeclicksound: 0.0.4 => 0.0.4
      cordova-plugin-network-information: github:apache/cordova-plugin-network-information => 3.0.1-dev
      cordova-plugin-purchase: ^13.5.0 => 13.8.0
      cordova-plugin-screen-orientation: ^3.0.3 => 3.0.3
      cordova-plugin-splashscreen: ^5.0.4 => 5.0.4
      cordova-plugin-statusbar: ^2.4.2 => 2.4.3
      cordova-plugin-x-socialsharing: ^6.0.4 => 6.0.4
      cordova-simple-volume: ^1.0.4 => 1.0.4
      cordova-sqlite-storage: ^4.0.0 => 4.0.0
      cordova.plugins.diagnostic: ^7.1.1 => 7.1.2
      phonegap-plugin-mobile-accessibility: ^1.0.5 => 1.0.5
      typescript: ~4.9.5 => 4.9.5
    Cordova:
      Version: 11.1.0
      Plugins:
        cordova-plugin-statusbar: ^2.4.2
        cordova-plugin-splashscreen: ^5.0.4
        cordova-plugin-ionic-keyboard: ^2.2.0
        cordova-sqlite-storage: ^4.0.0
        cordova-plugin-screen-orientation: ^3.0.3
        cordova-plugin-nativeclicksound: 0.0.4
        cordova-plugin-nativeaudio: ^3.0.9
        cordova-plugin-device: github:apache/cordova-plugin-device
        phonegap-plugin-mobile-accessibility: ^1.0.5
        cordova-plugin-network-information: github:apache/cordova-plugin-network-information
        cordova-plugin-advanced-http: ^3.3.1
        cordova-plugin-app-version: ^0.1.14
        cordova-plugin-x-socialsharing: ^6.0.4
        cordova-simple-volume: ^1.0.4
        cordova.plugins.diagnostic: ^7.1.1
        cordova-plugin-purchase: ^13.5.0
        cordova-plugin-add-swift-support: ^2.0.2
        cordova-plugin-inappbrowser: ^5.0.0
        cordova-plugin-ionic-webview: ^5.0.1
        admob-plus-cordova: 2.0.0-alpha.13
    Ionic:
      Version: 6.18.1
    AndroidManifest.xml:
      Version: -

Additional context Add any other context about the problem here.

EYALIN commented 7 months ago

@LHLK this plugin returns errors in production until @ratson comeshttps://github.com/EYALIN/community-admob-plus/tree/master/packages/cordova back to us, feel free to use my forked plugin which is up to date and maintained https://github.com/EYALIN/community-admob-plus/tree/master/packages/cordova