You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/10/25 05:29:25 UTC

[GitHub] [cordova-android] jpduckwo opened a new issue #1371: cordova-plugin-whitelist gets removed but is actually required in v10

jpduckwo opened a new issue #1371:
URL: https://github.com/apache/cordova-android/issues/1371


   # Bug Report
   
   ## Problem
   
   The documentation states that the whitelist plugin is integrated into cordova-android v10. However removing the plugin breaks functionality.
   
   > Deprecation Notice
   With the Allow List functionality now integrated into the core of Cordova Android (10.x and greater), this plugin is no longer required.
   > Existing projects using Cordova Android 10 or greater should remove this plugin with the following command:
   > cordova plugin rm cordova-plugin-whitelist
   
   ### What is expected to happen?
   
   Without the plugin installed, the whitelist settings from config.xml should work.
   e.g.
   ```
       <access origin="*" />
       <allow-intent href="http://*/*" />
       <allow-intent href="https://*/*" />
       <allow-intent href="tel:*" />
       <allow-intent href="sms:*" />
       <allow-intent href="mailto:*" />
       <allow-intent href="geo:*" />
   ```
   
   ### What does actually happen?
   In my specific use case, XHR requests to https urls were blocked. They failed in PluginManager.shouldAllowRequest. Which seems to only allow some specific local based cases if it doesn't have a response from a plugin
   
   ## Information
   To work around this problem you can manually install the plugin `cordova plugin add cordova-plugin-whitelist` AFTER adding the platform. However if you rm the platform then re-add it, it won't automatically install the plugin and drops this message:
   
   ```
   Installing "cordova-plugin-whitelist" for android
   Plugin doesn't support this project's cordova-android version. cordova-android: 10.1.1, failed version requirement: >=4.0.0 <10.0.0
   Skipping 'cordova-plugin-whitelist' for android
   ```
   
   ### Command or Code
   
   NA
   
   
   ### Environment, Platform, Device
   
   MacOS, Android, Emulator Pixel 3 API 29 Android 10.0
   
   
   ### Version information
   
   Cordova: Cordova CLI V10.0.0, Cordova Platforms ios, android, Cordova Plugins:
   ```
       "cordova-android": "^10.1.1",
       "cordova-ios": "^6.2.0",
       "cordova-plugin-device": "^2.0.3",
       "cordova-plugin-firebasex": "^13.0.1",
       "cordova-plugin-inappbrowser": "^5.0.0",
       "cordova-plugin-nativestorage": "^2.3.2",
       "cordova-plugin-splashscreen": "^6.0.0",
       "cordova-plugin-statusbar": "^2.4.3",
       "cordova-plugin-whitelist": "^1.3.5",
       "cordova-universal-links-plugin": "github:veloce/cordova-universal-links-plugin
   ```
   Other Frameworks: NA
   Operating System, Android Studio, Xcode etc.
   ```
   Android Studio Arctic Fox | 2020.3.1 Patch 3
   Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
   Runtime version: 11.0.10+0-b96-7281165 x86_64
   VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
   macOS 11.6
   GC: G1 Young Generation, G1 Old Generation
   Memory: 2048M
   Cores: 4
   Registry: external.system.auto.import.disabled=true
   Non-Bundled Plugins: org.jetbrains.kotlin
   ```
   
   
   
   ## 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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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-android] jpduckwo commented on issue #1371: cordova-plugin-whitelist gets removed but is actually required in v10

