ozRocker Posted November 24, 2016 Share Posted November 24, 2016 I'm getting a bunch of these errors with babylon 2.3, 2.4 and 2.4 preview on iOS 10 Safari [Error] IndexSizeError (DOM Exception 1): The index is not in the allowed range. drawImage (babylon.2.3.core.js:4:16784) (anonymous function) (babylon.2.3.core.js:4:16784) o (babylon.2.3.core.js:3:23232) y (babylon.2.3.core.js:4:16330) onerror (babylon.2.3.core.js:3:8265) [Error] BJS - [19:23:18]: Error while trying to load texture: 3D/diffuse_sml.jpg _ErrorEnabled (babylon.2.3.core.js:3:14459) onerror (babylon.2.3.core.js:3:4384) [Error] Cross-origin image load denied by Cross-Origin Resource Sharing policy. onerror (babylon.2.3.core.js:3:4450) You can see them pop up here www.punkoffice.com/dizingof The result is that my mesh does not show. I don't know why its complaining about cross-origin because the image and mesh are all on the same domain. Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 27, 2016 Share Posted November 27, 2016 If you have full access (and mod_headers is turned on in apache), you can add this line to the .htaccess file: Header set Access-Control-Allow-Origin "*" Quote Link to comment Share on other sites More sharing options...
ozRocker Posted November 27, 2016 Author Share Posted November 27, 2016 1 hour ago, BitOfGold said: If you have full access (and mod_headers is turned on in apache), you can add this line to the .htaccess file: Header set Access-Control-Allow-Origin "*" That did fix it. Thank you! I think its strange how it worked before. Also, all my paths are relative (on same domain) which is why I'm confused. I get Safari crashing and restarting still with some other websites but I don't think is a babylon.js problem. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted November 29, 2016 Author Share Posted November 29, 2016 So would anyone know why suddenly we need to enable CORS even within the same domain? Enabling CORS in the .htaccess is a workaround but it makes things less secure Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted November 29, 2016 Share Posted November 29, 2016 6 minutes ago, ozRocker said: So would anyone know why suddenly we need to enable CORS even within the same domain? Enabling CORS in the .htaccess is a workaround but it makes things less secure r u have diffrent subdomain? Quote Link to comment Share on other sites More sharing options...
ozRocker Posted November 29, 2016 Author Share Posted November 29, 2016 3 minutes ago, NasimiAsl said: r u have diffrent subdomain? Nope, its the same domain. Everything is using relative path Quote Link to comment Share on other sites More sharing options...
ozRocker Posted November 30, 2016 Author Share Posted November 30, 2016 well this is strange (or I'm going crazy). I removed the .htaccess files to recreate the problem...and there was no problem. It stopped complaining about cross-domain files. I thought it could be cached but I was refreshing from the browser console. I haven't changed any code or server configs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.