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


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   `iab.open('https://example.com', '_system', 'noopener')`
   opens the webpage
   
   ### What does actually happen?
   
   It throws
   ```java
   E/PluginManager: Uncaught exception from plugin
       java.util.NoSuchElementException
           at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
           at 
org.apache.cordova.inappbrowser.InAppBrowser.parseFeature(InAppBrowser.java:447)
           at 
org.apache.cordova.inappbrowser.InAppBrowser.execute(InAppBrowser.java:174)
           at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:117)
           at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
           at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
           at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
           at 
org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
           at android.os.MessageQueue.nativePollOnce(Native Method)
           at android.os.MessageQueue.next(MessageQueue.java:336)
           at android.os.Looper.loop(Looper.java:174)
           at android.os.HandlerThread.run(HandlerThread.java:67)
   ```
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   
   I believe it is 
https://github.com/apache/cordova-plugin-inappbrowser/blob/46c080f59a011747ba1b70f462b27fee26957247/src/android/InAppBrowser.java#L436-L456
   that expects there to always be an `=` with a value for every windowFeature.
   `iab.open('https://example.com', '_system', 'noopener=')` also doesn't work.
   
   I can try to put a PR together that doesn't try and parse out the value when 
not there but no idea what the implication is.
   It does seem like showWebPage just ignores noopener and noreferrer outright 
https://github.com/apache/cordova-plugin-inappbrowser/blob/46c080f59a011747ba1b70f462b27fee26957247/src/android/InAppBrowser.java#L637
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   
   Android
   
   ### 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.
   -->
   
   Plugin version 4.0.0
   Cordova android 9.0.0
   
   ## 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:
[email protected]



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

Reply via email to