Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19183

Window: JSON.stringify throws “invalid document source” exception when you dump Titanium proxy

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 4.1.0
    • Fix Version/s: Release 5.0.0
    • Component/s: Windows
    • Labels:
    • Environment:
    • Story Points:
      3
    • Sprint:
      2015 Sprint 15 Windows

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi (Inactive)
                Reporter:
                lchoudhary Lokesh Choudhary
                Reviewer:
                Christopher Williams
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20114
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration