Arrays not downloading as JSON files in IE11

0 favourites
  • 6 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Problem Description

    Arrays aren't downloading as JSON files in Internet Explorer 11. All other browsers (tested) will download the JSON file normally.

    Attach a Capx(and attached to this post)

    Description of Capx

    This .capx file is part of a Question Generator which I'm having teachers use to create item banks for assessments.

    Steps to Reproduce Bug

    • Run the .capx file
    • Enter Data in all the fields and hit save (you'll get an error indicating what isn't filled out if something is missed)
    • Tap/Click "Download Question-Pool File"
    • Witness error.

    Observed Result

    Internet Explorer 10 and 11 reply by placing the JSON file into the address bar with a variety of HTML characters (like %, etc...) rather than prompting to download the file.

    Expected Result

    To be prompted to download the JSON file; which happens normally in Firefox and Chrome.

    Affected Browsers

    • Chrome: NO
    • FireFox: NO
    • Internet Explorer (10 and 11): YES

    Operating System and Service Pack

    Win 8.1 Enterprise 64bit (AND Windows 7 SP1 64bit)

    Construct 2 Version ID

    Release 178 (64-bit)

    Troubleshooting Performed and additional information:

    I attempted testing in two environments, the Windows 8.1 with IE11, Chrome, Firefox and Win7 with IE10, Chrome and Firefox. Only IE responds this way which infers that it might be some setting in IE but I've been unlucky at finding anything (actually, my searches have shown people complaining of the opposite: that IE prompts them to download when they want to view the file). Additionally, I reset the browsers to default to try to rule out any odd settings.

    If you're looking at the .capx, the button "Download Question-Pool File" is called "btnDownloadPool" and the code on the event sheet can be found under the group "Button Controls", where the btnDownloadPool "On Clicked" tells the array arrMasterList to "Download as JSON data with filename "questionPool.json".

    Also, this is my first forum post (though I've used the forums much in solving issues before, it's a great resource) so be gentle!

  • The saddest part of this for me is that I *have* to use Internet Explorer because that's what our students and teachers definitely have... [sigh]

  • In the mean time, does the use of the browser object combined with invoke download of string can do the job for you? (Just suggesting so you are not trapped until this get fixed)

  • Interesting, I've never exported JSON from C2, though I am a regular user of IE11. So to simplify your query, the problem line is...

    function 15: "download as JSON data with filename "questionPool.json"

    so I ran your capx and the file I was asked to download was the following. So I hate looking and converting all of this crap to normal text, but to me it seems like this is the correct json file but IE11 is trying to open it with an app, and when it can't, it's trying to parse it as a weblink and failing. If I configured an app to view this, I think it'd behave the same as FIREFOX. Chrome and Firefox see this and interpret it as json and hence you don't see the headers as they strip them out. So I suspect if you could get rid of all the hex encoded text you'd get the file that you wanted.

    JSON is built in IE11 but apparently there are some issues on how the file is configured to ensure it is handled correctly. So it is an issue with IE11 and not C2, and there are fixes for IE11 for this available or so a quick google search suggests.

    you wanted to get


    and you got


  • Closing, this is not a bug, it's just IE does not support invoking downloads. For the feature to work the browser needs to support the anchor 'download' attribute. Check browser support here. We have a fallback that tries to open a data URL in a new window in order to achieve the same effect, but IE doesn't support that either.

    BTW please always follow the bug report guidelines; you have 97 events, the vast majority of which are unrelated to the actual problem. If the issue wasn't obvious like it was here, I'd have simply closed it without investigation and asked for a minimal example as per the guidelines in order to prove it's not caused by your own events.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Aphrodite, rho and Ashley, I'd like to thank you for the replies. Since this was my first report of something I thought was wrong, you guys were great.

    Ashley, I will do that in the future and thanks for investigating anyway. rho and Aphrodite, I appreciate the suggested work around and the very spot on description of the issue I encountered.

    Everything I've seen in the Construct 2 community has been great and I look forward to trying to contribute something rather than just taking in the knowledge of others.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)