Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27465] CLI: Fails to build app when including ti.superagent commonjs module

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2019-10-30T18:01:29.000+0000
Affected Version/sn/a
Fix Version/snode-titanium-sdk 3.2.2, Release 8.3.0
ComponentsCLI
LabelsengSchedule
ReporterJoshua Quick
AssigneeChristopher Williams
Created2019-10-11T12:54:43.000+0000
Updated2019-10-30T18:01:29.000+0000

Description

When including ti.superagent commons module in a project with SDK 8.2.1 and CLI 7.1.1, it reports a failure during app build:
[INFO]  Processing JavaScript files
(node:6745) UnhandledPromiseRejectionWarning: TypeError: trace_error.stack[1].getFunctionName is not a function
    at process.emitWarning (internal/process/warning.js:146:18)
    at showFlaggedDeprecation (buffer.js:159:11)
    at new Buffer (buffer.js:174:3)
    at Array.<anonymous> (/Users/jquick2/.appcelerator/install/7.1.1/package/node_modules/source-map-support/source-map-support.js:149:21)
    at /Users/jquick2/.appcelerator/install/7.1.1/package/node_modules/source-map-support/source-map-support.js:53:24
    at mapSourcePosition (/Users/jquick2/.appcelerator/install/7.1.1/package/node_modules/source-map-support/source-map-support.js:171:21)
    at Object.wrapCallSite (/Users/jquick2/.appcelerator/install/7.1.1/package/node_modules/source-map-support/source-map-support.js:343:20)
(node:6745) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:6745) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Comments

  1. Christopher Williams 2019-10-11

    This is a result of the single JS file in that module having a sourceMappingURL comment at the end of the file pointing at a mapping file not included in the module. node-titanium-sdk does not properly handle when the sourceMappingURL points at an invalid file (i.e. it doesn't exist or fails to load as JSON).
  2. Christopher Williams 2019-10-11

    https://github.com/appcelerator/node-titanium-sdk/pull/123
  3. Ewan Harris 2019-10-11

    node-titanium-sdk PR merged, needs bumped in the SDK
  4. Christopher Williams 2019-10-11

    SDK PR: https://github.com/appcelerator/titanium_mobile/pull/11276
  5. Ewan Harris 2019-10-14

    To test: Must be a classic project, ti.superagent can be got from the zip at https://github.com/appcelerator-modules/ti.superagent/releases/tag/v0.1.0. Extract the project and add it to the Resources directory of a classic app and then build the app
  6. Satyam Sekhri 2019-10-14

    FR Passed. The app with ti.superagent module build successfully on android and iOS. Waiting on Jenkins build
  7. Christopher Williams 2019-10-21

    merged to master
  8. Satyam Sekhri 2019-10-30

    Verified On: Mac OS: 10.14.5 SDK: 8.3.0.v20191030085531 Appc CLI: 7.1.1 JDK: 1.8.0_162 Node: 10.5.0 Studio: 5.1.4.201909061933 Xcode: 11.1

JSON Source