Collision-Detection-for-EaselJS icon indicating copy to clipboard operation
Collision-Detection-for-EaselJS copied to clipboard

Security Exception

Open MaximeWillinger opened this issue 10 years ago • 4 comments

I got this strange error when I'm running collisions on an iPhone. I'm using images files that are in the same folder ...

SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent. in collision.js at line 156

Any idea ?

MaximeWillinger avatar Aug 03 '14 11:08 MaximeWillinger

This is most likely raised by getImageData - Can you tell in what environment your are running the app? I know some cases from iOS5 + Phonegap, but those should not appear any more. (Unless that is your platform + environment) For phonegap there is an access-atribute that you can set, but that'd be just speculation right now, without knowing your System/Environment information.

olsn avatar Aug 06 '14 21:08 olsn

I encountered this error on an iPhone, using Phonegap. After several hours of research I have isolated the problem. The error occurs with SVG, but not with PNG ...

MaximeWillinger avatar Aug 06 '14 21:08 MaximeWillinger

Obviously this can be reproduced on latest Chrome stable on PC

legendtang avatar Sep 09 '15 09:09 legendtang

@legendtang did it occure before, or just with the latest Chrome? Usually this is when the images are loaded from a different host, this is for security reasons. In some setups this might also appear when developing on localhost. I have the latest Chrome(45) installed and it works fine here, you can check this link for the live-example: http://indiegamr.com/easeljs-pixel-perfect-collision-detection-for-bitmaps-with-alpha-threshold/

olsn avatar Sep 14 '15 07:09 olsn