Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26080] Android: ERR_INVALID_CALLBACK error when building a app/module on Node 10

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-08-24T17:26:12.000+0000
Affected Version/sRelease 7.1.1, Release 7.3.0, Release 7.2.0
Fix Version/sRelease 7.5.0
ComponentsAndroid, CLI
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2018-05-31T09:38:54.000+0000
Updated2018-08-24T17:26:15.000+0000

Description

Description

Building an app or module with Node 10 throws the following error
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:157:9)
    at Object.fs.exists (fs.js:235:3)
    at SimpleFileCache.persist (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/android/cli/hooks/aar-transform.js:484:11)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/android/cli/hooks/aar-transform.js:379:9
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/async/dist/async.js:460:16
    at replenish (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/async/dist/async.js:977:25)
    at iterateeCallback (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/async/dist/async.js:967:17)
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/async/dist/async.js:944:16
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/android/cli/hooks/aar-transform.js:356:12
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/async/dist/async.js:460:16
---------------------------------------------
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/extract-zip-fork/index.js:26:15
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/yauzl/index.js:32:7
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/yauzl/index.js:123:16
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/yauzl/index.js:473:5
    at /Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.v20180528150435/node_modules/fd-slicer/index.js:32:7

Steps to reproduce

1. Download Node 10 2. Build a module or an app

Actual

Above error

Expected

No error should occur

Comments

  1. Hans Knöchel 2018-05-31

    cc [~jvennemann], it seems to be in your AAR-transformer.
  2. Ewan Harris 2018-05-31

    It's an easy fix, just an accidental use of a non-sync method. I'll be making a PR later with TIMOB-26081
  3. Ewan Harris 2018-06-05

    PR: https://github.com/appcelerator/titanium_mobile/pull/10090
  4. Josh Longton 2018-08-14

    *Closing ticket.* The error shown above and the deprecated warnings are no longer present. The fix is present in SDK: {noformat} 7.4.0.v20180810061237 {noformat} *ENV* {noformat} Appc NPM: 4.2.13 Appc CLI: 7.0.4 Ti CLI: 5.1.1 Node: 10.3.0 NPM: 6.3.0 {noformat}

JSON Source