InAppBrowser loadstart not firing in ionic 4


#1

Hi there,

I am using Ionic 4 beta and the InAppBrowser to display a login page (identityserver).

I have installed @ionic-native/in-app-browser/beta (6.4.1) and
import { InAppBrowser, InAppBrowserOptions } from '@ionic-native/in-app-browser/ngx'

I use the following options

options : InAppBrowserOptions = {
    location : 'no',
    hidden : 'no', 
    clearcache : 'yes',
    clearsessioncache : 'yes',
    zoom : 'yes',
    hardwareback : 'yes',
    mediaPlaybackRequiresUserAction : 'no',
    shouldPauseOnSuspend : 'no', 
    closebuttoncaption : 'Close'
    disallowoverscroll : 'no',
    toolbar : 'yes', 
    enableViewportScale : 'no', 
    allowInlineMediaPlayback : 'no',
    presentationstyle : 'pagesheet',
    fullscreen : 'yes',
};

I am attempting to subscribe to the ‘loadstart’ event but it never appears to be firing. ‘loadstop’ and ‘exit’ are working perfectly.

I’ve simplified the code to this for debugging purposes.

const browser = this.theInAppBrowser.create(oauthUrl,'_blank', this.options);
      
      browser.on('loadstart').subscribe(event => {
        alert('loadstart');
      }, err => {
        alert("InAppBrowser loadstart Event Error: " + err);
      });   
      
      browser.on('loadstop').subscribe(event => {
        alert('loadstop');
      }, err => {
        alert("InAppBrowser loadstop Event Error: " + err);
      });

      browser.on('exit').subscribe((event) => {
        alert('exit');
      }, err => {
        alert("InAppBrowser exit Event Error: " + err);
      });

I’ve changed the url and navigated around, again loadstop fires, loadstart does not.

I am running locally using ionic cordova run browser

Have I missed something obvious?

Thanks in advance!

Mike