Project: titanium
Issue TIMOB-19183: Window: JSON.stringify throws “invalid document source” exception when you dump Titanium proxy
h5. Steps to reproduce: 1. Create an app for windows & replace the app.js with the code below: {code} 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)); {code} 2. Build for windows emulator. h5.Actual Results: 1. We get exception: {code} [ERROR] : Application Error: { [ERROR] : "message": "Error while require(./app) invalid document source", [ERROR] : "native_stack": [ [ERROR] : "JSExportClass::CallNamedFunction" [ERROR] : ], [ERROR] : "stack": "require@[native code]\nglobal code", [ERROR] : "line": 2 [ERROR] : } {code} 2. Attached is the screenshot of the on device exception error. h5.Expected Resut: 1. We should not get any exceptions using JSON.stringify
Story points: 3