Steps to reproduce:
1. Create an app for windows & replace the app.js with the code below:
var c = Ti.Network.createHTTPClient();
Ti.API.info('HTTP : ' + JSON.stringify(c));
c.onload = function () {
Ti.API.info('Data: + ' + this.responseText);
};
c.open('GET', "http://www.appcelerator.com/");
c.onerror = function (e) {
Ti.API.info('Error: ' + JSON.stringify(e));
};
Ti.API.info('URL: ' + url);
c.send();
Ti.API.info('HTTP : ' + JSON.stringify(c));
2. Build for windows emulator.
Actual Results:
1. We get exception:
[ERROR] : Application Error: {
[ERROR] : "message": "Error while require(./app) invalid document source",
[ERROR] : "native_stack": [
[ERROR] : "JSExportClass<class Titanium::GlobalObject>::CallNamedFunction"
[ERROR] : ],
[ERROR] : "stack": "require@[native code]\nglobal code",
[ERROR] : "line": 2
[ERROR] : }
2. Attached is the screenshot of the on device exception error.
Expected Resut:
1. We should not get any exceptions using JSON.stringify
This issue will be fixed when TIMOB-19181 is resolved.
For comparison's sake, here's what we get for iOS:
The first is after creating an httpclient, the second is after the open and send function calls.
https://github.com/appcelerator/titanium_mobile_windows/pull/387
Verified the fix. Closing. Environment: Appc Studio: 5.0.0.v20150819140421 Ti SDK: 5.0.0.v20150820100424 Ti CLI: 4.1.4 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.2.0-1 APPC CLI: 5.0.0-8 Node : v0.10.37 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1