nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

Livesync android device using 1.5 - ENAMTOOLONG error

Open N3ll opened this issue 11 years ago • 15 comments

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

N3ll avatar Nov 25 '15 11:11 N3ll

+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)

bradmartin avatar Nov 25 '15 15:11 bradmartin

+1

victorhugom-zz avatar Nov 25 '15 20:11 victorhugom-zz

+1

My output http://pastebin.com/26KqbRzy

afortaleza avatar Nov 26 '15 01:11 afortaleza

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.

afortaleza avatar Nov 26 '15 02:11 afortaleza

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 .

bradmartin avatar Nov 26 '15 03:11 bradmartin

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'.

kvelikov avatar Nov 26 '15 07:11 kvelikov

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)

BenElliottBV avatar Nov 26 '15 14:11 BenElliottBV

Can this be prioritized and patched? LiveSync is dead on windows. Is there a workaround or anything, 'tns run' is just too time consuming.

bradmartin avatar Nov 30 '15 17:11 bradmartin

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:

  1. git clone [email protected]:NativeScript/nativescript-cli.git
  2. cd nativescript-cli
  3. git submodule init
  4. git checkout release
  5. git submodule update
  6. npm i -g grunt-cli
  7. npm install
  8. grunt
  9. Add <path to nativescript-cli>/bin to your PATH
  10. Restart your shell/command prompt.
  11. Verify nativescript is used from bin folder by executing where tns and 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.

rosen-vladimirov avatar Nov 30 '15 17:11 rosen-vladimirov

Thanks for the steps to build the source. I forgot about, hopefully this will help the others. Thanks again!

bradmartin avatar Nov 30 '15 17:11 bradmartin

One other option is the master is built everyday on nativescript.rocks you can just do a npm install right from nativescript.rocks

NathanaelA avatar Nov 30 '15 20:11 NathanaelA

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?

bradmartin avatar Nov 30 '15 20:11 bradmartin

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.

lyonzy avatar Nov 30 '15 23:11 lyonzy

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 avatar Dec 01 '15 04:12 bradmartin

@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.

NathanaelA avatar Dec 01 '15 16:12 NathanaelA