_From @burkeholland on March 4, 2016 14:58_
NativeScript Version: 1.6.1
I'm unable to use Angular 2 with NativeScript at the moment. I'm using the template-hello-world-ng project.
The error I get isn't terribly helpful....
Project successfully built.
Using /Users/burkeholland/dev/burkeholland/my-app-name/platforms/ios/build/emulator/myappname.app
Starting iOS Simulator
Mar 4 08:15:53 --- last message repeated 1 time ---
Mar 4 08:15:53 hollandmac com.apple.CoreSimulator.SimDevice.FAE7B936-79CE-46C4-859F-65506A603837.launchd_sim[52478] (UIKitApplication:org.nativescript.myappname[0x71cd][52664]): Service exited due to signal: Killed: 9
Steps to recreate:
tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng
cd my-app-name && tns platform add ios
tns run ios --emulator
_Copied from original issue: NativeScript/nativescript-angular#101_
_From @burkeholland on March 4, 2016 15:33_
Updating with possible related race condition error on iOS Simulator. Could be cause by app size.
_From @rosen-vladimirov on March 4, 2016 15:35_
It looks like there are some problems when deploying application to iOS Simulator related to project's size. Some information can be found here:
https://forums.developer.apple.com/thread/25221
As a workaround the following commands can be used:
tns deploy ios --emulator --justlaunch
tns run ios
_From @burkeholland on March 4, 2016 15:56_
:+1:
_From @burkeholland on March 7, 2016 17:45_
It appears to me that livesync is not syncing changes from the TypeScript. Changes their require me to run the deploy command all over again.
_From @jlooper on April 4, 2016 15:2_
I get this error consistently on iOS emulator when running Angular+{N} apps unless I use the deploy/livesync command above. It's a big workflow stopper for me :(. Hoping to get livesync working for iOS soon as well.
_From @tjvantoll on April 15, 2016 19:9_
Iām going to open this up, because I know at least @burkeholland, @jlooper, and @sebawita are still having this issue, and I think we need to come up with some way to workaround the problem.
_From @tjvantoll on April 22, 2016 12:52_
I can confirm that this issue is fixed when using Xcode 7.3 and version 2.0 of the {N} CLI, so Iām going to close this issue for now. If anyone hits this after upgrading to the soon-to-be-released 2.0 CLI please comment so we can look into this.
_From @jlooper on April 27, 2016 16:49_
I do see this issue if using tns emulate ios or tns run ios --emulator with Xcode 7.3 and {N} 2.0. The workaround is to make sure Xcode is closed, reset the simulator (Simulator > Reset Content and Settings) and type:
1) Call tns run ios --justlaunch (Make sure you do not have any iOS devices attached.
2) Call tns livesync ios --watch
_From @georgeedwards on May 1, 2016 14:56_
I also face the same issue using 2.0, XCode 7.3 and OSX El Capitan, but it does work with tns run ios --justlaunch
livesync doesn't work for me, so I haven't found a way to get a console.log yet - really annoying
However, when running on a real device, the app launches without issue
_From @rdlauer on May 9, 2016 20:56_
Same issue here with {N} 2.0 + Xcode 7.3.1. The --justlaunch flag is like magic, but far less convenient.
_From @cfjedimaster on June 2, 2016 18:41_
I ran into this today. It took me about 10 relaunches or so for it to finally work. I'd seriously consider adding a note someplace in the docs for folks going through the tutorial.
_From @tjvantoll on June 3, 2016 13:39_
Reopening this because clearly people are still hitting the problem.
_From @tjvantoll on June 3, 2016 14:18_
@cfjedimaster Warning added in https://github.com/NativeScript/docs/commit/0aebd9861f59f0511598ad20f7775b7cfc34e5f4. Thanks for the feedback as always.
_From @dwehrmann on June 7, 2016 7:24_
+1 also having this problem.
tns run ios --emulator exits with Signal: Killed 9
tns run ios --justlaunch works for me, but livesync doesn't. I think that's a real showstopper ā does anybody have a workaround?
jlooper's advice doesn't work for me:
Project successfully prepared
Executing before-livesync hook from /Users/SB3/www/mobile-dev/groceries/sample-Groceries/hooks/before-livesync/nativescript-angular-sync .js
Transferring project files...
Successfully transferred all project files.
Applying changes...
Successfully synced application org.nativescript.groceries on device A451650D-0FF3-4508-B5AB-7DB59D552076.
Executing before-watch hook from /Users/SB3/www/mobile-dev/groceries/sample-Groceries/hooks/before-watch/nativescript-dev-typescript.js
Found peer TypeScript 1.8.10
Jun 7 09:12:22 SB3 com.apple.CoreSimulator.SimDevice.A451650D-0FF3-4508-B5AB-7DB59D552076.launchd_sim[36659] (UIKitApplication:org.nativescript.groceries[0x6d43][77918]): Service exited due to signal: Killed: 9
I noticed that manually starting the project via the build xcode project is another way to workaround this inconvenience atm. Do the following:
In the terminal execute tns prepare ios then go to platforms/ios, open the .xcodeproj and run its as normally you would in xcode.
Its a slower way to run but it deploys 100% of the time.
I had same issue. tns run ios --emulator fail with Service exited due to signal: Killed: 9 error. But tns livesync ios --emulator --watch works for me. Can you guys try this command?
Ah, It seems that this issue solved from latest tns š®
In my case, I tried tns run ios --emulator from sample project NativeScript/sample-Groceries. I noticed package.json was changed like this when I added platforms ios/android.
"nativescript": {
"id": "org.nativescript.groceries",
"tns-ios": {
- "version": "2.0.0"
+ "version": "2.1.0"
},
"tns-android": {
- "version": "2.0.0"
+ "version": "2.1.1"
}
},
"dependencies": {
"tns-core-modules": "2.0.0"
...
Maybe, tns-core-modules's version was mismatch? I upgraded tns-core-modules according to this guide upgrade-instructions#upgrading-tns-modules.
"nativescript": {
"id": "org.nativescript.groceries",
"tns-ios": {
- "version": "2.0.0"
+ "version": "2.1.0"
},
"tns-android": {
- "version": "2.0.0"
+ "version": "2.1.1"
}
},
"dependencies": {
- "tns-core-modules": "2.0.0"
+ "tns-core-modules": "^2.1.0"
...
Then, tns run ios --emulator works fine š
This problem still exists and the issue should be reopened.
Steps to reproduce:
tns create test-nativescript-angular --ng
tns run ios --emulator
tns version 2.2.0
Xcode 7.3.1
simulator 8.4 and 9.3
Had the same problem today. I'm unable to init the ios simulator.
@juanpujol try https://github.com/NativeScript/nativescript-cli/issues/1816#issuecomment-229650729
Thanks @VladimirAmiorkov that worked. But still, this issue should be reopened, don't you think?
Is there a way to use livereload from Xcode? Thanks.
@juanpujol if you mean livesync then am afraid the answer is no. The mentioned method is basically manually running the created by nativescript native project and as livesyncis not a native feature it is not available.
Ok, thank you.
I was just having a bunch of trouble with this but this seemed to resolve it. For some reason, it won't allow me to run tns run ios --emulator, but the command below works.
tns run ios --justlaunch --watch
I was able to get this going without having to downgrade any of my dependencies as well. Below are some contents from my package.json file.
"tns-ios": {
"version": "2.2.1"
}
},
"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
//other deps
"nativescript-angular": "^0.3.0",
"reflect-metadata": "^0.1.5",
"tns-core-modules": "2.2.1"
}, //....
Pointed here from groceries tutorial, but can't find the "workaround" tutorial mentioned. At this moment the only way that works is to execute ios app from xcode.
The issue is still there - it happens to me when running the ng-sample project. It does not happen every time and hard to reproduce 100% of the time.
Some observations:
git clone, npm i, tns run ios) - it is more likely to get it@thomasjosephgreco thanks!
tns run ios --emulator --justlaunch --watch seems to work great for me.
This is almost certainly memory related. I see this error much more frequently in low memory conditions on my dev machine.
I left a comment on nativescript-angular issue # 101 but looks like it's duplicate from here.
I've attacked in so many different ways in order to get the simulator working but no luck so far.
tns run ios and also tns run ios --justlaunch + tns livesync ios --watch don't work even when the app is the taps counter.
Tried using webpack to have a smaller build, also tried to upgrade OS and xcode versions but nothing seems to help.
It might worth reporting that it takes ages to spin up the simulator and even default apps, like Settings, don't work sometimes. But they do after several attempts (I mean being stupid enough to hit their icons and wait for them ending up crashing in a frenetic loop).
Regarding my build, the maximum I can see is the splashscreen and then it closes (due to Kill 9 signal).
I was wondering if there is any log file to check for errors or a config file to force using more memory or something like that.
Thanks
I had the same issue, Service exited due to signal: Killed: 9. I was running MacOs Sierra in Vmware. I was using 4gb of ram and the vm was placed on an normal hard disk. My pc got 16 GB of RAM, when I assigned 8gb to the VM and moved it to my SSD drive, everything was working fine.
I see 2.5 is out, didn't check yet, but I hope this is fixed..
Still present in 2.5.
Creating simple ng app
tns create DemoApp --ng and tns run ios drops the same error, have more then 10gb of memory free, so I would eliminate memory as issue in my case.
Hi ! i have the same issue. I need to restart my imac everytime because of this error. No news about it?
Hey all @nabil-mansouri , @davorpeic
If you still encounter this problem could you send us exact steps to reproduce, please.
Thanks!
Hi, yes i have the same issue. The whole livesync solution feels fragile and some sort of race condition issue is happening(which I attribute to sometimes it works, sometimes it doesn't). Once in awhile when it fails, I'll see something about hooks an a permission issue (just speculating). When I'm lucky, I don't see this issue, unfortunately, I see it more often than not so rather than fight it, I've come to terms with just using my work around.
btw, livesync and --watch are no longer published documented command line options for tns 3.1.3 so don't try those with previously above 2016 mentioned work arounds. For me, this is what I'm having to do.
Two different terminals... 1st one to build/deploy/run the code, 2nd one to watch the terminal. Everytime I make a change, I re-run the 1st terminal command again...
First Terminal
tns run ios --device <device-id> --justlaunch
Second Terminal
tns device log --device <device-id>
@pkoleva what type of activity and logs can I send you to help give you the "need more info" you are looking for. You're welcome to contact me directly or just ask Jen Looper for my contact info if you like.
Hi @QuinnZillian,
If you can isolate the problem, using our latest bits, it will be very helpful for us to have the specific steps to reproduce. You can send us the versions of node and npm you use, what kind of devices or simulators you use to recreate the error, your OS and xCode versions. Also if you could send us the output of tns run ios --log trace when you get the "Service exited due to signal: Killed: 9" error, it will help investigating further.
_Indeed livesync and --watch are deprecated for a couple of releases already. The way we sync files now is by running tns run <platform> and it watches for changes automatically by default. However, using --justlaunch just builds and deploys the app on all connected devices and does not sync._
Hi @pkoleva Here's what you've asked for. Good Luck!!!!
Let me know if there is anything else I can provide.
tns --version
macbooks-MacBook-Pro:mow-app Michael$ tns --version
3.1.3
macbooks-MacBook-Pro:mow-app Michael$ tns doctor
Verifying CocoaPods. This may take more than a minute, please be patient.
[email protected] /private/var/folders/tx/c73yn43x5qgf2thyb2tss3z40000gq/T/nativescript-check-cocoapods117727-73320-1ynb5yo.0sydivbo6r
āāā [email protected]
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
ā Verifying CocoaPods. This may take some time, please be patient..
Your components are up-to-date.
No issues were detected.
Here's a tail snippet of the trace log. The full trace can be found in the trace.zip
Aug 27 03:49:57 --- last message repeated 6 times ---
objc[73159]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x119adccc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x1198f36f0). One of the two will be used. Which one is undefined.
3:50:00 AM - Compilation complete. Watching for file changes.
Hook completed
Project dir from hooksArgs is: /git/cs/develop/mow-mobile-beta/mow-app.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
'/usr/local/lib/node_modules/nativescript/lib/common/hooks',
'/git/cs/develop/mow-mobile-beta/mow-app/hooks' ]
AfterHookName for command liveSync is after-liveSync
Aug 27 03:50:04 macbooks-MacBook-Pro com.apple.CoreSimulator.SimDevice.23BE09E6-5E38-4431-9D9A-25AC5E036C3D.launchd_sim[62891] (UIKitApplication:com.celebrationsoftware.ns.mow[0x9dca][62913][73159]): Service exited due to Killed: 9
File contains the trace log and a screen shot of the versions
trace.zip
Hey @QuinnZillian ,
Its been a while since we were looking at this issue. I would like to share some details about our suspicions what might be causing it. In some cases, when the application is installed on iOS simulator and you try to launch it really fast, the application is being killed and you receive an error Service exited due to Killed: 9. As described in this thread:
There is a potential race condition between install and launch,
and it looks like you're reliably loosing that race.
SpringBoard sends SIGKILL to a running process when
its app bundle is updated, but in this case,
we actually launched it after the install
before SpringBoard got notified of the install.
The problem might occur on iOS 8 simulators (at least according to the same thread) or in case there's some issue in CLI that makes it change the app bundle during launch of application. We have not found such issue in CLI so far, so I assume you were using iOS 8 simulator.
I know its been a while, so I would like to ask you to try the steps you've described in your post and inform us if you still reproduce the issue.
Thanks in advance for your help.
Hey guys,
As we have not received reports for similar issue with the latest versions, we are closing this issue. We've applied additional changes in our code that should prevent this issue and we they will be included in the next official release.
Please open a separate issue in case you face the same problem again.
Most helpful comment
Still present in 2.5.
Creating simple ng app
tns create DemoApp --ngandtns run iosdrops the same error, have more then 10gb of memory free, so I would eliminate memory as issue in my case.