Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Exception #5

Open
MaximeWillinger opened this issue Aug 3, 2014 · 4 comments
Open

Security Exception #5

MaximeWillinger opened this issue Aug 3, 2014 · 4 comments

Comments

@MaximeWillinger
Copy link

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 ?

@olsn
Copy link
Owner

olsn commented Aug 6, 2014

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.

@MaximeWillinger
Copy link
Author

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

@legendtang
Copy link

Obviously this can be reproduced on latest Chrome stable on PC

@olsn
Copy link
Owner

olsn commented Sep 14, 2015

@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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants