In App Browser | BrowserTab tryouts [solved]

Hello.

Installed and trying to use InAppBrowser (also tried BrowserTab),
but, nothing happens… Just no error, no success… No changes on the app… lol

Running on Genymotion, with chrome/inspect to debug.


//Imports
import { BrowserTab } from '@ionic-native/browser-tab/ngx'
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'

//Declarations
@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
  providers: [BrowserTab, InAppBrowser]
})
export class HomePage {

/html
<button ion-button (click)="open(carnet.moipBilletUri)">System browser</button>

Now, what I’ve tested:



//First go: 
  public open(url : string){
    console.log("Opeeeeeeeeen 2: ", url)
    this.iab.create(url, "_system"); 
  //also tried with .show(), just in case lol... but same result
  //also tried: _self and _blank
  }

//Second go:
    this.browserTab.isAvailable()
    .then(isAvailable => {
      if (isAvailable) {
        this.browserTab.openUrl(url);
      } else {
        console.log("errorrrr");
      }
    });

So, first case: nothing happens, no error nothing.
Second case: this error pops out:


ERROR Error: Uncaught (in promise): Class not found
    at resolvePromise (zone.js:831)
    at resolvePromise (zone.js:788)
    at zone.js:892
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Object.onInvokeTask (core.js:17290)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
    at drainMicroTaskQueue (zone.js:601)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
    at invokeTask (zone.js:1744)

Guys,

  1. Update Cordova

  2. Remove Android/ios

  3. Add Android/ios

  4. Try again.

Hope this helps someone.