You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/21 08:10:05 UTC

[GitHub] [cordova-plugin-inappbrowser] KuschL opened a new issue #675: iOS: opening with target="_blank" not working

KuschL opened a new issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675


   # Bug Report
   
   
   ## Problem
   Open the InAppBrowser with target "_blank" in an Ionic app on iOS is not working.
   
   I tried the code below in a new Ionic project and can reproduce the issue.
   
   ### What is expected to happen?
   The InAppBrowser should open in a new view and show the given website.
   
   ### What does actually happen?
   The InAppBrowser opens in a new view and don't do anything.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   The problem seems to be new, because we could build a working app last week (2020/04/14).
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   ```typescript
   
   //page.ts
   import {Component} from '@angular/core';
   import {InAppBrowser} from "@ionic-native/in-app-browser/ngx";
   
   @Component({
       selector: 'app-page',
       templateUrl: './page.html',
       styleUrls: ['./page.scss'],
   })
   export class Page {
       public folder: string;
   
       constructor(private iab: InAppBrowser) {}
   
       openBrowser() {
           const browser = this.iab.create('https://ionicframework.com/docs/components', '_blank')
   
           browser.on('beforeload').subscribe((e) => {
               console.log('beforeload', e)
           })
   
           browser.on('loadstart').subscribe((e) => {
               console.log('loadstart', e)
           })
   
           browser.on('loaderror').subscribe((e) => {
               console.log('loaderror', e)
           })
   
           browser.on('customscheme').subscribe((e) => {
               console.log('customscheme', e)
           })
   
           browser.on('loadstop').subscribe((e) => {
               console.log('loadstop', e)
           })
   
           browser.on('message').subscribe((e) => {
               console.log('message', e)
           })
   
           browser.on('exit').subscribe((e) => {
               console.log('exit', e)
           })
       }
   }
   
   //page.html
   <ion-content>
       <ion-button (click)="openBrowser()">Open browser</ion-button>
   </ion-content>
   ```
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   Tested on any simulator and iPhone with newest iOS Version (13.4.1)
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   ```
   Ionic:
   
      Ionic CLI                     : 6.6.0 (~/.nvm/versions/node/v13.2.0/lib/node_modules/@ionic/cli)
      Ionic Framework               : @ionic/angular 5.0.7
      @angular-devkit/build-angular : 0.803.26
      @angular-devkit/schematics    : 8.3.26
      @angular/cli                  : 8.3.26
      @ionic/angular-toolkit        : 2.2.0
   
   Cordova:
   
      Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
      Cordova Platforms : ios 5.1.1
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.0, (and 5 other plugins)
   
   Utility:
   
      cordova-res                          : 0.12.1
      native-run (update available: 1.0.0) : 0.2.9
   
   System:
   
      ios-deploy : 1.9.4
      ios-sim    : 8.0.2
      NodeJS     : v13.2.0 (~/.nvm/versions/node/v13.2.0/bin/node)
      npm        : 6.14.4
      OS         : macOS Catalina
      Xcode      : Xcode 11.4.1 Build version 11E503a
   ```
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [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
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] mzl1988 commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
mzl1988 commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-617492664


   There is no problem with cordova-plugin-ionic-webview 4.1.3


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] ShaneJohnsonCC edited a comment on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
ShaneJohnsonCC edited a comment on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-618175205


   Hey @mzl1988 , @guirip , or @tavolondono , can one of you help me connect the dots? In app browser was working perfectly fine for me on ios and then I updated to the latest of everything (ionic, angular, cordova, etc as well as forcing WKWebViewOnly because, well you know) and now it just shows a white screen of death with no errors in console when trying to load a third party site. This is the case for simulator, real device and TestFlight download. I'm pulling hairs trying to get it working again. I downloaded cordova-plugin-ionic-webview, but I'm not sure how that is suppose to help fix this. Thank you so much for your help in advance!
   
   PS, I have tried all the other standard solutions of removing the plugin and adding it again as well as removing the ios platform and re-adding it. No luck...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] guirip commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
guirip commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-617649064


   Thank you @mzl1988 
   Your comment has been very helpful :clap: 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] mzl1988 commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
mzl1988 commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-617039724


   me too


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] ShaneJohnsonCC commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
ShaneJohnsonCC commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-618682180


   Thanks @guirip and @jcesarmobile ! Very helpful


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] jcesarmobile commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
jcesarmobile commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-618381960


   it's a bug on ionic webview plugin https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/551


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] ShaneJohnsonCC commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
ShaneJohnsonCC commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-618175205


   Hey @mzl1988 , @guirip , or @tavolondono , can one of you help me connect the dots? In app browser was working perfectly fine for me on ios and then I updated to the latest of everything (ionic, angular, cordova, etc as well as forcing WKWebViewOnly because, well you know) and now it just shows a white screen of death with no errors in console. This is the case for simulator, real device and TestFlight download. I'm pulling hairs trying to get it working again. I downloaded cordova-plugin-ionic-webview, but I'm not sure how that is suppose to help fix this. Thank you so much for your help in advance!
   
   PS, I have tried all the other standard solutions of removing the plugin and adding it again as well as removing the ios platform and re-adding it. No luck...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] tavolondono commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
tavolondono commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-617892500


   That's right @mzl1988, with that version 4.1.3 works fine
   
   `cordova plugin add cordova-plugin-ionic-webview@4.1.3`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] guirip commented on issue #675: iOS: opening with target="_blank" not working

Posted by GitBox <gi...@apache.org>.
guirip commented on issue #675:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/675#issuecomment-618377505


   @ShaneJohnsonCC 
   
   **Some context about WebKit webview**
   WebKit webview in itself is a big subject. In short, Apple deprecated UIWebView during summer 2018. Everybody should use that WK webview, but this webview was far from offering the same level of stability and feature as UI webview (like good support of file:// protocol!), so there has been quite a fuss!
   I suggest reading this for more information:
   https://cordova.apache.org/news/2018/08/01/future-cordova-ios-webview.html
   
   A lot of work would be needed to have your app working on WK webview. Fortunately the `cordova-plugin-ionic-webview` would make your app use the WK webview AND ship a whole bunch of patches/tools to help managing the caveats of this webview. (For instance, one of these features is serving your webapp with a local server, so protocol http:// is used instead of file://)
   
   So beware if you are switching from UI web view to WK webview, there may be some more work waiting for you.
   
   **Now, what will probably interest you**
   The workaround for this specific InAppBrowser issue is not to use the latest version of `cordova-plugin-ionic-webview` but the version before, where everything was working fine.
   
   :arrow_right:  That version is the version **[4.1.3](https://github.com/ionic-team/cordova-plugin-ionic-webview/releases)**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org