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


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   I'm trying to get the InAppBrowser function up and working on my Ionic App. 
I'm following the steps on the page 
'https://github.com/apache/cordova-plugin-inappbrowser.' The only installation 
step it says to do is run 'cordova plugin add cordova-plugin-inappbrowser.' 
Then it begins discussing basic operations on starting the inAppBrowser. 
   
   My code is 
   ```
   var ref = cordova.InAppBrowser.open('www.google.com', '_blank')
   ```
   I would expect this to open up the Google website in my Ionic Lab Android 
platform emulator.
   
   
   ### What does actually happen?
   
   Instead, I get the error: 'ERROR ReferenceError: cordova is not defined'. 
Someone else posted a similar question, and the suggested solution was to add a 
Script tag: '  <script src="cordova.js"></script>' to their index.html file. 
That didn't work for me - but I wonder why that was even suggested. I didn't 
install any other packages/run any other commands besides the 'cordova plugin 
add cordova-plugin-inappbrowser' stated at the top of the Github docs on the 
InAppBrowser page. What am I missing?
   
   
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   ```
   cordova plugin add cordova-plugin-inappbrowser.
   var ref = cordova.InAppBrowser.open('www.google.com', '_blank')
   ```
   
   ### Version information
   ```
   Ionic:
   
      Ionic CLI                     : 5.4.16 (/usr/local/lib/node_modules/ionic)
      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
   
   Capacitor:
   
      Capacitor CLI   : 2.0.2
      @capacitor/core : 2.0.2
   
   Cordova:
   
      Cordova CLI       : 9.0.0 ([email protected])
      Cordova Platforms : android 8.1.0, ios 5.1.1
      Cordova Plugins   : cordova-plugin-device 2.0.2 "Device"
        cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
        cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
        cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
        cordova-plugin-splashscreen 5.0.2 "Splashscreen"
        cordova-plugin-statusbar 2.4.2 "StatusBar"
        cordova-plugin-whitelist 1.3.3 "Whitelist"
   
   
   Utility:
   
      cordova-res : not installed
      native-run  : 1.0.0
   
   System:
   
      ios-sim : 8.0.2
      NodeJS  : v12.16.1 (/usr/local/bin/node)
      npm     : 6.14.3
      OS      : macOS Catalina
      Xcode   : Xcode 11.3.1 Build version 11C504
   ```
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [ ] 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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to