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

IE9 SCRIPT10: The data necessary to complete this operation is not yet available. #1116

Closed
clark-stevenson opened this issue Aug 19, 2014 · 7 comments

Comments

@clark-stevenson
Copy link
Contributor

We are having some difficulty with getting IE9 and Phaser (2.0.5 or 2.0.7) to work together.

The first thing that phaser tries to do on boot is load a config.json file which has been encoded in utf8 without bom. (According to Charles). I am positive the encoding is correct because I also have a profile.json which is loaded (outside of phaser) which looks the same and works.

The error I get with Phaser loading this JSON file is this:

Phaser v2.0.7 | Pixi.js v1.6.1 | Canvas | HTML Audio | http://phaser.io
SCRIPT10: The data necessary to complete this operation is not yet available.

Do you have any idea what causes this?

See my forum post for more information http://www.html5gamedevs.com/topic/8580-ie9-loading-json/

@photonstorm
Copy link
Collaborator

Email me your json file and I'll take a look.

On Tuesday, August 19, 2014, clark-stevenson notifications@github.com
wrote:

We are having some difficulty with getting IE9 and Phaser (2.0.5 or 2.0.7)
to work together.

The first thing that phaser tries to do on boot is load a config.json file
which has been encoded in utf8 without bom. (According to Charles). I am
positive the encoding is correct because I also have a profile.json which
is loaded (outside of phaser) which looks the same and works.

The error I get with Phaser loading this JSON file is this:

Phaser v2.0.7 | Pixi.js v1.6.1 | Canvas | HTML Audio | http://phaser.io
SCRIPT10: The data necessary to complete this operation is not yet
available.

Do you have any idea what causes this?

See my forum post for more information
http://www.html5gamedevs.com/topic/8580-ie9-loading-json/


Reply to this email directly or view it on GitHub
#1116.

Photon Storm Ltd.
http://www.photonstorm.com

Skype: richard.davey
Twitter: @photonstorm

Registered in England and Wales.
Company ID: 8036404
VAT Number: 136 4333 27

@clark-stevenson
Copy link
Contributor Author

Hey Rich thanks 👍

So outside of phaser, I load data from this URL for example which was made by hand.

http://dev.cdn.drimgames.com/games/library/profiles/nc/lang/en.json

I use XMLHttpRequest and I check for the onreadystatechange. request.readyState == 4.

This works well across the browsers I tried it on so far, crucially bloody ie9

At the point at which phaser boots, the first thing it does is attempt to load a config file from here

http://dev.cdn.drimgames.com/games/quiz/release/data/test2/config.json

That is where the script10 appears.

@photonstorm
Copy link
Collaborator

In Loader.js there is a conditional that uses XDomainRequest for IE9
specifically. I would suggest commenting it out and rebuilding and test
that. I'm back next week so can look in more detail then but it may work in
the meantime.

Cheers,

Rich

On Thursday, August 21, 2014, clark-stevenson notifications@github.com
wrote:

Hey Rich thanks [image: 👍]

So outside of phaser, I load data from this URL for example which was made
by hand.

http://dev.cdn.drimgames.com/games/library/profiles/nc/lang/en.json

I use XMLHttpRequest and I check for the onreadystatechange.
request.readyState == 4.

This works well across the browsers I tried it on so far, crucially bloody
ie9

At the point at which phaser boots, the first thing it does is attempt to
load a config file from here

http://dev.cdn.drimgames.com/games/quiz/release/data/test2/config.json

That is where the script10 appears.


Reply to this email directly or view it on GitHub
#1116 (comment).

Photon Storm Ltd.
http://www.photonstorm.com

Skype: richard.davey
Twitter: @photonstorm

Registered in England and Wales.
Company ID: 8036404
VAT Number: 136 4333 27

@clark-stevenson
Copy link
Contributor Author

Ah I never knew you were away mate, no worries! Thanks for taking a look, I will play with that loader and report back.

@clark-stevenson
Copy link
Contributor Author

Thanks for the heads up on this Rich.

Getting rid of that whole XDomainRequest solves the loading error. However, I am not really comfortable making a pull request. Before I wrote this ticket, I read that XDomainRequest specifically exists to allow cross domain scripting which IE does not natively support with XHR.

We do not yet have a test case where we have the game running on an IFrame from a different domain. I will try to get one setup and test but I am away myself for a couple of weeks so there might be a delay.

@photonstorm
Copy link
Collaborator

Don't do a PR with it removed, just use as a local fix for now and I'll add
an option to skip the use of it entirely as a Loader setting.

Photon Storm Ltd.
http://www.photonstorm.com

Skype: richard.davey
Twitter: @photonstorm

Registered in England and Wales.
Company ID: 8036404
VAT Number: 136 4333 27

@clark-stevenson
Copy link
Contributor Author

Sounds good! Cheers for your help on this. 💃

photonstorm added a commit that referenced this issue Aug 28, 2014
…lse`) it will use XDomainRequest when loading JSON files instead of xhr. In rare IE edge-cases this may be required. You'll know if you need it (#1131 #1116)
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

2 participants