{ "id": "171349", "key": "TIMOB-25883", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-05-01T13:38:07.000+0000", "created": "2018-03-19T18:42:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "async.js", "hyperloop", "ios" ], "versions": [ { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" }, { "id": "19975", "name": "Hyperloop 3.1.0", "archived": false, "released": true } ], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2018-07-11T22:43:39.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "(Only seen on iOS)\r\n\r\nWhen trying to build our hyperloop-examples sample app, the {{Callback was already called.}} error is thrown. It seems to be an issue thrown from the {{async}} library we use. There are [reports|https://stackoverflow.com/a/27521528/5537752] that see this happening when errors are not guarded inside parallel callback flows, so thats where we need to dig into it. \r\n\r\n*EDIT*:\r\nHere is a log:\r\n{code}\r\n[DEBUG] Copying and minifying /Users/hknoechel/Documents/Apps/hyperloop-examples/Resources/iphone/alloy/controllers/BaseController.js => /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/BaseController.js\r\n[TRACE] Checking require for: /alloy\r\n[TRACE] Checking import for: uikit/uialertcontroller\r\n[TRACE] Checking import for: uikit/uialertaction\r\n[TRACE] Checking import for: uikit/uikit\r\n[TRACE] Checking import for: titanium/tiapp\r\n[DEBUG] Writing /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/alert.js\r\n[DEBUG] Copying and minifying /Users/hknoechel/Documents/Apps/hyperloop-examples/Resources/iphone/alloy/controllers/alert.js => /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/alert.js\r\n[TRACE] Checking require for: /alloy\r\n[TRACE] Checking import for: uikit/uiview\r\n[TRACE] Checking import for: uikit/uicolor\r\n[TRACE] Checking import for: coregraphics/coregraphics\r\n[DEBUG] Writing /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/animateview.js\r\n[DEBUG] Copying and minifying /Users/hknoechel/Documents/Apps/hyperloop-examples/Resources/iphone/alloy/controllers/animateview.js => /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/animateview.js\r\n[TRACE] Checking require for: /alloy\r\n[TRACE] Checking import for: uikit/uilabel\r\n[TRACE] Checking import for: uikit/uicolor\r\n[TRACE] Checking import for: uikit/uiscreen\r\n[TRACE] Checking import for: uikit/uiview\r\n[TRACE] Checking import for: uikit/nslayoutconstraint\r\n[TRACE] Checking import for: uikit/uikit\r\n[DEBUG] Writing /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/autolayout.js\r\n[DEBUG] Copying and minifying /Users/hknoechel/Documents/Apps/hyperloop-examples/Resources/iphone/alloy/controllers/autolayout.js => /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/autolayout.js\r\n[TRACE] Checking require for: /alloy\r\n[TRACE] Checking import for: corelocation/clbeaconregion\r\n[TRACE] Checking import for: corelocation/cllocationmanager\r\n[TRACE] Checking import for: corelocation/corelocation\r\n[TRACE] Checking import for: uikit/uiapplication\r\n[TRACE] Checking import for: uikit/uilocalnotification\r\n[TRACE] Checking import for: foundation/nsuuid\r\n[TRACE] Checking require for: subclasses/locationmanagerdelegate\r\n[DEBUG] Writing /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/beacons.js\r\n[DEBUG] Copying and minifying /Users/hknoechel/Documents/Apps/hyperloop-examples/Resources/iphone/alloy/controllers/beacons.js => /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/beacons.js\r\n[TRACE] Checking require for: /alloy\r\n[TRACE] Checking import for: uikit/uiview\r\n[TRACE] Checking import for: uikit/uicolor\r\n[TRACE] Checking import for: uikit/uiblureffect\r\n[TRACE] Checking import for: uikit/uivisualeffectview\r\n[TRACE] Checking import for: uikit/uikit\r\n[TRACE] Checking import for: coregraphics/coregraphics\r\n[DEBUG] Writing /Users/hknoechel/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/alloy/controllers/blur.js\r\n[ERROR] Callback was already called.\r\n{code}\r\nI looks like a race condition between our build-hooks and only seems to happen with the 3.1.0 build from the [Hyperloop ES6 PR|https://github.com/appcelerator/hyperloop.next/pull/270] so far, so it may be related.\r\n\r\n*Update*! It seems to be caused by a {{const}} vs. {{let}} issue! I remember the compiler detects that different, so maybe its handled different when being used in Hyperloop code? Maybe we need to return somewhere in order to handle the error in a different layer. Lowing the priority ...\r\n\r\nExample:\r\n{code:js}\r\nconst screenRect = UIScreen.mainScreen.bounds;\r\nscreenRect = CGRectMake(0, 0, UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height - 64);\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "\"Callback was already called.\" error thrown when source contains syntax error and transpiling", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Hyperloop 3.1.0\r\niOS 11\r\nExample: \"HTTP Request\"", "comment": { "comments": [ { "id": "436046", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/9969", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-03-28T18:45:02.000+0000", "updated": "2018-03-28T18:45:02.000+0000" }, { "id": "439136", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Test-Case:\r\n1. Create new app\r\n2. Add the following at the top (or anywhere else) in your code: \r\n{code:js}\r\nconst a = 1;\r\na = 2;\r\n{code}\r\nExpected behavior: The build should fail with the error: \"a\" is read-only.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-11T19:21:36.000+0000", "updated": "2018-07-11T19:21:36.000+0000" }, { "id": "439144", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed and changes are in SDKs 7.3.0.v20180711122153 & 7.4.0.v20180711095209", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-07-11T22:43:39.000+0000", "updated": "2018-07-11T22:43:39.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }