Livesync android device using 1.5 - ENAMTOOLONG error
From @GitCharm on November 25, 2015 10:53
Using NS 1.5 - calling tns livesync android using a connected android device is generating the following error:
Project successfully prepared Transferring project files... spawn ENAMETOOLONG
What does this mean and is there something I can change at my end?
Copied from original issue: NativeScript/NativeScript#1155
+1 same issue after updating to 1.5
tns livesync android --watch
also throws the same error.
tns doctor
is reporting no issues.
I've also uninstalled the application on the device, then ran livesync to install it. Same result.
--log trace
ends up with the error at FiberFuture.Future.wait (..\node_modules\nativescript\node_modules\fibers\future.js:535:15)
+1
+1
My output http://pastebin.com/26KqbRzy
I have setup nativescript 1.5 in a VM running Linux (Xubuntu 15.04) and the problem does not happen there. It's probably a windows related issue.
Yea I think windows has a file path limit of 256 and it's an issue with many node programs. There was even a really long thread on npm github about file paths and how node does folders/files.
On 8:43pm, Wed, Nov 25, 2015 Anderson Fortaleza [email protected] wrote:
I have setup nativescript 1.5 in a VM running Linux (Xubuntu 15.04) and the problem does not happen there. It's probably a windows related issue.
— Reply to this email directly or view it on GitHub https://github.com/NativeScript/nativescript-cli/issues/1246#issuecomment-159787331 .
Hi guys, I have the same problem. This is the log I get: Error: spawn ENAMETOOLONG at FiberFuture.Future.wait (C:\Users\kvelikov\AppData\Roaming\npm\node_modul es\nativescript\node_modules\fibers\future.js:535:15) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\commo n\errors.js:109:33 at Function.settle (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativ escript\node_modules\fibers\future.js:249:26) at FiberFuture.Future.wait (C:\Users\kvelikov\AppData\Roaming\npm\node_modul es\nativescript\node_modules\fibers\future.js:534:10) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\commo n\services\commands-service.js:87:106 at Function.settle (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativ escript\node_modules\fibers\future.js:249:26) at FiberFuture.Future.wait (C:\Users\kvelikov\AppData\Roaming\npm\node_modul es\nativescript\node_modules\fibers\future.js:534:10) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\commo n\dispatchers.js:38:85 at Function.settle (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativ escript\node_modules\fibers\future.js:249:26) at FiberFuture.Future.wait (C:\Users\kvelikov\AppData\Roaming\npm\node_modul es\nativescript\node_modules\fibers\future.js:534:10) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\nativ escript-cli.js:20:45 - - - - - at exports._errnoException (util.js:874:11) at ChildProcess.spawn (internal/child_process.js:298:11) at Object.exports.spawn (child_process.js:339:9) at ChildProcess.spawn (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\na tivescript\lib\common\child-process.js:46:30) at ChildProcess.spawnFromEvent (C:\Users\kvelikov\AppData\Roaming\npm\node_m odules\nativescript\lib\common\child-process.js:54:33) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\commo n\mobile\android\android-debug-bridge.js:15:40 at Function.settle (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativ escript\node_modules\fibers\future.js:249:26) at FiberFuture.Future.wait (C:\Users\kvelikov\AppData\Roaming\npm\node_modul es\nativescript\node_modules\fibers\future.js:534:10) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\commo n\mobile\android\android-device-file-system.js:44:66 at Function.settle (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativ escript\node_modules\fibers\future.js:249:26) at FiberFuture.Future.wait (C:\Users\kvelikov\AppData\Roaming\npm\node_modul es\nativescript\node_modules\fibers\future.js:534:10) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\commo n\services\usb-livesync-service-base.js:143:106 at Function.settle (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativ escript\node_modules\fibers\future.js:249:26) at FiberFuture.Future.wait (C:\Users\kvelikov\AppData\Roaming\npm\node_modul es\nativescript\node_modules\fibers\future.js:534:10) at C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativescript\lib\commo n\services\usb-livesync-service-base.js:189:121 at Function.settle (C:\Users\kvelikov\AppData\Roaming\npm\node_modules\nativ escript\node_modules\fibers\future.js:249:26) Analytics statuses: { TrackFeatureUsage: 1, TrackExceptions: 0 } Trying to track feature 'CLI' with value 'help'. List of registered commands: /?, autocomplete, autocomplete|disable, autocomplet e|enable, autocomplete|status, build, build|android, build|ios, create, debug, d ebug|android, debug|ios, deploy, dev-post-install, dev-preuninstall, dev-test, d ev-test|android, dev-test|ios, device, device|android, device|get-file, device|i os, device|list-applications, device|list-files, device|log, device|put-file, de vice|run, device|stop, device|uninstall, doctor, emulate, emulate|android, emula te|ios, error-reporting, help, init, install, library, library|add, livesync, pl atform, platform|add, platform|remove, platform|update, plugin, plugin|add, plug in|remove, prepare, run, run|android, run|ios, test, test|android, test|init, te st|ios, usage-reporting Reading help for command 'livesync'. FileName is 'livesync.md'.
I also get this issue - log ends with the same issue as @bradmartin -
ends up with the error at FiberFuture.Future.wait (..\node_modules\nativescript\node_modules\fibers\future.js:535:15)
Can this be prioritized and patched? LiveSync is dead on windows. Is there a workaround or anything, 'tns run' is just too time consuming.
Hi @bradmartin , The issue is already fixed in our release branch and in case it is urgent for you, I suggest you to build the nativescript-cli source on your own. Here are the base steps that you have to execute:
- git clone [email protected]:NativeScript/nativescript-cli.git
- cd nativescript-cli
- git submodule init
- git checkout release
- git submodule update
- npm i -g grunt-cli
- npm install
- grunt
- Add
<path to nativescript-cli>/binto your PATH - Restart your shell/command prompt.
- Verify nativescript is used from bin folder by executing
where tnsand make sure the first result is the PATH from step 8
Now you can execute any tns command directly and the ENAMETOOLONG error should not exist anymore :)
The official fix will be included in our incoming 1.5.1 release.
Thanks for the steps to build the source. I forgot about, hopefully this will help the others. Thanks again!
One other option is the master is built everyday on nativescript.rocks you can just do a npm install right from nativescript.rocks
I think I tried that but still had the error @NathanaelA. I assumed I was doing something wrong. I'll try again and let you know if that works out. Can you confirm that the patch fixes this on windows or anyone else?
If you want a hack solution, I just compiled the typescript files here and copied them over the javascript in \node_modules\nativescript\lib\common\mobile\android. I can confirm that the issue seems to be fixed on windows.
Thanks @NathanelA and @Iyonzy. Using the nativescript.rocks build fixed it. I just had to find the folder where it was installing. It wasn't overwriting my Nativescript cli from 1.5 so I had to copy it over. Thanks again.
@bradmartin That is weird; it should have overwritten in if you did
npm install -g http://nativescript.rocks/master/nativescript-cli-master.tgz
It looks like I forgot to put -g in the instructions on nativescript.rocks; I'll get that fixed.