Window.open() or inAppBrowser puglin dost not open the link

i’m trying to open extra link in ionic 3 app using window.open(link , target) but nothing happen no action taken and some times the app crashes and closed by it self

trying to remove android platform nothing happen
trying to use InAppBrowser syntax also nothing happen
this is my ionic info

Ionic:

   ionic (Ionic CLI)  : 4.1.1 (C:\Users\Yousef Rabie\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.1.1 (cordova-lib@8.1.0)
   Cordova Platforms     : android 7.1.1
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, (and 13 other plugins)

System:

 (F:\Programes\AndroidSDK)2.5
   NodeJS            : v8.11.3 (C:\Program Files\nodejs\node.exe)
   npm               : 5.6.0
   OS                : Windows 10

this is my plugin list

> cordova plugin ls
cordova-admob-sdk 0.19.0 "AdMob SDK"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-admob-free 0.19.0 "Cordova AdMob Plugin"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova-promise-polyfill 0.0.2 "cordova-promise-polyfill"
es6-promise-plugin 4.2.2 "Promise"
mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"
onesignal-cordova-plugin 2.4.3 "OneSignal Push Notifications"
uk.co.workingedge.phonegap.plugin.launchnavigator 4.2.2 "Launch Navigator"

any one will help me tanks in advance

no one can help me on this ?

i have tried to remove all plugins and add them again trying to figure what is wrong no thing happen and still cannot find what is cause this problem
this is my package.json file

{
  "name": "egypt-app-ionic",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/call-number": "^4.15.0",
    "@ionic-native/camera": "^4.15.0",
    "@ionic-native/core": "~4.15.0",
    "@ionic-native/geolocation": "^4.15.0",
    "@ionic-native/launch-navigator": "^4.15.0",
    "@ionic-native/onesignal": "^4.15.0",
    "@ionic-native/social-sharing": "^4.15.0",
    "@ionic-native/splash-screen": "~4.15.0",
    "@ionic-native/status-bar": "~4.15.0",
    "@ionic/storage": "2.2.0",
    "@ngx-translate/core": "^10.0.2",
    "@ngx-translate/http-loader": "^3.0.1",
    "call-number": "1.0.1",
    "cordova-android": "7.1.1",
    "cordova-plugin-actionsheet": "2.3.3",
    "cordova-plugin-camera": "4.0.3",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-dialogs": "2.0.1",
    "cordova-plugin-geolocation": "4.0.1",
    "cordova-plugin-inappbrowser": "3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-plugin-x-socialsharing": "5.4.1",
    "es6-promise-plugin": "4.2.2",
    "firebase": "^4.10.0",
    "ionic-angular": "3.9.2",
    "ionic2-rating": "^1.2.2",
    "ionicons": "3.0.0",
    "moment": "^2.22.2",
    "mx.ferreyra.callnumber": "~0.0.2",
    "onesignal-cordova-plugin": "2.4.4",
    "places.js": "^1.11.0",
    "rxjs": "^6.3.3",
    "rxjs-compat": "^6.3.3",
    "sw-toolbox": "3.6.0",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "4.2.2",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-x-socialsharing": {},
      "mx.ferreyra.callnumber": {},
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "To get to you the nearsetprovider"
      },
      "onesignal-cordova-plugin": {},
      "cordova-plugin-camera": {},
      "uk.co.workingedge.phonegap.plugin.launchnavigator": {
        "OKHTTP_VERSION": "3.+"
      },
      "cordova-plugin-inappbrowser": {}
    },
    "platforms": [
      "android"
    ]
  }
}

If you are using inappbrowser plugin you can use:

openBrowser(url){
   let browser = this.iab.create(url, '_system');
}

i have used this plugin also but the same problem nothing appear or happen

Post your code, without is difficult to know what is happening.

this is my code.
1- first trying to use inAppBrowser Link
this.iab.create(URL , '_system');
2- second tying to user window method
window.open(UEL , '_system');

nothing happen in this

when i’m trying to use a blank target like
window.open(URL , '_blank');
this page appear

How are you using the “this.iab.create(URL , ‘_system’);” , post the code block where it is.
Did you import the inappbrowser in components? Declared it in the providers?

Just put the entire URL http://www.google.com and not only www.google.com

1 Like

Did it work with the “http://”?

thank you very much it working now

Always use the http:// or it will try to access the URL internally. :grinning:

i know , i forgot for this step in a production day :smile: