cordova-plugin-inappbrowser icon indicating copy to clipboard operation
cordova-plugin-inappbrowser copied to clipboard

No redirect (http status 302) with Android 9

Open m-alcu opened this issue 5 years ago • 9 comments

Bug Report

InAppBrowser plugin does not redirect page

Problem

Using Ionic5 with Cordova InAppbrowser we try to load a redirect page that is rendered from the origin page (https://iese-prueba.blackboard.com) to a redirected page where user enters user and password.

Redirection works fine in Android 8 but not in Android9 onwards, Redirect also works in a Chrome view in mobile and desktop version.

What is expected to happen?

Redirect to the second page (as Android 8 does)

What does actually happen?

Page is fixed to the first page, and redirection does not happen. No console error. No Android error (traced from Android Studio)

Information

This is the code. it is almost 100% the example code from pluggin:

import { Component } from '@angular/core'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';

@Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage {

constructor(private iab: InAppBrowser) {}

openBlank() { const browser = this.iab.create('https://iese-prueba.blackboard.com', '_blank'); }

}

Command or Code

Environment, Platform, Device

Version information

Checklist

  • [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

m-alcu avatar Sep 08 '20 17:09 m-alcu

Same thing in our project. Additionally to the mentioned versions in Android 6 the redirect works, while the same code does not work in any android 10 device. When inspecting the network process via chrome dev tools in the inappbrowser window in android 10 the last redirection target gets called but is cancelled without any further notice. example

heffthedev avatar Nov 24 '20 16:11 heffthedev

@m-alcu @heffthedev have you found a workaround for this?

deefour avatar May 13 '21 20:05 deefour

Same issue here. Things work in cordova webview when using _self, but it messes up with the css. Redirect 302 is not working with android 11in inAppbrowser. Have you got any workaround @deefour @heffthedev @m-alcu ?

swapnil0545 avatar Sep 30 '21 04:09 swapnil0545

I'am also with the same issue over here. Does any one found a solution or workaround?

abnerguimaraes avatar Oct 08 '21 20:10 abnerguimaraes

Same issue here - anyone ever figure out a workaround?

rajohns08 avatar Feb 21 '23 01:02 rajohns08

I added an error listener and inappbrowser is reporting an sslerror: 3 with message The certificate authority is not trusted. But Android Chrome and iOS work fine, so I'm skeptical that is a legitimate error message.

rajohns08 avatar Feb 28 '23 01:02 rajohns08

My situation might be niche, but I had a custom user certificate that had to be trusted which solved this problem for me: https://stackoverflow.com/a/56437579/1438339

rajohns08 avatar Mar 02 '23 01:03 rajohns08