Skip to content

tns debug crash + node-sass process stacking #2841

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

Closed
SBats opened this issue May 23, 2017 · 8 comments
Closed

tns debug crash + node-sass process stacking #2841

SBats opened this issue May 23, 2017 · 8 comments

Comments

@SBats
Copy link

SBats commented May 23, 2017

Hi,

First of all thanks for the awesome work you do on Nativescript and on the toolchain!

Did you verify this is a real problem by searching

I wasn't able to find an existing specific issue related to this one.

Tell us about the problem

Since I upgraded to v3 of Nativescript (Both CLI and app), I'm unable to use tns debug anymore.
On first launch it simply stop the process in the console as soon as I load the debugger URL in my browser. If I relaunch it a second time I can connect but as soon as I make a change (for example in the view template), the process stop again.
On another hand both ios-sim-standalone.js launch and node-sass processes are still activ if I monitor my system and stack on each crash (So after 3 crash I have 3 of each process active)

Which platform(s) does your issue occur on?

TNS platform: iOS (Not tested on Android)
Development System: macOS Sierra (10.12.4) on a Early 2015 MacBook Pro

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.0.1
  • Cross-platform modules: 3.1.0
  • Runtime(s): 3.0.1 (iOS)
  • Plugin(s):
    • "nativescript-theme-core": "~1.0.2",
    • "nativescript-dev-android-snapshot": "^0.."

