New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meteor 1.5.2 ios simulator issue, typeError: Cannot read property 'replace' of undefined #9098

Closed
hafizali05 opened this Issue Sep 16, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@hafizali05

hafizali05 commented Sep 16, 2017

I’m on Xcode 8.3.3 with OS X 10.12.6

Fresh install of meteor 15.2.

Basically, i just created a basic app using meteor create
It prompted me to update to meteor 1.5.2 and I updated though it worked fine for meteor 1.4.3.
When I tried running meteor run ios after adding platforms for both the versions, it gave me the below error for 1.5.2

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)?

@klaussner

This comment has been minimized.

Collaborator

klaussner commented Sep 16, 2017

This is (or was) a bug in the ios-sim package, which Meteor uses to run the iOS Simulator. Until this dependency is updated in Meteor, you can work around the problem by manually updating ios-sim in your project folder. I don't have a Mac to double-check at the moment but this should work:

cd .meteor/local/cordova-build/platforms/ios/cordova
meteor npm install ios-sim@latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment