You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2021/08/06 12:43:52 UTC

[GitHub] [cordova] krunalsk007 opened a new issue #297: Do you want live notifications when people reply to your posts? Enable Notifications Image not load in canvas after updadating to platform api 30 or cordova 10.0.1

krunalsk007 opened a new issue #297:
URL: https://github.com/apache/cordova/issues/297


   # Bug Report
   
   ## Problem
   
   
   
   ### What does actually happen?
   
   when i try to load image in canvas it will show this error
   Access to image at 'http://localhost/_app_file_/storage/emulated/0/Android/media/com.abc.xyz/1616587242F2.png' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. in index.html.
   
   I convert my url by this this.win.Ionic.WebView.convertFileSrc(imageUrl.toString()); but still i am facing this error. (it will convert file:// to http://localhost/_app_file_/...)
   
   **if i used this URL in image tag then its worked but in canvas i am gating error.**
   Note : i think this error occurs because cordova 10.0.1 remove whitelist plugin
   
   ## 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? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   Ionic:
   
      Ionic CLI          : 6.12.2 (C:\Users\ADMIN\AppData\Roaming\npm\node_modules\@ionic\cli)
      Ionic Framework    : ionic-angular 3.9.9
      @ionic/app-scripts : 3.2.4
   
   Cordova:
   
      Cordova CLI       : 10.0.0
      Cordova Platforms : android 10.0.0
      Cordova Plugins   : not available
   
   Utility:
   
      cordova-res                          : 0.15.3
      native-run (update available: 1.4.0) : 1.2.2
   
   System:
   
      Android SDK Tools : 26.1.1 (C:\Users\ADMIN\AppData\Local\Android\Sdk)
      NodeJS            : v14.15.1 (C:\Program Files\nodejs\node.exe)
      npm               : 6.14.8
      OS                : Windows 10
   


-- 
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: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] breautek commented on issue #297: Do you want live notifications when people reply to your posts? Enable Notifications Image not load in canvas after updadating to platform api 30 or cordova 10.0.1

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #297:
URL: https://github.com/apache/cordova/issues/297#issuecomment-894246060


   You're getting the error because you're mixing protocols. E.g. your app is configured to use the scheme `https` but you're attempting to load a `http` url (instead of `https)`, thus you're making a cross origin request.
   
   Try converting the url from http url to https.
   
   Alternatively you can read the `file://` url using the `cordova-plugin-file` plugin to get the `Blob` type and create an [object url](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL).
   
   I'm closing this issue because CORS is a browser security feature with no API for us to disable it, so our only option work around it. The above should suffice. If you require any more assistance, I'll invite you to join our [Slack community](http://slack.cordova.io/).
   
   Kind regards,
   Norman


-- 
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: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] krunalsk007 commented on issue #297: Do you want live notifications when people reply to your posts? Enable Notifications Image not load in canvas after updadating to platform api 30 or cordova 10.0.1

Posted by GitBox <gi...@apache.org>.
krunalsk007 commented on issue #297:
URL: https://github.com/apache/cordova/issues/297#issuecomment-894613485


   thanks for rely but this problem is solved by this 
   `<preference name="AndroidInsecureFileModeEnabled" value="true" />` which is decribe [here ](https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html)by cordova team but i cant understand.


-- 
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: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] krunalsk007 edited a comment on issue #297: Do you want live notifications when people reply to your posts? Enable Notifications Image not load in canvas after updadating to platform api 30 or cordova 10.0.1

Posted by GitBox <gi...@apache.org>.
krunalsk007 edited a comment on issue #297:
URL: https://github.com/apache/cordova/issues/297#issuecomment-894613485


   thanks for reply @breautek  but this problem is solved by this 
   `<preference name="AndroidInsecureFileModeEnabled" value="true" />` which is decribe [here ](https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html)by cordova team but i cant understand.


-- 
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: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] breautek closed issue #297: Do you want live notifications when people reply to your posts? Enable Notifications Image not load in canvas after updadating to platform api 30 or cordova 10.0.1

Posted by GitBox <gi...@apache.org>.
breautek closed issue #297:
URL: https://github.com/apache/cordova/issues/297


   


-- 
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: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org