Skip to content

livesync EISDIR error when changing ".ts" file. #1900

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
Bohmaster opened this issue Jul 4, 2016 · 1 comment
Closed

livesync EISDIR error when changing ".ts" file. #1900

Bohmaster opened this issue Jul 4, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@Bohmaster
Copy link

Bohmaster commented Jul 4, 2016

I've opened this issue because some people have had very similar problems regarding livesync in an android development (the seed repo I'm using brings Angular2 and Typescript to the scene).

The build and emulation process works fine (Tested on Ubuntu 14.04 and Windows 7 with the same result). Whenever I make a change or add a file, all the watchers and tasks are working fine. If I touch an "html" or "tns" file livesync works as expected reloading and showing the edited file.

Except when I edit a "ts" or "js" file. The change is detected but just before the "Project succesfuly prepared" instance, I suddenly get this error:

"Unable to sync files. Error is: EISDIR: illegal operation on a directory, read"

After that, every change I make (even now whit "html" or "tns" files) it's working fine until "Project succesfuly prepared" shows again before the EISDIR finally takes over.

I've tried different environment configuration (from node 4.X to 6.X && npm 2 to 3.10) and operating systems.

This (and a bunch of other developers) is making us not to truly dive in in the Nativescript + Angular 2 world. Every change I make I have to restart the process all over again.

We don't know if this a "nativescript" bug or a https://github.com/NathanWalker/angular2-seed-advanced one. This advanced seed from @NathanWalker is very useful to get up and running quickly with great technologies (NScript, NG2, NG/RX, TScript) and to start using Nativescript in depth.

The framework is great and we want to use it intensively and to colaborate aside. I hope we can bring some insight as soon as possible so I don't force my self to use React (time is running out).

I leave here as much as information we gathered.

My actual environment

Windows 7 (sp1) 64 bits
Node: v5.6.0
npm: v3.10.6
Latest stable nativescript version

(Installed through Nativescript's offical tutorial)

This this the explicit error:

"Unable to sync files. Error is: EISDIR: illegal operation on a directory, read"

This is the output of --log trace during "tns livesync android --watch --emulate"

log.txt

This is the last trace before the error is thrown (I've selected the first two "spawn" outputs. There is a lot of them showing differents paths.

**Project successfully prepared
AfterHookName for command prepare is after-prepare**

spawn: C:\Users\voidhmaster\AppData\Local\Android\android-sdk\platform-tools\adb "-s" "192.168.155.101:5555" "shell" "ls" "-l" "/data/local/tmp"
Result when throw error is false:
{ stdout: 'drwxrwxrwx root     root              2016-07-03 02:29 com.yourdomain.appname\r\r\n',
  stderr: '',
  exitCode: 0 }
spawn: C:\Users\voidhmaster\AppData\Local\Android\android-sdk\platform-tools\adb "-s" "192.168.155.101:5555" "shell" "rm" "-rf" "/data/local/tmp/com.yourdomain.appname/fullsync" "/data/local/tmp/com.yourdomain.appname/sync" "/data/local/tmp/com.yourdomain.appname/removedsync"
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 0 }

This is the original seed issue

NathanWalker/angular-seed-advanced#148

It could be related to this: #1810
and this: #1872

Thank you for building such a wonderful tool. I'm from Argentina and this is magic to me. I hope to dive in deeply as soon as possible. This is THE ONLY ONE error that is stopping us from code.

Cheers

@tsonevn @m-abs

@m-abs
Copy link

m-abs commented Jul 4, 2016

I'm experiencing the same problem with the angular2-seed-advanced, but on Linux.

From my log:

spawn: /home/mabs/tools/android/android-sdk-linux/platform-tools/adb "-s" "emulator-5554" "shell" "chmod" "0777" "/data/local/tmp/dk.nota.lyt3/sync/assets"
Result when throw error is false:
{ stdout: 'chmod: /data/local/tmp/dk.nota.lyt3/sync/assets: No such file or directory\r\n',
  stderr: '',
  exitCode: 0 }
Unable to sync files. Error is: EISDIR: illegal operation on a directory, read

In the angular2-seed-advanced, the folders nativescript/app/app and nativescript/app/assets are symlinks to src/client/app and src/client/assets. "nativescript" being the base/root-folder for the nativescript part of the project.
I tried to use "mount -o bind src/client/app nativescript/app/app && mount -o bind src/client/assets nativescript/app/assets" and it seems to have solved the problem for me.
So it looks like the problem is caused by the symlinks, at least on Linux.

I'm running nativescript-cli v2.1 and nodejs 6.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants