Meteor 1.5.2 stuck with old Cordova 4.4 deprecated API calls


#1

I’m on Xcode 8.3.3 with OS X 10.12.6

Fresh install of meteor 15.2.

I followed the tutorial with angular up to the point of running on mobile.

meteor run ios gives error.

=> App running at: http://localhost:3000/
=> Errors executing Cordova commands:

While running Cordova app for platform iOS with options --emulator:
Error: Command failed: /Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/run --emulator
TypeError: Cannot read property ‘replace’ of undefined
at remove (/Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/ios-sim/src/lib.js:282:70)
at Array.forEach (native)
at Object.lib.getdevicetypes (/Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/ios-sim/src/lib.js:292:22)
at Object.listEmulatorImages [as run] (/Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/lib/list-emulator-images:34:29)
at deployToSim (/Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/lib/run.js:173:50)
at /Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/lib/run.js:115:20
at _fulfilled (/Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/q/q.js:796:13)
at /Users/{$USER}/Development/webdev/simple-todos-react/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/q/q.js:604:44
at ChildProcess.exitCallback (/tools/utils/processes.js:151:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
=> awaited here:
at Function.Promise.await
(/Users/{$USER}/.meteor/packages/templating-compiler/.1.3.2.qn524o++os+web.browser+web.cordova/plugin.compileTemplatesBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:35:12)
at CordovaProject.runCommands (/tools/cordova/project.js:715:22)
at CordovaProject.run$ (/tools/cordova/project.js:261:10)
at tryCatch
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:63:40)
at GeneratorFunctionPrototype.invoke [as _invoke]
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:337:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next]
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:96:21)
at tryCatch
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:63:40)
at invoke
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:139:20)
at
/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:184:11
at callInvokeWithMethodAndArg
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:183:16)
at AsyncIterator.enqueue
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:206:13)
at AsyncIterator.prototype.(anonymous function) [as next]
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:96:21)
at Object.runtime.async
(/Users/{$USER}/.meteor/packages/meteor-tool/.1.5.2.9i7mdi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:226:14)
at
/Users/{$USER}/.meteor/packages/templating-compiler/.1.3.2.qn524o++os+web.browser+web.cordova/plugin.compileTemplatesBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:32:39

/Users/{$USER}/.meteor/packages/templating-compiler/.1.3.2.qn524o++os+web.browser+web.cordova/plugin.compileTemplatesBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
throw error;
^
undefined
=> awaited here:
at Function.Promise.await (/Users/{$USER}/.meteor/packages/templating-compiler/.1.3.2.qn524o++os+web.browser+web.cordova/plugin.compileTemplatesBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:35:12)
at /tools/cordova/runner.js:98:17
at /tools/utils/buildmessage.js:271:13
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:264:29
at [object Object].
.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:262:18
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:253:23
at [object Object].
.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.capture (/tools/utils/buildmessage.js:252:19)
at CordovaRunner.startRunTargets (/tools/cordova/runner.js:97:37)
at [object Object]._.extend.runOnce (/tools/runners/run-app.js:772:21)
at [object Object].
.extend._fiber (/tools/runners/run-app.js:885:28)
at /tools/runners/run-app.js:412:12

cat .meteor/local/cordova-build/platforms/ios/CordovaLib/VERSION
gives me 4.4.0

so the api is deprecated on iOS 9.0 api

what’s the proper way to update cordova to the latest version to work with iOS 10 (and potentially iOS 11 weeks later)?


#2

I am having the same issue, any luck?


#3

this answer on stack overflow helped.

https://stackoverflow.com/questions/46254340/meteor-1-5-2-ios-simulator-issue-typeerror-cannot-read-property-replace-of-u/46254353#46254353


#4

However does need to specify the version

cd .meteor/local/cordova-build/platforms/ios/cordova/
meteor nom install iOS-sim@6.1.1

meteor complains the missing package.json in that directory.

it DOES solve the error in my original question.