apache / apache/cordova-plugin-inappbrowser
Android not opening unless a different link is opened first.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
Browser is not opening certain links in android.
I have an android/iOS application utilizing ionic (capacitor) and this plugin to login to salesforce via oauth. The login page works fine in iOS but not in android. Oddly, if I have another button on the page and use it to load a website prior to loading the login page, it works as well on android. Of course, I do not want to make a user click another link. When they click the login link the first time, the page just stays white. If i look at chrome://inspect, it looks like the url is getting wiped out... but again if I use a different button to open a different url and then the login button, it works just fine.
The login page loads in android.
const options = 'location=no,toolbarposition=top,enableViewportScale=yes,closebuttoncaption=Cancel,' +
'clearsessioncache=yes,clearcache=yes';
const browser = this.iab.create(loginUrl, '_blank', options);
### Environment, Platform, Device
Android Pixel_XL_API_31
### Version information
cordova-plugin-inappbrowser@5.0.0
ionic info
Ionic:
Ionic CLI : 6.19.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.9
@angular-devkit/build-angular : 13.0.4
@angular-devkit/schematics : 13.0.4
@angular/cli : 13.0.4
@ionic/angular-toolkit : 5.0.3
Capacitor:
Capacitor CLI : 3.4.1
@capacitor/android : 3.4.3
@capacitor/core : 3.4.1
@capacitor/ios : 3.4.1
Utility:
cordova-res : 0.15.4
native-run : 1.5.0
System:
NodeJS : v16.13.2 (/usr/local/bin/node)
npm : 8.1.2
OS : macOS Monterey
- [ X ] I searched for existing GitHub issues
- [ X ] I updated all Cordova tooling to most recent version
- [ X ] I included all the necessary information above
Contributor guide
Research direction
Reproduce the first-link failure with cordova-plugin-inappbrowser@5.0.0 on Android Pixel_XL_API_31 using the shown this.iab.create(loginUrl, '_blank', options) call. Inspect the browser in chrome://inspect and compare opening the Salesforce OAuth login directly with opening another URL first. Done means the login page opens on the first attempt without requiring a separate link.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100