6

Hello my problem is to develop phonegap application in HTML5 with the Visual Studio tools for apache cordova https://www.visualstudio.com/en-us/features/cordova-vs.aspx the error write when I debug application is

Ripple :: Environment Warming Up (Tea. Earl Gray. Hot.) ripple.js (37,13099)

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.> ripple.js (50,28958)

Failed to load resource: the server responded with a status of 404 (Not Found) ripple.js

thank you for the help

Colin
  • 22,328
  • 17
  • 103
  • 197
onzulin
  • 61
  • 1
  • 1
  • 2
  • any source code? not enough information! – Kenneth Li May 16 '15 at 01:13
  • Seems the issue is more related to the emulator. See if you will get the same error when debugging a fresh new cordova project. Did you run into issue if you select an emulator other than Ripple? – Alan Yao - MSFT May 17 '15 at 03:16

3 Answers3

4

May be part of the answer: For the second error (not found 404), what worked for me is to copy config.xml to the root path (where your source code is).

For the first error (synchronous XMLHttpRequest, which is not important for the emulating process, but you may want to see a "clear" console log) just edit ripple.js

[MAIN_DRIVE]:\Users\[YOUR_USER]\AppData\Roaming\npm\node_modules\ripple-emulator\pkg\hosted

In the line that the emulator complains about, look for the xhr request. Change

xmlHttp.open("GET", utils.appLocation() + fileName, false);

to

xmlHttp.open("GET", utils.appLocation() + fileName, true);

and you are done, Hope this helps. These errors are not related by the way.

Emil Laine
  • 41,598
  • 9
  • 101
  • 157
Puma
  • 126
  • 5
  • Your first tip worked for me (vote up :)), but I don't know where to edit the ripple.js file. I found it at the location C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac ,but inside the file there is no "xmlHttp.open(..." – Bjoerg Aug 16 '15 at 11:30
  • 1
    Found the file at [MAIN_DRIVE]:\Users\[YOUR_USER]\AppData\Roaming\npm\node_modules\vs-tac\node_modules\ripple-emulator\pkg\hosted -> edit answer – Bjoerg Aug 16 '15 at 11:54
1

This solution worked for me in the two cases. Seems to be OK.

By the way: 'the root path (where your source code is)' : the www folder of the project in VS2015

And the ripple.js file found in: always for VS2015 as Bjoerg.

Adrian
  • 11
  • 1
0

I was getting a similar error because my npm version was at 3.3.6 which apparantly has some kind of bug in it. Updating node and npm fixed it for me:

npm install npm@3.3.7 -g

I've updated node by simply downloading and installing the latest version from nodejs.org.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Jasper
  • 1,697
  • 2
  • 23
  • 48