weareu opened a new issue #512:
URL: https://github.com/apache/cordova-plugin-file/issues/512


   # Bug Report
   Cordova 10 Android Template Serves via Https so cvdfile: webview access also 
no longer works here. So upgrading to Android 10 template for cordova you can 
no longer access assets via cvdfile protocol urls still provided by the file 
plugin. This was previously a  issue with web server based plugins like 
ionic-cordova-webview and others. But now it is a issue for the standard 
cordova template.
   
   ## Problem
   Whilst File access remains for our logging, html/browser access via cvdfile 
is broken. I've seen some attempts here to change from cvdfile protocol but all 
unsuccessfully merged. Keeping this protocol breaks in Android 10 template, has 
already caused endless issues with webview plugin and ios removal. Causes CORS 
issues, etc etc. I know the previous attempts changed the host. This would be 
wrong due to CORS, but that is a silly excuse to just do nothing. This plugin 
is basically one for the cornerstone cordova plugins that crosses the bridge 
for developing non-native/native. Hacky solutions claiming all access should 
now be javascript is wrong. 
   
   Best solution would be to become compatible with AndroidX and change the 
file path (if template > 10) to utilize a "virtual folder" for cvd access. It's 
not breaking any rules if the access is served via the current hosting 
mechanisms (wether ionic-webview OR Android Template > 10 without enabling 
legacy file mode). 
   
   I'm going to make this change and pull. Please assist with suggestions.
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   To reproduce. Upgrade Cordova Android > 10. Access assets via cvdfile://.... 
either by requesting valid url from toNativeURL or toInternalURL. Neither can 
render either as file: or cvdfile: because you are comming from https.
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   Android Cordova 10 template. Android 11 or below.
   
   
   ### 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.18.1 
(/Users/weareu/.nvm/versions/node/v16.13.1/lib/node_modules/@ionic/cli)
      Ionic Framework   : ionic1 1.3.5
      @ionic/v1-toolkit : 3.2.15
   
   Cordova:
   
      Cordova CLI       : 11.0.0
      Cordova Platforms : android 10.1.1, ios 5.1.1
      Cordova Plugins   : no whitelisted plugins (41 plugins total)
   
   System:
   
      Android SDK Tools : 26.0.1 (/Users/weareu/Library/Android/sdk)
      ios-deploy        : 1.11.4
      ios-sim           : 8.0.2
      NodeJS            : v16.13.1 
(/Users/weareu/.nvm/versions/node/v16.13.1/bin/node)
      npm               : 7.24.2
      OS                : macOS Monterey
      Xcode             : Xcode 13.2.1 Build version 13C100
   
   
   ## 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: [email protected]

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