Posted by GitBox <gi...@apache.org>.
jpduckwo commented on issue #1371:
URL: https://github.com/apache/cordova-android/issues/1371#issuecomment-962185798


   @void-mAlex 
   
   There were a few things we needed to change to get it working in the config xml. Here is a redacted copy of ours.
   
   1. Make sure the Scheme and Origin settings are only in the iOS section
   2. Check the format of the allow intent matches below exactly (we had something like https://**/* before - not 100% sure this was an issue but just noting)
   3. In addition to this ensure you have version 1.3.5 of the whitelist plugin installed, 1.3.4 will break it
   
   `cordova plugin add cordova-plugin-whitelist@1.3.5`
   
   ```
   <?xml version='1.0' encoding='utf-8'?>
   <widget android-versionCode="400106" id="..." version="4.1.6" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
       <name>...</name>
       <description>
           ...
   </description>
       <author email="..." href="...">
           ...
   </author>
       <!-- Common preferences -->
       <content src="index.html" />
       <access origin="*" />
       <allow-intent href="http://*" />
       <allow-intent href="https://*" />
       <allow-intent href="tel:*" />
       <allow-intent href="sms:*" />
       <allow-intent href="mailto:*" />
       <allow-intent href="geo:*" />
       <preference name="Fullscreen" value="false" />
       <preference name="BackgroundColor" value="0xff000000" />
       <preference name="Orientation" value="default" />
       <preference name="SplashMaintainAspectRatio" value="true" />
       <preference name="FadeSplashScreen" value="false" />
       <preference name="ShowSplashScreenSpinner" value="false" />
       <preference name="AutoHideSplashScreen" value="false" />
       <preference name="StatusBarStyle" value="blackopaque" />
       <preference name="StatusBarBackgroundColor" value="#000000" />
       <preference name="StatusBarOverlaysWebView" value="false" />
       <preference name="StatusBarDefaultScrollToTop" value="true" />
       <preference name="AndroidLaunchMode" value="singleInstance" />
       <universal-links>
           <host name="..." scheme="https" event="cmj" />
           <host name="*...." scheme="https" event="cmj" />
           <ios-team-id value="UT2843CZ5K" />
       </universal-links>
       <!-- Android -->
       <platform name="android">
           <allow-intent href="market:*" />
           <icon density="ldpi" src="res/icon/android/ldpi.png" />
           <icon density="mdpi" src="res/icon/android/mdpi.png" />
           <icon density="hdpi" src="res/icon/android/hdpi.png" />
           <icon density="xhdpi" src="res/icon/android/xhdpi.png" />
           <icon density="xxhdpi" src="res/icon/android/xxhdpi.png" />
           <icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png" />
           <splash density="xhdpi" src="res/screen/android/xhdpi.png" />
           <resource-file src="res/icon/android/push/mdpi.png" target="app/src/main/res/drawable-mdpi/notification_icon.png" />
           <resource-file src="res/icon/android/push/hdpi.png" target="app/src/main/res/drawable-hdpi/notification_icon.png" />
           <resource-file src="res/icon/android/push/xhdpi.png" target="app/src/main/res/drawable-xhdpi/notification_icon.png" />
           <resource-file src="res/icon/android/push/xxhdpi.png" target="app/src/main/res/drawable-xxhdpi/notification_icon.png" />
           <resource-file src="res/icon/android/push/xxxhdpi.png" target="app/src/main/res/drawable-xxxhdpi/notification_icon.png" />
           <config-file parent="application" target="AndroidManifest.xml">
               <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon" />
           </config-file>
       </platform>
       <!-- iOS -->
       <platform name="ios">
           <allow-intent href="itms:*" />
           <allow-intent href="itms-apps:*" />
           <!-- https://stackoverflow.com/questions/64060290/cordova-ios-origin-null-is-not-allowed-by-access-control-allow-origin-on-local -->
           <preference name="Scheme" value="app" />
           <preference name="Hostname" value="localhost" />
           <preference name="Orientation" value="all" />
           <preference name="ScrollEnabled" value="true" />
           <preference name="AllowsAirPlayForMediaPlayback" value="false" />
           <preference name="MediaPlaybackAllowsAirPlay" value="false" />
           <preference name="AllowBackForwardNavigationGestures" value="false" />
           <preference name="Allow3DTouchLinkPreview" value="false" />
           <preference name="DisallowOverscroll" value="false" />
           <icon height="128" src="res/icon/ios/Icon-128.png" width="128" />
           <icon height="256" src="res/icon/ios/Icon-128@2x.png" width="256" />
           <icon height="16" src="res/icon/ios/Icon-16.png" width="16" />
           <icon height="32" src="res/icon/ios/Icon-16@2x.png" width="32" />
           <icon height="20" src="res/icon/ios/Icon-20.png" width="20" />
           <icon height="40" src="res/icon/ios/Icon-20@2x.png" width="40" />
           <icon height="60" src="res/icon/ios/Icon-20@3x.png" width="60" />
           <icon height="24" src="res/icon/ios/Icon-24.png" width="24" />
           <icon height="48" src="res/icon/ios/Icon-24@2x.png" width="48" />
           <icon height="72" src="res/icon/ios/Icon-24@3x.png" width="72" />
           <icon height="256" src="res/icon/ios/Icon-256.png" width="256" />
           <icon height="512" src="res/icon/ios/Icon-256@2x.png" width="512" />
           <icon height="55" src="res/icon/ios/Icon-27.5@2x.png" width="55" />
           <icon height="29" src="res/icon/ios/Icon-29.png" width="29" />
           <icon height="58" src="res/icon/ios/Icon-29@2x.png" width="58" />
           <icon height="87" src="res/icon/ios/Icon-29@3x.png" width="87" />
           <icon height="32" src="res/icon/ios/Icon-32.png" width="32" />
           <icon height="64" src="res/icon/ios/Icon-32@2x.png" width="64" />
           <icon height="40" src="res/icon/ios/Icon-40.png" width="40" />
           <icon height="80" src="res/icon/ios/Icon-40@2x.png" width="80" />
           <icon height="120" src="res/icon/ios/Icon-40@3x.png" width="120" />
           <icon height="44" src="res/icon/ios/Icon-44.png" width="44" />
           <icon height="88" src="res/icon/ios/Icon-44@2x.png" width="88" />
           <icon height="132" src="res/icon/ios/Icon-44@3x.png" width="132" />
           <icon height="50" src="res/icon/ios/Icon-50.png" width="50" />
           <icon height="100" src="res/icon/ios/Icon-50@2x.png" width="100" />
           <icon height="150" src="res/icon/ios/Icon-50@3x.png" width="150" />
           <icon height="512" src="res/icon/ios/Icon-512.png" width="512" />
           <icon height="1024" src="res/icon/ios/Icon-512@2x.png" width="1024" />
           <icon height="1536" src="res/icon/ios/Icon-512@3x.png" width="1536" />
           <icon height="57" src="res/icon/ios/Icon-57.png" width="57" />
           <icon height="114" src="res/icon/ios/Icon-57@2x.png" width="114" />
           <icon height="171" src="res/icon/ios/Icon-57@3x.png" width="171" />
           <icon height="60" src="res/icon/ios/Icon-60.png" width="60" />
           <icon height="120" src="res/icon/ios/Icon-60@2x.png" width="120" />
           <icon height="180" src="res/icon/ios/Icon-60@3x.png" width="180" />
           <icon height="72" src="res/icon/ios/Icon-72.png" width="72" />
           <icon height="144" src="res/icon/ios/Icon-72@2x.png" width="144" />
           <icon height="216" src="res/icon/ios/Icon-72@3x.png" width="216" />
           <icon height="76" src="res/icon/ios/Icon-76.png" width="76" />
           <icon height="152" src="res/icon/ios/Icon-76@2x.png" width="152" />
           <icon height="228" src="res/icon/ios/Icon-76@3x.png" width="228" />
           <icon height="167" src="res/icon/ios/Icon-83.5@2x.png" width="167" />
           <icon height="86" src="res/icon/ios/Icon-86.png" width="86" />
           <icon height="172" src="res/icon/ios/Icon-86@2x.png" width="172" />
           <icon height="258" src="res/icon/ios/Icon-86@3x.png" width="258" />
           <icon height="98" src="res/icon/ios/Icon-98.png" width="98" />
           <icon height="196" src="res/icon/ios/Icon-98@2x.png" width="196" />
           <icon height="294" src="res/icon/ios/Icon-98@3x.png" width="294" />
           <splash src="res/screen/ios/Default@2x~universal~anyany.png" />
       </platform>
   </widget>
   ```
   
   
   
   
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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-android] void-mAlex commented on issue #1371: cordova-plugin-whitelist gets removed but is actually required in v10

