Pointer events lost after InAppBrowser 1.7.1 with Google OAUTH2 flow on iOS


#1

Hello,

I’ve discovered an obscure nasty problem with version 1.7.1 InAppBrowser on iOS. The problem does not exist with 1.6.1 (but I can’t use it for my purpose). I am using InAppBrowser to run the GoogleOAUTH2 implicit grant flow. Google blocks access from a web view user agent. This can be stepped around by setting the user agent with OverrideUserAgent (not AppendUserAgent) in config.xml to be that of a mobile browser. Let’s put the user agent issue aside for this discusion.

Assuming you get to the login flow, you must transition at least ot the password screen. Enter any user in the user form, then enter any rubbish in the password screen. Then exist the InAppBrowser with it’s own done button. Upon returning to Ionic (either v1 or v2) you will find that the app no longer responses to point ter (click events). The app is alive but just is not handling pointer events. If you use run the Safari debugger against either the iOS emulator (10.3.2 tested) or device you can create an alert at console with [e.g. > alert (‘boo’) ] that shows that the app is not frozen. It just doesn’t response to events. This problem does not occur with InAppBrowser 1.6.1. My concern is not with the Google OpenID flow (which they don’t support for security reasons), but there is a interaction bug in InAppBrowser 1.7.1 with either the app container/Ionic/webview/something that locks up the UI. The problem is 100% reproducible. I’ve spent days looking at it and cannot determine the problem. There is no obvious div capturing blocking events. It’s entirely depending on what happens in the in the InAppBrowser. I’ve tested in the latest ionic 3 and in Ionic 1 with ionic native and without. Basically every combo of tests.

(v1)
global packages:

@ionic/cli-plugin-proxy : 1.3.2
@ionic/cli-plugin-proxy : 1.3.2
@ionic/cli-utils        : 1.5.0
Cordova CLI             : 7.0.1 
Gulp CLI                : not installed globally
Ionic CLI               : 3.5.0

local packages:

@ionic/cli-plugin-cordova : 1.4.1
@ionic/cli-plugin-gulp    : 1.0.2
@ionic/cli-plugin-ionic1  : 2.0.1
Cordova Platforms         : android 6.0.0 ios 4.4.0
Ionic Framework           : ionic1 1.3.3

System:

Node       : v7.4.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.0 
ios-sim    : 5.0.13 
npm        : 4.1.1 

(v2)
global packages:

@ionic/cli-plugin-proxy : 1.3.2
@ionic/cli-utils        : 1.5.0
Cordova CLI             : 7.0.1 
Ionic CLI               : 3.5.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.0.0 ios 4.3.1
Ionic Framework                 : ionic-angular 3.3.0

System:

Node       : v7.4.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.0 
ios-sim    : 5.0.13 
npm        : 4.1.1