Jump to content

Uncaught SecurityError


clark
 Share

Recommended Posts

Hey! 

I know this is not directly related to Phaser.  However, here is the situation! 

We have a CDN and locally, we want to load from the CDN when doing Dev. When we do this we get this:

 

Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at blah.com/blah/blah/atlaspreloader.png may not be loaded.
 

 

I have seen in the past that on phaser and pixi's API is a crossOrigin property which is boolean. 

Can anyone explain what is happening here? We are unsure how to proceed.  Should this be a local thing, where, we need to disable some kind of browser (chrome) options for development.  Or is there something on the server side that must be done too?

Basically how do we work around this issue?

Thanks! :D

Clark.

Link to comment
Share on other sites

  • 7 months later...

I have a localhost server running just like You specified in getting started guide.

i simply try to fire up Your example Phaser game on localhost:

 

function preload() {    
    game.load.image('sky', 'assets/sky.png');
    game.load.image('ground', 'assets/platform.png');
    game.load.image('star', 'assets/star.png');
    game.load.spritesheet('dude', 'assets/dude.png', 32, 48);
}
 
And it throws :
Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///C:/xampp/htdocs/nodeapps/game/assets/sky.png may not be loaded.
 
What exactly do i have to do to test my own games locally ???
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...