InApp Browser not working


#1

I get this error when I try to use the InApp Browser:

Tried to show IAB after it was closed.

Here’s my code. Any advice on what’s going wrong here will be highly appreciated! Many thanks!

  stripeLogin() {
    const browser = this.iab.create('www.google.com', '_self', 'location=yes');
    browser.show();
  }

#2

If you didn’t set hidden to false, you does not necessary to call show function. It will automatically show after page load. Delete show function.

You must add “http://” to url. It is necessary.

And i suggest you to use InAppBrowserOptions class for options.

let options: InAppBrowserOptions = {
            location: 'no'
        };

let browser = this.iab.create('https://www.google.com', '_self', options);

try this.