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

iOS: Improve display of uncaught errors

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 9.0.0
    • Fix Version/s: Release 9.2.1
    • Component/s: iOS
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2020 Sprint 20

      Description

      The error display on iOS is currently a little confusing and prints unrelated follow up errors that shouldn't be displayed at all.

      A very simple error like this

      throw new Error('My simple error');
      

      results in the following error printed to the logs:

      [ERROR] Script Error {
      [ERROR]     column = 16;
      [ERROR]     line = 512;
      [ERROR]     message = "My simple error";
      [ERROR]     sourceURL = "file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/277C69FF-FFFF-43E3-BC8F-17B4D7B91E52/data/Containers/Bundle/Application/D76755F9-D059-418E-B8E5-BB666A380AE7/global-test-classic.app/app.js";
      [ERROR]     stack = "    at (/app.js:512:16)\n    at global code(/app.js:515:70)\n    at require@[native code]\n    at (/ti.main.js:13057:10)\n    at loadAsync(/ti.main.js:12985:13)\n    at global code(/ti.main.js:13054:10)";
      [ERROR]     toJSON = "<KrollCallback: 0x600000f5a980>";
      [ERROR] } 
      [ERROR] Script Error {
      [ERROR]     column = 10;
      [ERROR]     line = 13057;
      [ERROR]     message = "Module \"app.js\" failed to leave a valid exports object";
      [ERROR]     sourceURL = "file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/277C69FF-FFFF-43E3-BC8F-17B4D7B91E52/data/Containers/Bundle/Application/D76755F9-D059-418E-B8E5-BB666A380AE7/global-test-classic.app/ti.main.js";
      [ERROR]     stack = "    at require@[native code]\n    at (/ti.main.js:13057:10)\n    at loadAsync(/ti.main.js:12985:13)\n    at global code(/ti.main.js:13054:10)";
      [ERROR]     toJSON = "<KrollCallback: 0x600000f52580>";
      [ERROR] }
      

      It is not formatted at all and makes it hard to read the actual stack trace. Additionally, there is not one, but two errors shown, which is not correct.

      The follow up error "Module \"app.js\" failed to leave a valid exports object" should be ignored and not shown at all. This is especially problematic in the error modal that will be shown on the device, where the latter error will be shown first. A user has to explicitly close this modal to get to the original error.

        Attachments

          Activity

            People

            • Assignee:
              jvennemann Jan Vennemann
              Reporter:
              jvennemann Jan Vennemann
              Reviewer:
              Vijay Singh
              Tester:
              Satyam Sekhri
            • Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration