oracle / cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
Universal Permissive License v1.0
138 stars 118 forks source link

Cross-origin error from canvas.ctx.getImageData() #47

Closed shubckin closed 3 years ago

shubckin commented 5 years ago

When i call method getImageData from canvas, i get error: "Unable to get image data from canvas because the canvas has been tainted by cross-origin data". Example to reproduce this error: function testCanvas(src) { var canvas = document.createElement("canvas"); var img = new Image(); img.addEventListener("load", function () { canvas.getContext("2d").drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height); canvas.getContext("2d").getImageData(0,0,img.width, img.height); canvas.toDataURL(); }); img.setAttribute("src", src); }

manish2788 commented 4 years ago

@shubckin We will analyse the reported the issue and get back to you.

ragcsalo commented 4 years ago

I have the same problem.... also all my Javascript files that are included in the main index.html are treated as cross-origin resources, therefore I get no detailed Javascript errors.

I hope there will be a solution for all this nightmare soon. :-)

manish2788 commented 4 years ago

@ragcsalo We are looking into the issue. Will update you by next week.

manish2788 commented 4 years ago

@shubckin I am not able to reproduce the issue. Can you please verify the same using latest version of plugin.