hansemannn / titanium-firebase

🔥 Use the Firebase SDK in Titanium
60 stars 6 forks source link

Getting an exception : ERR_INVALID_CALLBACK #8

Closed qlzqlzqlz closed 5 years ago

qlzqlzqlz commented 5 years ago

Trying to run the firebase core module with the following code: var core = require('firebase.core');

core.configure({ GCMSenderID: '123123123123123', googleAppID: '1:11111111:android:1111111111', // Sending actual IDs here });

But it throws an exception, trace as follows: 2019-01-28T14:13:42.566Z | ERROR | Callback must be a function 2019-01-28T14:13:42.566Z | TRACE | TypeError [ERR_INVALID_CALLBACK]: Callback must be a function at maybeCallback (fs.js:129:9) at Object.exists (fs.js:197:3) at SimpleFileCache.persist (/Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/android/cli/hooks/aar-transform.js:484:11) at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/android/cli/hooks/aar-transform.js:379:9 at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:460:16 at replenish (/Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:977:25) at iterateeCallback (/Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:967:17) at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:944:16 at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/android/cli/hooks/aar-transform.js:356:12 at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:460:16 at nextTask (/Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:5197:29) at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:5204:13 at apply (/Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:21:25) at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:56:12 at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/async/dist/async.js:944:16 at updateBuilderWithTransformResult (/Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/android/cli/hooks/aar-transform.js:352:5)

at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/extract-zip-fork/index.js:26:15
at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/yauzl/index.js:32:7
at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/yauzl/index.js:123:16
at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/yauzl/index.js:473:5
at /Users/test/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA/node_modules/fd-slicer/index.js:32:7
at FSReqWrap.wrapper [as oncomplete] (fs.js:463:17)

Configuration of the project as follows: Node : 10.15.0 Titanium SDK: 7.4.2 Appcelerator v 5.0.14 Using firebase.core v 3.0.2 and ti.playservices v11.0.40

hansemannn commented 5 years ago

That rather sounds like a build time Titanium issue than a module issue. Maybe try to downgrade your Node version to 9.x or use 7.5.0+ with the module.

qlzqlzqlz commented 5 years ago

Hi, Upgrading to Titanium 7.5.0 has fixed this issue, Thanks.