The inAppBrowser open function does not return a promise so you can't use .then
You could create a event listener like they show in the documentation https://github.com/apache/cordova-plugin-inappbrowser
window.open = cordova.InAppBrowser.open;
var ref = window.open(url, target, options);
ref.addEventListener('loadstop', function() {
//do something
});
This event listener would fire when the inAppBrowser has finished loading the page. You can also use 'loadstart' if you want the listener to fire when the loading starts.
Hope this helps.