Posted by GitBox <gi...@apache.org>.
void-mAlex commented on issue #1371:
URL: https://github.com/apache/cordova-android/issues/1371#issuecomment-961933826


   if I can maybe give more insight into this as I've run into the exact thing. seems to be an actual issue when upgrading from lower version of cordova-android, would a reproduction repo help? for now have to keep cordova-plugin-whitelist or our app just doesn't work anymore


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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-android] void-mAlex commented on issue #1371: cordova-plugin-whitelist gets removed but is actually required in v10

Posted by GitBox <gi...@apache.org>.
void-mAlex commented on issue #1371:
URL: https://github.com/apache/cordova-android/issues/1371#issuecomment-961933826


   if I can maybe give more insight into this as I've run into the exact thing. seems to be an actual issue when upgrading from lower version of cordova-android, would a reproduction repo help? for now have to keep cordova-plugin-whitelist or our app just doesn't work anymore


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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-android] void-mAlex commented on issue #1371: cordova-plugin-whitelist gets removed but is actually required in v10

Posted by GitBox <gi...@apache.org>.
void-mAlex commented on issue #1371:
URL: https://github.com/apache/cordova-android/issues/1371#issuecomment-961933826


   if I can maybe give more insight into this as I've run into the exact thing. seems to be an actual issue when upgrading from lower version of cordova-android, would a reproduction repo help? for now have to keep cordova-plugin-whitelist or our app just doesn't work anymore


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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-android] jpduckwo closed issue #1371: cordova-plugin-whitelist gets removed but is actually required in v10

Posted by GitBox <gi...@apache.org>.
jpduckwo closed issue #1371:
URL: https://github.com/apache/cordova-android/issues/1371


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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-android] jpduckwo commented on issue #1371: cordova-plugin-whitelist gets removed but is actually required in v10

Posted by GitBox <gi...@apache.org>.
jpduckwo commented on issue #1371:
URL: https://github.com/apache/cordova-android/issues/1371#issuecomment-953706762


   Unsure what was happening, I don't think this is actually an issue


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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