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.
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!
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!
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 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-
Most helpful comment
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