CocoonJS posting Ajax with data

  • Ashley, sorry. I think your first response will be to close this since this IS a CocoonJS bug and they should fix it. But I also remember there was the long standing AJAX issue with CocoonJS but you added the workaround that fixed it for many eager users. Since you're much more responsive I figured I would ask for your help first.

    I've included my node JS server paired down to the base functionality. If you want to me host it externally so you can test please let me know and I will.

    Link to .capx file (required!):

    dl.dropboxusercontent.com/u/5900779/Bug%20Reports/CoocoonJS%20Ajax.capx

    Node.js server included: dl.dropboxusercontent.com/u/5900779/Bug%20Reports/NodeJS_Server.zip

    Steps to reproduce:

    1. Start node.js server

    2. Start the capx in preview mode.

    3. Click the green square.

    Observed result:

    The text box remains as "Text".

    Only the "Starting..." message is seen in the console.

    Expected result:

    The text should change to the response from the server. In the case of my node.js server it would be. "You've sent the text: test"

    Possibly seeing the progress message in the console.

    Seeing the "Done!" message in the console.

    Browsers affected:

    Chrome: no

    Firefox: no

    Internet Explorer: Unable to test. I only have IE8 on this PC and I cannot upgrade. Sorry!

    Mobile Chrome on Android: no

    Opera: no

    Mobile Safari on iOS6: no

    Mobile Android browser:no

    CocoonJS:yes

    Operating system & service pack: Windows 7

    Construct 2 version: 139

    The strange things about this issue is if I set the data in the Ajax post to "" [sending no data] I am able to get a response in CocoonJS! I wonder if it's related to this error I also see in the console from Chrome 29.

    <img src="https://dl.dropboxusercontent.com/u/5900779/Bug%20Reports/2013-09-06_00h29_17.png" border="0" />

    I'm in a pinch. My nodeJS server is working and I have hosting with appfog/Openshift about ready[still comparing the two. :)]. I just have this error preventing me from pushing to the Play store and App store.

    Thank you for your help and let me know if ANY other information is needed!

  • I think it might be a mistake in the AJAX plugin. Try deleting that line (which calls setRequestHeader for Content-Length) and see if it works. I've removed that line for the next build; I've read the specification does not actually allow that header to be set.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Removing that line FIXED IT! Thanks man. :)

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