_From @stnguyen on June 18, 2016 3:42_
I can run the app fine on iOS simulator, but when I try livesync, it doesn't work
tns livesync ios --emulator --watch --log trace
Project successfully prepared
AfterHookName for command prepare is after-prepare
BeforeHookName for command livesync is before-livesync
Executing before-livesync hook from /Users/stnguyenvn/sandbox/sample-Groceries/hooks/before-livesync/nativescript-angular-sync .js
Executing before-livesync hook at location /Users/stnguyenvn/sandbox/sample-Groceries/hooks/before-livesync/nativescript-angular-sync .js in-process
Hook completed
Error: [object Object] is not a future
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:535:15)
at /usr/local/lib/node_modules/nativescript/lib/common/errors.js:123:33
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
at /usr/local/lib/node_modules/nativescript/lib/common/services/commands-service.js:84:106
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
at /usr/local/lib/node_modules/nativescript/lib/common/dispatchers.js:38:85
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
at /usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:21:45
- - - - -
at getFutures (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:202:10)
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:214:16)
at /usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:231:28
at arrayMap (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/lodash/index.js:1378:25)
at Function.map (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/lodash/index.js:6154:14)
at /usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:228:29
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/fibers/future.js:249:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/fibers/future.js:565:10)
at /usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:257:55
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/fibers/future.js:249:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/fibers/future.js:565:10)
at /usr/local/lib/node_modules/nativescript/lib/common/services/livesync-service-base.js:197:63
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/fibers/future.js:249:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/fibers/future.js:565:10)
at /usr/local/lib/node_modules/nativescript/lib/common/services/livesync-service-base.js:38:45
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/node_modules/fibers/future.js:249:26)
Analytics statuses:
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track feature 'CLI' with value 'help'.
List of registered commands: /?, appstore, appstore|upload, autocomplete, autocomplete|disable, autocomplete|enable, autocomplete|status, build, build|android, build|ios, create, debug, debug|android, debug|ios, deploy, dev-generate-help, dev-generate-messages, dev-post-install, dev-preuninstall, dev-test, dev-test|android, dev-test|ios, device, device|android, device|get-file, device|ios, device|list-applications, device|list-files, device|log, device|put-file, device|run, device|stop, device|uninstall, doctor, emulate, emulate|android, emulate|ios, error-reporting, help, info, init, install, livesync, platform, platform|add, platform|remove, platform|update, plugin, plugin|add, plugin|find, plugin|remove, plugin|search, prepare, publish, publish|ios, run, run|android, run|ios, test, test|android, test|init, test|ios, usage-reporting
Reading help for command 'livesync'. FileName is 'livesync.md'.
# livesync
โโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Usage โ Synopsis โ
โ General โ $ tns livesync <Platform> โ
โโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Synchronizes the latest changes in your project to devices.
### Attributes
<Platform> is the target mobile platform to which you want to synchronize your changes. You can set the following target platforms.
* android - Synchronizes the latest changes in your project to connected Android devices.
* ios - Synchronizes the latest changes in your project to connected iOS devices.
Analytics statuses:
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track exception with message '[object Object] is not a future'.
My environment:
node v4.4.5
npm v2.15.4
_Copied from original issue: NativeScript/NativeScript#2336_
_From @bisonte-az on June 18, 2016 18:14_
Sample groceries master presents the same problem
_From @bathejasumeet on June 19, 2016 7:5_
even the sample app created while running tns create app_name produces the same problem for iOS during livesync
_From @jlooper on June 19, 2016 14:16_
I normally simply use tns livesync iOS --watch, does that produce the same problem?
_From @stnguyen on June 20, 2016 2:46_
@jlooper yep same problem
Works with current master. Hey @vchimev @dtopuzov can you check this as well?
Can not reproduce with 2.1.0 Release Candidate, it will be official available at the end of the month.
Please let us know if problem still exists with 2.1.0.
@dtopuzov thank you. is there a way I can test it now on my machine?
Hey @stnguyen,
You can pull the master branch, execute grunt to build the CLI and use full path instead tns.
For example:
C:\YourApp>C:\GitHub\nativescript-cli\bin\nativescript build android
I know that this has been closed, but until the new release I will like to add my two cents.
Had the same issue, this is how I fixed it.
npm cache clean
npm remove -g nativescript
npm remove -g nativescript (yes twice)
npm install -g nativescript
if it helps thank @NathanaelA
@vtrend it worked!! @NathanaelA - thanks, can you please explain why this worked ? just curious
There are three different things that I've ran into that can cause this; and those commands take care of two of them. :grinning:
The third way I've seen this fail is that on a poor internet connection sometimes the sub-modules don't download properly on my mac and I get a error during install about it failing; so it is easy to fix with another npm install -g nativescript
@vtrend @NathanaelA it works. thanks a lot!
@NathanaelA .. makes complete sense .. thanks a lot
Hi All,
This was an issue with a dependency of {N} CLI which affected the work with iOS Simulator with new CLI installations in the last few days.
It was fixed on Tuesday. If anyone still gets Error: [object Object] is not a future can reinstall: _npm install -g nativescript_.
I still cant fix this error in any ways
i reinstalled cleared npm cache installed, did all these couple of times.
I have node v 4.4.6 installed with nvm and the latest version of npm and native script
I still get the [object Object] is not a future error
I searched a lot in the internet, cant get over this.
Help will be really appriciated.
tns livesync ios --emulator --watch
gives me
Project successfully prepared
[object Object] is not a future
i uninstalled four times in a row and installed four times then it got fixed.
Quite interesting.
No problem anymore, sorry to keep the thread busy.
doesn't work for me. tried all options:
TypeError: Cannot read property 'id' of undefined
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:566:15)
at /usr/local/lib/node_modules/nativescript/lib/common/errors.js:128:33
Most helpful comment
I know that this has been closed, but until the new release I will like to add my two cents.
Had the same issue, this is how I fixed it.
npm cache cleannpm remove -g nativescriptnpm remove -g nativescript(yes twice)npm install -g nativescriptif it helps thank @NathanaelA