Please tell us how to recreate the issue in as much detail as possible.

  • 1st try
    tns create HelloWorld
    cd HelloWorld~ tns debug ios --chrome`

  • 2nd try
    tns debug ios --chrome
    Changetext of label in main-page.xml

Is there code involved? If so, please share the minimal amount of code needed to recreate the Just using basic tns create app.

Thank you in advance for your help and time on this!

@pkoleva
Copy link
Contributor

pkoleva commented May 25, 2017

Hi @SBats,

I cannot reproduce the issue using your steps. Could you give more info - do you get the issue on a device or a simulator. Can you reproduce it using our sample hello world template?
Also would you send us more detailed log from the second command using tns debug ios --chrome --log trace.

Thanks!

@SBats
Copy link
Author

SBats commented May 25, 2017

Hi @pkoleva and thanks for your help.
I'm running it on and up to date iOS emulator, and have the issue with the sample hello world template created by the command tns create.

Here are two consectuive runs detailed log with the command tns debug ios --chrome --log trace
A thing that might be interesting is in the second case, the scrip seems to Lose and find again the device. Don't know if it can be of any help though :( ...

First run

Loading extensions.
execFile: /usr/local/opt/android-sdk/platform-tools/adb "help"
Exec uname -a
stdout: Darwin Simons-MacBook-Pro.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

stderr:
Exec npm -v
stdout: 3.10.10

stderr:
spawn: java "-version"
Exec node-gyp -v
stdout:
stderr: /bin/sh: node-gyp: command not found

Exec xcodebuild -version
stdout: Xcode 8.3.2
Build version 8E2002

stderr:
Exec gem which xcodeproj
stdout: /Users/batsman/.rvm/gems/ruby-2.4.0@global/gems/xcodeproj-1.4.2/lib/xcodeproj.rb

stderr:
Exec pod --version
stdout: 1.2.0

stderr:
Exec '/usr/local/opt/android-sdk/platform-tools/adb' version
stdout: Android Debug Bridge version 1.0.36
Revision 0e9850346394-android

stderr:
spawn: /usr/local/opt/android-sdk/tools/emulator "-help"
Result when throw error is false:
{ stdout: 'Android Emulator usage: emulator [options] [-qemu args]\n options:\n -list-avds list available AVDs\n -sysdir

search for system disk images in \n -system read initial system image from \n -writable-system make system image writable after 'adb remount'\n -datadir write user data into \n -kernel use specific emulated kernel\n -ramdisk ramdisk image (default /ramdisk.img\n -image obsolete, use -system instead\n -initdata same as '-init-data '\n -data data image (default /userdata-qemu.img\n -partition-size system/data partition size in MBs\n -cache cache partition image (default is temporary file)\n -cache-size cache partition size in MBs\n -no-cache disable the cache partition\n -nocache same as -no-cache\n -sdcard SD card image (default /sdcard.img\n -snapstorage file that contains all state snapshots (default /snapshots.img)\n -no-snapstorage do not mount a snapshot storage file (this disables all snapshot functionality)\n -snapshot name of snapshot within storage file for auto-start and auto-save (default 'default-boot')\n -no-snapshot perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage\n -no-snapshot-save do not auto-save to snapshot on exit: abandon changed state\n -no-snapshot-load do not auto-start from snapshot: perform a full boot\n -snapshot-list show a list of available snapshots\n -no-snapshot-update-time do not do try to correct snapshot time on restore\n -wipe-data reset the user data image (copy it from initdata)\n -avd use a specific android virtual device\n -skindir search skins in (default /skins)\n -skin select a given skin\n -no-skin deprecated: create an AVD with no skin instead\n -noskin same as -no-skin\n -memory physical RAM size in MBs\n -accel Configure emulation acceleration\n -no-accel Same as '-accel off'\n -ranchu Use new emulator backend instead of the classic one\n -engine Select engine. auto|classic|qemu2\n -netspeed maximum network download/upload speeds\n -netdelay network latency emulation\n -netfast disable network shaping\n -code-profile enable code profiling\n -show-kernel display kernel messages\n -shell enable root shell on current terminal\n -no-jni disable JNI checks in the Dalvik runtime\n -nojni same as -no-jni\n -logcat enable logcat output with given tags\n -no-audio disable audio support\n -noaudio same as -no-audio\n -audio use specific audio backend\n -raw-keys disable Unicode keyboard reverse-mapping (deprecated)\n -radio redirect radio modem interface to character device\n -port TCP port that will be used for the console\n -ports , TCP ports used for the console and adb bridge\n -onion use overlay PNG image over screen\n -onion-alpha <%age> specify onion-skin translucency\n -onion-rotation 0|1|2|3 specify onion-skin rotation\n -dpi-device specify device's resolution in dpi (default 165)\n -scale scale emulator window (deprecated)\n -http-proxy make TCP connections through a HTTP/HTTPS proxy\n -timezone use this timezone instead of the host's default\n -dns-server use this DNS server(s) in the emulated system\n -cpu-delay throttle CPU emulation\n -no-boot-anim disable animation for faster boot\n -no-window disable graphical window display\n -version display emulator version number\n -report-console report console port to remote socket\n -gps redirect NMEA GPS to character device\n -keyset specify keyset file name\n -shell-serial specific character device for root shell\n -tcpdump capture network packets to file\n -bootchart enable bootcharting\n -charmap use specific key character map\n -prop = set system property on boot\n -shared-net-id join the shared network, using IP address 10.1.2.\n -nand-limits enforce NAND/Flash read/write thresholds\n -gpu set hardware OpenGLES emulation mode\n -camera-back set emulation mode for a camera facing back\n -camera-front set emulation mode for a camera facing front\n -webcam-list lists web cameras available for emulation\n -screen set emulated screen mode\n -force-32bit always use 32-bit emulator\n -selinux <disabled|permissive> Set SELinux to either disabled or permissive mode\n -unix-pipe Add to the list of allowed Unix pipes\n -fixed-scale Use fixed 1:1 scale for the initial emulator window.\n\n -qemu args... pass arguments to qemu\n -qemu -h display qemu help\n\n -verbose same as '-debug-init'\n -debug enable/disable debug messages\n -debug- enable specific debug messages\n -debug-no- disable specific debug messages\n\n -help print this help\n -help- print option-specific help\n\n -help-disk-images about disk images\n -help-keys supported key bindings\n -help-debug-tags debug tags for -debug \n -help-char-devices character specification\n -help-environment environment variables\n -help-keyset-file key bindings configuration file\n -help-virtual-device virtual device management\n -help-sdk-images about disk images when using the SDK\n -help-build-images about disk images when building Android\n -help-all prints all help content\n\n',
stderr: '',
exitCode: 1 }
The result of checking is Android Emulator installed is:

  • stdout: Android Emulator usage: emulator [options] [-qemu args]
    options:
    -list-avds list available AVDs
    -sysdir

    search for system disk images in
    -system read initial system image from
    -writable-system make system image writable after 'adb remount'
    -datadir write user data into
    -kernel use specific emulated kernel
    -ramdisk ramdisk image (default /ramdisk.img
    -image obsolete, use -system instead
    -initdata same as '-init-data '
    -data data image (default /userdata-qemu.img
    -partition-size system/data partition size in MBs
    -cache cache partition image (default is temporary file)
    -cache-size cache partition size in MBs
    -no-cache disable the cache partition
    -nocache same as -no-cache
    -sdcard SD card image (default /sdcard.img
    -snapstorage file that contains all state snapshots (default /snapshots.img)
    -no-snapstorage do not mount a snapshot storage file (this disables all snapshot functionality)
    -snapshot name of snapshot within storage file for auto-start and auto-save (default 'default-boot')
    -no-snapshot perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage
    -no-snapshot-save do not auto-save to snapshot on exit: abandon changed state
    -no-snapshot-load do not auto-start from snapshot: perform a full boot
    -snapshot-list show a list of available snapshots
    -no-snapshot-update-time do not do try to correct snapshot time on restore
    -wipe-data reset the user data image (copy it from initdata)
    -avd use a specific android virtual device
    -skindir search skins in (default /skins)
    -skin select a given skin
    -no-skin deprecated: create an AVD with no skin instead
    -noskin same as -no-skin
    -memory physical RAM size in MBs
    -accel Configure emulation acceleration
    -no-accel Same as '-accel off'
    -ranchu Use new emulator backend instead of the classic one
    -engine Select engine. auto|classic|qemu2
    -netspeed maximum network download/upload speeds
    -netdelay network latency emulation
    -netfast disable network shaping
    -code-profile enable code profiling
    -show-kernel display kernel messages
    -shell enable root shell on current terminal
    -no-jni disable JNI checks in the Dalvik runtime
    -nojni same as -no-jni
    -logcat enable logcat output with given tags
    -no-audio disable audio support
    -noaudio same as -no-audio
    -audio use specific audio backend
    -raw-keys disable Unicode keyboard reverse-mapping (deprecated)
    -radio redirect radio modem interface to character device
    -port TCP port that will be used for the console
    -ports , TCP ports used for the console and adb bridge
    -onion use overlay PNG image over screen
    -onion-alpha <%age> specify onion-skin translucency
    -onion-rotation 0|1|2|3 specify onion-skin rotation
    -dpi-device specify device's resolution in dpi (default 165)
    -scale scale emulator window (deprecated)
    -http-proxy make TCP connections through a HTTP/HTTPS proxy
    -timezone use this timezone instead of the host's default
    -dns-server use this DNS server(s) in the emulated system
    -cpu-delay throttle CPU emulation
    -no-boot-anim disable animation for faster boot
    -no-window disable graphical window display
    -version display emulator version number
    -report-console report console port to remote socket
    -gps redirect NMEA GPS to character device
    -keyset specify keyset file name
    -shell-serial specific character device for root shell
    -tcpdump capture network packets to file
    -bootchart enable bootcharting
    -charmap use specific key character map
    -prop = set system property on boot
    -shared-net-id join the shared network, using IP address 10.1.2.
    -nand-limits enforce NAND/Flash read/write thresholds
    -gpu set hardware OpenGLES emulation mode
    -camera-back set emulation mode for a camera facing back
    -camera-front set emulation mode for a camera facing front
    -webcam-list lists web cameras available for emulation
    -screen set emulated screen mode
    -force-32bit always use 32-bit emulator
    -selinux <disabled|permissive> Set SELinux to either disabled or permissive mode
    -unix-pipe Add to the list of allowed Unix pipes
    -fixed-scale Use fixed 1:1 scale for the initial emulator window.

    -qemu args... pass arguments to qemu
    -qemu -h display qemu help

    -verbose same as '-debug-init'
    -debug enable/disable debug messages
    -debug- enable specific debug messages
    -debug-no- disable specific debug messages

    -help print this help
    -help- print option-specific help

    -help-disk-images about disk images
    -help-keys supported key bindings
    -help-debug-tags debug tags for -debug
    -help-char-devices character specification
    -help-environment environment variables
    -help-keyset-file key bindings configuration file
    -help-virtual-device virtual device management
    -help-sdk-images about disk images when using the SDK
    -help-build-images about disk images when building Android
    -help-all prints all help content

  • stderr:
    Exec mono --version
    stdout: Mono JIT compiler version 5.0.0.100 (2017-02/9667aa6 Fri May 5 09:12:57 EDT 2017)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS: normal
    SIGSEGV: altstack
    Notification: kqueue
    Architecture: x86
    Disabled: none
    Misc: softdebug
    LLVM: yes(3.6.0svn-mono-master/8b1520c)
    GC: sgen (concurrent by default)

stderr:
Exec git --version
stdout: git version 2.12.0

stderr:
Exec gradle -v
stdout:
stderr: /bin/sh: gradle: command not found

Exec "/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/javac" -version
stdout:
stderr: javac 1.8.0_121

System information:
{ procInfo: 'nativescript/3.0.1',
platform: 'darwin',
os: 'Darwin Simons-MacBook-Pro.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64\n',
shell: '/usr/local/bin/zsh',
dotNetVer: null,
procArch: 'x64',
nodeVer: 'v6.10.0',
npmVer: '3.10.10',
javaVer: '1.8.0',
nodeGypVer: null,
xcodeVer: 'Xcode 8.3.2\nBuild version 8E2002\n',
xcodeprojGemLocation: '/Users/batsman/.rvm/gems/ruby-2.4.0@global/gems/xcodeproj-1.4.2/lib/xcodeproj.rb\n',
itunesInstalled: true,
cocoapodVer: '1.2.0',
adbVer: 'Android Debug Bridge version 1.0.36',
emulatorInstalled: true,
monoVer: null,
gitVer: '2.12.0',
gradleVer: null,
javacVersion: '1.8.0_121' }
Looking for project in '/Users/batsman/Works/tns-test/HelloWorld'
Project directory is '/Users/batsman/Works/tns-test/HelloWorld'.
Searching for devices...
startLookingForDevices; platform is ios
Starting to look for iOS devices.
Exec ps cax | grep launchd_sim
stdout:
stderr:
Exec ps cax | grep launchd_sim
stdout: 4597 ?? S 0:00.23 launchd_sim

stderr:
Found device with identifier '1A967209-D45D-42E5-9C47-2A1E78828D49'
startLookingForDevices; platform is iOS
Exec ps cax | grep launchd_sim
stdout: 4597 ?? S 0:00.24 launchd_sim

stderr:
Validate options for platform: iOS
Initializing analytics statuses.
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'CLI' with value 'debug|ios'.
AnalyticsInstallationID: 5cee6a28-f648-4eb6-92ab-0f13009544d5
monitor not started
monitor not started
monitor not started
monitor has started, connecting to http://5752dabccfc54c4ab82aea9626b7338e.monitor-eqatec.com/json.ashx
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'NodeJSVersion' with value '6_10_0'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Working with project type' with value 'Pure JavaScript'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Changes info in prepare platform: ProjectChangesInfo {
appFilesChanged: false,
packageChanged: false,
appResourcesChanged: false,
nativeChanged: false,
configChanged: false }
Skipping prepare.
Skipping package build. No changes detected on the native side. This will be fast!
Skipping install.
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Deploy' with value 'iOS.emulator'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Device OS version' with value 'iOS_10.3'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
BeforeHookName for command livesync is before-livesync
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'LiveSync' with value 'iOS.emulator'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Device OS version' with value 'iOS_10.3'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Successfully synced application org.nativescript.HelloWorld on device 1A967209-D45D-42E5-9C47-2A1E78828D49.

Starting iOS Simulator
spawn: /Users/batsman/.nvm/versions/node/v6.10.0/bin/node "/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/node_modules/ios-sim-portable/lib/ios-sim-standalone.js" "launch" "/Users/batsman/Works/tns-test/HelloWorld/platforms/ios/build/emulator/HelloWorld.app" "org.nativescript.HelloWorld" "--logging" "--args=--nativescript-debug-start" "--waitForDebugger" "--skipInstall"

Setting up debugger proxy...
Press Ctrl + C to terminate, or disconnect.

Opened localhost 8080
To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/remote/serve_file/@02e6bde1bbe34e43b309d4ef774b1168d25fd024/inspector.html?experiments=true&ws=localhost:8080

Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
BeforeHookName for command watch is before-watch
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
AfterHookName for command livesync is after-livesync
spawn: lldb "-p" "4696"
(lldb) process attach --pid 4696
Process 4696 stopped

Executable module set to "/Users/batsman/Library/Developer/CoreSimulator/Devices/1A967209-D45D-42E5-9C47-2A1E78828D49/data/Containers/Bundle/Application/0A278B3E-50C6-4FDB-932B-68F07C86CD77/HelloWorld.app/HelloWorld".
Architecture set to: x86_64h-apple-ios.
(lldb) process continue
Process 4696 resuming
May 25 10:14:35 Simons-MacBook-Pro HelloWorld[4696]: objc[4696]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x117effcc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x117d166f0). One of the two will be used. Which one is undefined.
May 25 10:14:36 Simons-MacBook-Pro HelloWorld[4696]: assertion failed: 16E195 14E269: libxpc.dylib + 64131 [624BAF4F-2E03-34F8-ACBA-970B04637786]: 0x7d
Frontend client connected.
Backend socket created.
May 25 10:14:40 Simons-MacBook-Pro HelloWorld[4696]: NativeScript debugger attached.
Event 'change' triggered for path: '/Users/batsman/Works/tns-test/HelloWorld/app/main-page.xml'
Syncing /Users/batsman/Works/tns-test/HelloWorld/app/main-page.xml
Removed files from syncQueue: []
Removed files from syncQueue: []
Changes info in prepare platform: ProjectChangesInfo {
appFilesChanged: true,
packageChanged: false,
appResourcesChanged: false,
nativeChanged: false,
configChanged: false }
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
BeforeHookName for command prepare is before-prepare
Executing before-prepare hook from /Users/batsman/Works/tns-test/HelloWorld/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook at location /Users/batsman/Works/tns-test/HelloWorld/hooks/before-prepare/nativescript-dev-android-snapshot.js in-process
Validating before-prepare arguments.
Hook completed
Preparing project...
Project successfully prepared (iOS)
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
AfterHookName for command prepare is after-prepare
Executing after-prepare hook from /Users/batsman/Works/tns-test/HelloWorld/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook at location /Users/batsman/Works/tns-test/HelloWorld/hooks/after-prepare/nativescript-dev-android-snapshot.js in-process
Validating after-prepare arguments.
Hook completed
Will execute livesync for files: [ '/Users/batsman/Works/tns-test/HelloWorld/platforms/ios/HelloWorld/app/main-page.xml' ]
Transferring project files...
Transferring from /Users/batsman/Works/tns-test/HelloWorld/platforms/ios/HelloWorld/app/main-page.xml to /Users/batsman/Library/Developer/CoreSimulator/Devices/1A967209-D45D-42E5-9C47-2A1E78828D49/data/Containers/Bundle/Application/0A278B3E-50C6-4FDB-932B-68F07C86CD77/HelloWorld.app/app/main-page.xml
Successfully transferred main-page.xml.
Successfully synced application org.nativescript.HelloWorld on device 1A967209-D45D-42E5-9C47-2A1E78828D49.

(lldb) process detach
May 25 10:15:13 Simons-MacBook-Pro HelloWorld[4696]: NativeScript debugger detached.
May 25 10:15:13 Simons-MacBook-Pro HelloWorld[4696]: NativeScript debugger encountered Error Domain=NSPOSIXErrorDomain Code=9 "Bad file descriptor".
Error: This socket is closed
at Socket._writeGeneric (net.js:680:19)
at Socket._write (net.js:731:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at Socket.Writable.write (_stream_writable.js:247:11)
at Socket.write (net.js:658:40)
at WebSocket.webSocket.on (/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/device-sockets/ios/socket-proxy-factory.js:109:34)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:191:7)
at Receiver._receiver.onmessage (/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/node_modules/ws/lib/WebSocket.js:145:54)
IOSDeviceOperations disposed.

Second run

tns debug ios --chrome --log trace
Loading extensions.
execFile: /usr/local/opt/android-sdk/platform-tools/adb "help"
Exec uname -a
stdout: Darwin Simons-MacBook-Pro.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

stderr:
Exec npm -v
stdout: 3.10.10

stderr:
spawn: java "-version"
Exec node-gyp -v
stdout:
stderr: /bin/sh: node-gyp: command not found

Exec xcodebuild -version
stdout: Xcode 8.3.2
Build version 8E2002

stderr:
Exec gem which xcodeproj
stdout: /Users/batsman/.rvm/gems/ruby-2.4.0@global/gems/xcodeproj-1.4.2/lib/xcodeproj.rb

stderr:
Exec pod --version
stdout: 1.2.0

stderr:
Exec '/usr/local/opt/android-sdk/platform-tools/adb' version
stdout: Android Debug Bridge version 1.0.36
Revision 0e9850346394-android

stderr:
spawn: /usr/local/opt/android-sdk/tools/emulator "-help"
Result when throw error is false:
{ stdout: 'Android Emulator usage: emulator [options] [-qemu args]\n options:\n -list-avds list available AVDs\n -sysdir

search for system disk images in \n -system read initial system image from \n -writable-system make system image writable after 'adb remount'\n -datadir write user data into \n -kernel use specific emulated kernel\n -ramdisk ramdisk image (default /ramdisk.img\n -image obsolete, use -system instead\n -initdata same as '-init-data '\n -data data image (default /userdata-qemu.img\n -partition-size system/data partition size in MBs\n -cache cache partition image (default is temporary file)\n -cache-size cache partition size in MBs\n -no-cache disable the cache partition\n -nocache same as -no-cache\n -sdcard SD card image (default /sdcard.img\n -snapstorage file that contains all state snapshots (default /snapshots.img)\n -no-snapstorage do not mount a snapshot storage file (this disables all snapshot functionality)\n -snapshot name of snapshot within storage file for auto-start and auto-save (default 'default-boot')\n -no-snapshot perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage\n -no-snapshot-save do not auto-save to snapshot on exit: abandon changed state\n -no-snapshot-load do not auto-start from snapshot: perform a full boot\n -snapshot-list show a list of available snapshots\n -no-snapshot-update-time do not do try to correct snapshot time on restore\n -wipe-data reset the user data image (copy it from initdata)\n -avd use a specific android virtual device\n -skindir search skins in (default /skins)\n -skin select a given skin\n -no-skin deprecated: create an AVD with no skin instead\n -noskin same as -no-skin\n -memory physical RAM size in MBs\n -accel Configure emulation acceleration\n -no-accel Same as '-accel off'\n -ranchu Use new emulator backend instead of the classic one\n -engine Select engine. auto|classic|qemu2\n -netspeed maximum network download/upload speeds\n -netdelay network latency emulation\n -netfast disable network shaping\n -code-profile enable code profiling\n -show-kernel display kernel messages\n -shell enable root shell on current terminal\n -no-jni disable JNI checks in the Dalvik runtime\n -nojni same as -no-jni\n -logcat enable logcat output with given tags\n -no-audio disable audio support\n -noaudio same as -no-audio\n -audio use specific audio backend\n -raw-keys disable Unicode keyboard reverse-mapping (deprecated)\n -radio redirect radio modem interface to character device\n -port TCP port that will be used for the console\n -ports , TCP ports used for the console and adb bridge\n -onion use overlay PNG image over screen\n -onion-alpha <%age> specify onion-skin translucency\n -onion-rotation 0|1|2|3 specify onion-skin rotation\n -dpi-device specify device's resolution in dpi (default 165)\n -scale scale emulator window (deprecated)\n -http-proxy make TCP connections through a HTTP/HTTPS proxy\n -timezone use this timezone instead of the host's default\n -dns-server use this DNS server(s) in the emulated system\n -cpu-delay throttle CPU emulation\n -no-boot-anim disable animation for faster boot\n -no-window disable graphical window display\n -version display emulator version number\n -report-console report console port to remote socket\n -gps redirect NMEA GPS to character device\n -keyset specify keyset file name\n -shell-serial specific character device for root shell\n -tcpdump capture network packets to file\n -bootchart enable bootcharting\n -charmap use specific key character map\n -prop = set system property on boot\n -shared-net-id join the shared network, using IP address 10.1.2.\n -nand-limits enforce NAND/Flash read/write thresholds\n -gpu set hardware OpenGLES emulation mode\n -camera-back set emulation mode for a camera facing back\n -camera-front set emulation mode for a camera facing front\n -webcam-list lists web cameras available for emulation\n -screen set emulated screen mode\n -force-32bit always use 32-bit emulator\n -selinux <disabled|permissive> Set SELinux to either disabled or permissive mode\n -unix-pipe Add to the list of allowed Unix pipes\n -fixed-scale Use fixed 1:1 scale for the initial emulator window.\n\n -qemu args... pass arguments to qemu\n -qemu -h display qemu help\n\n -verbose same as '-debug-init'\n -debug enable/disable debug messages\n -debug- enable specific debug messages\n -debug-no- disable specific debug messages\n\n -help print this help\n -help- print option-specific help\n\n -help-disk-images about disk images\n -help-keys supported key bindings\n -help-debug-tags debug tags for -debug \n -help-char-devices character specification\n -help-environment environment variables\n -help-keyset-file key bindings configuration file\n -help-virtual-device virtual device management\n -help-sdk-images about disk images when using the SDK\n -help-build-images about disk images when building Android\n -help-all prints all help content\n\n',
stderr: '',
exitCode: 1 }
The result of checking is Android Emulator installed is:

  • stdout: Android Emulator usage: emulator [options] [-qemu args]
    options:
    -list-avds list available AVDs
    -sysdir

    search for system disk images in
    -system read initial system image from
    -writable-system make system image writable after 'adb remount'
    -datadir write user data into
    -kernel use specific emulated kernel
    -ramdisk ramdisk image (default /ramdisk.img
    -image obsolete, use -system instead
    -initdata same as '-init-data '
    -data data image (default /userdata-qemu.img
    -partition-size system/data partition size in MBs
    -cache cache partition image (default is temporary file)
    -cache-size cache partition size in MBs
    -no-cache disable the cache partition
    -nocache same as -no-cache
    -sdcard SD card image (default /sdcard.img
    -snapstorage file that contains all state snapshots (default /snapshots.img)
    -no-snapstorage do not mount a snapshot storage file (this disables all snapshot functionality)
    -snapshot name of snapshot within storage file for auto-start and auto-save (default 'default-boot')
    -no-snapshot perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage
    -no-snapshot-save do not auto-save to snapshot on exit: abandon changed state
    -no-snapshot-load do not auto-start from snapshot: perform a full boot
    -snapshot-list show a list of available snapshots
    -no-snapshot-update-time do not do try to correct snapshot time on restore
    -wipe-data reset the user data image (copy it from initdata)
    -avd use a specific android virtual device
    -skindir search skins in (default /skins)
    -skin select a given skin
    -no-skin deprecated: create an AVD with no skin instead
    -noskin same as -no-skin
    -memory physical RAM size in MBs
    -accel Configure emulation acceleration
    -no-accel Same as '-accel off'
    -ranchu Use new emulator backend instead of the classic one
    -engine Select engine. auto|classic|qemu2
    -netspeed maximum network download/upload speeds
    -netdelay network latency emulation
    -netfast disable network shaping
    -code-profile enable code profiling
    -show-kernel display kernel messages
    -shell enable root shell on current terminal
    -no-jni disable JNI checks in the Dalvik runtime
    -nojni same as -no-jni
    -logcat enable logcat output with given tags
    -no-audio disable audio support
    -noaudio same as -no-audio
    -audio use specific audio backend
    -raw-keys disable Unicode keyboard reverse-mapping (deprecated)
    -radio redirect radio modem interface to character device
    -port TCP port that will be used for the console
    -ports , TCP ports used for the console and adb bridge
    -onion use overlay PNG image over screen
    -onion-alpha <%age> specify onion-skin translucency
    -onion-rotation 0|1|2|3 specify onion-skin rotation
    -dpi-device specify device's resolution in dpi (default 165)
    -scale scale emulator window (deprecated)
    -http-proxy make TCP connections through a HTTP/HTTPS proxy
    -timezone use this timezone instead of the host's default
    -dns-server use this DNS server(s) in the emulated system
    -cpu-delay throttle CPU emulation
    -no-boot-anim disable animation for faster boot
    -no-window disable graphical window display
    -version display emulator version number
    -report-console report console port to remote socket
    -gps redirect NMEA GPS to character device
    -keyset specify keyset file name
    -shell-serial specific character device for root shell
    -tcpdump capture network packets to file
    -bootchart enable bootcharting
    -charmap use specific key character map
    -prop = set system property on boot
    -shared-net-id join the shared network, using IP address 10.1.2.
    -nand-limits enforce NAND/Flash read/write thresholds
    -gpu set hardware OpenGLES emulation mode
    -camera-back set emulation mode for a camera facing back
    -camera-front set emulation mode for a camera facing front
    -webcam-list lists web cameras available for emulation
    -screen set emulated screen mode
    -force-32bit always use 32-bit emulator
    -selinux <disabled|permissive> Set SELinux to either disabled or permissive mode
    -unix-pipe Add to the list of allowed Unix pipes
    -fixed-scale Use fixed 1:1 scale for the initial emulator window.

    -qemu args... pass arguments to qemu
    -qemu -h display qemu help

    -verbose same as '-debug-init'
    -debug enable/disable debug messages
    -debug- enable specific debug messages
    -debug-no- disable specific debug messages

    -help print this help
    -help- print option-specific help

    -help-disk-images about disk images
    -help-keys supported key bindings
    -help-debug-tags debug tags for -debug
    -help-char-devices character specification
    -help-environment environment variables
    -help-keyset-file key bindings configuration file
    -help-virtual-device virtual device management
    -help-sdk-images about disk images when using the SDK
    -help-build-images about disk images when building Android
    -help-all prints all help content

  • stderr:
    Exec mono --version
    stdout: Mono JIT compiler version 5.0.0.100 (2017-02/9667aa6 Fri May 5 09:12:57 EDT 2017)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS: normal
    SIGSEGV: altstack
    Notification: kqueue
    Architecture: x86
    Disabled: none
    Misc: softdebug
    LLVM: yes(3.6.0svn-mono-master/8b1520c)
    GC: sgen (concurrent by default)

stderr:
Exec git --version
stdout: git version 2.12.0

stderr:
Exec gradle -v
stdout:
stderr: /bin/sh: gradle: command not found

Exec "/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/javac" -version
stdout:
stderr: javac 1.8.0_121

System information:
{ procInfo: 'nativescript/3.0.1',
platform: 'darwin',
os: 'Darwin Simons-MacBook-Pro.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64\n',
shell: '/usr/local/bin/zsh',
dotNetVer: null,
procArch: 'x64',
nodeVer: 'v6.10.0',
npmVer: '3.10.10',
javaVer: '1.8.0',
nodeGypVer: null,
xcodeVer: 'Xcode 8.3.2\nBuild version 8E2002\n',
xcodeprojGemLocation: '/Users/batsman/.rvm/gems/ruby-2.4.0@global/gems/xcodeproj-1.4.2/lib/xcodeproj.rb\n',
itunesInstalled: true,
cocoapodVer: '1.2.0',
adbVer: 'Android Debug Bridge version 1.0.36',
emulatorInstalled: true,
monoVer: null,
gitVer: '2.12.0',
gradleVer: null,
javacVersion: '1.8.0_121' }
Looking for project in '/Users/batsman/Works/tns-test/HelloWorld'
Project directory is '/Users/batsman/Works/tns-test/HelloWorld'.
Searching for devices...
startLookingForDevices; platform is ios
Starting to look for iOS devices.
Exec ps cax | grep launchd_sim
stdout: 4597 ?? S 0:01.27 launchd_sim

stderr:
Found device with identifier '1A967209-D45D-42E5-9C47-2A1E78828D49'
startLookingForDevices; platform is iOS
Exec ps cax | grep launchd_sim
stdout: 4597 ?? S 0:01.27 launchd_sim

stderr:
Validate options for platform: iOS
Initializing analytics statuses.
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'CLI' with value 'debug|ios'.
AnalyticsInstallationID: 5cee6a28-f648-4eb6-92ab-0f13009544d5
monitor not started
monitor not started
monitor not started
monitor has started, connecting to http://5752dabccfc54c4ab82aea9626b7338e.monitor-eqatec.com/json.ashx
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'NodeJSVersion' with value '6_10_0'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Working with project type' with value 'Pure JavaScript'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Changes info in prepare platform: ProjectChangesInfo {
appFilesChanged: false,
packageChanged: false,
appResourcesChanged: false,
nativeChanged: false,
configChanged: false }
Skipping prepare.
Skipping package build. No changes detected on the native side. This will be fast!
Skipping install.
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Deploy' with value 'iOS.emulator'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Device OS version' with value 'iOS_10.3'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
BeforeHookName for command livesync is before-livesync
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'LiveSync' with value 'iOS.emulator'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Analytics statuses:
{ TrackFeatureUsage: 0, TrackExceptions: 0 }
Trying to track feature 'Device OS version' with value 'iOS_10.3'.
Waiting for analytics to send information. Will check in a 1000ms.
Statistics was sent successfully (xhr).
Waiting for analytics to send information. Will check in a 1000ms. Remaining time is: 29000
Successfully synced application org.nativescript.HelloWorld on device 1A967209-D45D-42E5-9C47-2A1E78828D49.

Starting iOS Simulator
spawn: /Users/batsman/.nvm/versions/node/v6.10.0/bin/node "/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/node_modules/ios-sim-portable/lib/ios-sim-standalone.js" "launch" "/Users/batsman/Works/tns-test/HelloWorld/platforms/ios/build/emulator/HelloWorld.app" "org.nativescript.HelloWorld" "--logging" "--args=--nativescript-debug-start" "--waitForDebugger" "--skipInstall"

Setting up debugger proxy...
Press Ctrl + C to terminate, or disconnect.

Opened localhost 8080
To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/remote/serve_file/@02e6bde1bbe34e43b309d4ef774b1168d25fd024/inspector.html?experiments=true&ws=localhost:8080

Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
BeforeHookName for command watch is before-watch
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
AfterHookName for command livesync is after-livesync
spawn: lldb "-p" "5602"
(lldb) process attach --pid 5602
Process 5602 stopped

Executable module set to "/Users/batsman/Library/Developer/CoreSimulator/Devices/1A967209-D45D-42E5-9C47-2A1E78828D49/data/Containers/Bundle/Application/0A278B3E-50C6-4FDB-932B-68F07C86CD77/HelloWorld.app/HelloWorld".
Architecture set to: x86_64h-apple-ios.
(lldb) process continue
Process 5602 resuming
Found device with identifier 'bf8505579c9f8519bc5db60e456cf4968249ad12'
May 25 10:22:15 Simons-MacBook-Pro HelloWorld[5602]: objc[5602]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x1252c1cc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x1250d86f0). One of the two will be used. Which one is undefined.
May 25 10:22:15 Simons-MacBook-Pro HelloWorld[5602]: assertion failed: 16E195 14E269: libxpc.dylib + 64131 [624BAF4F-2E03-34F8-ACBA-970B04637786]: 0x7d
Lost device with identifier 'bf8505579c9f8519bc5db60e456cf4968249ad12'
Frontend client connected.
Backend socket created.
May 25 10:22:38 Simons-MacBook-Pro HelloWorld[5602]: NativeScript debugger attached.
Found device with identifier 'bf8505579c9f8519bc5db60e456cf4968249ad12'
Lost device with identifier 'bf8505579c9f8519bc5db60e456cf4968249ad12'
Event 'change' triggered for path: '/Users/batsman/Works/tns-test/HelloWorld/app/main-page.xml'
Syncing /Users/batsman/Works/tns-test/HelloWorld/app/main-page.xml
Removed files from syncQueue: []
Removed files from syncQueue: []
Changes info in prepare platform: ProjectChangesInfo {
appFilesChanged: true,
packageChanged: false,
appResourcesChanged: false,
nativeChanged: false,
configChanged: false }
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
BeforeHookName for command prepare is before-prepare
Executing before-prepare hook from /Users/batsman/Works/tns-test/HelloWorld/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook at location /Users/batsman/Works/tns-test/HelloWorld/hooks/before-prepare/nativescript-dev-android-snapshot.js in-process
Validating before-prepare arguments.
Hook completed
Preparing project...
Project successfully prepared (iOS)
Project dir from hooksArgs is: /Users/batsman/Works/tns-test/HelloWorld.
Hooks directories: [ '/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/hooks',
'/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/common/hooks',
'/Users/batsman/Works/tns-test/HelloWorld/hooks' ]
AfterHookName for command prepare is after-prepare
Executing after-prepare hook from /Users/batsman/Works/tns-test/HelloWorld/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook at location /Users/batsman/Works/tns-test/HelloWorld/hooks/after-prepare/nativescript-dev-android-snapshot.js in-process
Validating after-prepare arguments.
Hook completed
Will execute livesync for files: [ '/Users/batsman/Works/tns-test/HelloWorld/platforms/ios/HelloWorld/app/main-page.xml' ]
Transferring project files...
Transferring from /Users/batsman/Works/tns-test/HelloWorld/platforms/ios/HelloWorld/app/main-page.xml to /Users/batsman/Library/Developer/CoreSimulator/Devices/1A967209-D45D-42E5-9C47-2A1E78828D49/data/Containers/Bundle/Application/0A278B3E-50C6-4FDB-932B-68F07C86CD77/HelloWorld.app/app/main-page.xml
Successfully transferred main-page.xml.
Successfully synced application org.nativescript.HelloWorld on device 1A967209-D45D-42E5-9C47-2A1E78828D49.

(lldb) process detach
Error: This socket is closed
at Socket._writeGeneric (net.js:680:19)
at Socket._write (net.js:731:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at Socket.Writable.write (_stream_writable.js:247:11)
at Socket.write (net.js:658:40)
at WebSocket.webSocket.on (/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/lib/device-sockets/ios/socket-proxy-factory.js:109:34)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:191:7)
at Receiver._receiver.onmessage (/Users/batsman/.nvm/versions/node/v6.10.0/lib/node_modules/nativescript/node_modules/ws/lib/WebSocket.js:145:54)
IOSDeviceOperations disposed


In both cases, I just set the text of the `Label` line `28` in the `main-page.xml` file to `Tap on button`. And it crash.

If I can provide anything else to help you on this please le t me know (versions installed of various things, etc...)

edit:
Don't know if it can help but last time I had a crash at first debugger connexion (So even before modifying anything), I had this output in the console:

Error: connect ECONNREFUSED 127.0.0.1:18181
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

@dtopuzov
Copy link
Contributor

dtopuzov commented Jul 10, 2017

Hi @SBats

Do you still encounter the issues?

To be honest I have no ideas what cause the problem and I'm just guessing.
I see you use nvm and we have some cases when nvm caused issues, can you try the same with official node installation (or installation via brew).

@SBats
Copy link
Author

SBats commented Jul 11, 2017

Hi @dtopuzov, thank you for spending time on this!

Yes I still have this issue. I'll give a try without nvm to see if things get better (might be in a few days or a week though as I won't be working, and have time to uninstall and reinstall my projects :) ).
I'll let you know a soon as I have tried.

@pkoleva
Copy link
Contributor

pkoleva commented Jul 14, 2017

Related to #2456

@SBats
Copy link
Author

SBats commented Jul 22, 2017

I've tried a fresh install of both node v6 and v8 and I still got this issue.
I'm wondering if it can't come from some of my browser extensions or my xcode / emulator installation.
I'll try to do a full toolchain cleaning and let you know.

If it ever could be interesting, here is another error I had after reopening connexion between the debugger and the instance of tns debug. (But it was while trying with node v8 which support comes with 3.2 as I've understood)

Error: This socket is closed
    at Socket._writeGeneric (net.js:721:18)
    at Socket._write (net.js:781:8)
    at doWrite (_stream_writable.js:371:12)
    at writeOrBuffer (_stream_writable.js:357:5)
    at Socket.Writable.write (_stream_writable.js:274:11)
    at Socket.write (net.js:699:40)
    at WebSocket.webSocket.on (/usr/local/lib/node_modules/nativescript/lib/device-sockets/ios/socket-proxy-factory.js:109:34)
    at emitTwo (events.js:125:13)
    at WebSocket.emit (events.js:213:7)
    at Receiver._receiver.onmessage (/usr/local/lib/node_modules/nativescript/node_modules/ws/lib/WebSocket.js:145:54)
    at Receiver.dataMessage (/usr/local/lib/node_modules/nativescript/node_modules/ws/lib/Receiver.js:385:14)
    at extension.decompress (/usr/local/lib/node_modules/nativescript/node_modules/ws/lib/Receiver.js:345:40)
    at _inflate.flush (/usr/local/lib/node_modules/nativescript/node_modules/ws/lib/PerMessageDeflate.js:279:12)
    at afterWrite (_stream_writable.js:438:3)
    at onwrite (_stream_writable.js:429:7)
    at InflateRaw.afterTransform (_stream_transform.js:90:3)
Jul 22 08:48:47 Simons-MBP mobileapp[7279]: NativeScript debugger detached.
Jul 22 08:48:47 Simons-MBP mobileapp[7279]: NativeScript debugger encountered Error Domain=NSPOSIXErrorDomain Code=9 "Bad file descriptor".

@pkoleva
Copy link
Contributor

pkoleva commented Jul 31, 2017

Hi @SBats,

I've found one question in apple's discussion that refers to the same error as yours -> "NSPOSIXErrorDomain" and I'm sending you a link to it if you could try the suggestions there and get back with the results.
It seems I cannot reproduce this issue on my setup.

Hope this helps!

@SBats
Copy link
Author

SBats commented Jul 31, 2017

Thank you a lot for digging this!
It didn't exactly solve my problem, but by keep looking for things with this error. I stumble upon a thread about max file settings on macos. I had previous issues with this so I've tried to bump my limit way above what it was, and I don't seem to have this issue anymore.
I think we can safely close it for now. I'll reopen it if this issue ever comes back, but seems good right now!

Thank you a lot for your help!

TLDR: This issue seemed to be caused by a too small limit of simultaneously opened file on mac os system. You can increase it following those instructions.
https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1

@SBats SBats closed this as completed Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants