Skip to content

tns run ios issue with 2.5.0 - unable to sync files on iOS Simulator #2476

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
vchimev opened this issue Feb 2, 2017 · 21 comments
Closed

tns run ios issue with 2.5.0 - unable to sync files on iOS Simulator #2476

vchimev opened this issue Feb 2, 2017 · 21 comments

Comments

@vchimev
Copy link

vchimev commented Feb 2, 2017

Output:

Unable to sync files. Error is: cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/toddanglin/Library/Developer/CoreSimulator/Devices/50DFBA8C-A077-4EB4-B49F-93D2FAE13810/data/Containers/Bundle/Application/6878EDAF-504B-4366-9CE4-B5A97870EA3C/ns-demo.app/Resources/en.lproj/Localizable.strings

Seems to fail with the same error on different files in “/Resources/en.lproj”. Here it’s “Localizable.strings.” Sometimes it’s “InfoPlist.strings”.

@vchimev vchimev added this to the 2.5.1 milestone Feb 2, 2017
@vchimev vchimev changed the title tns run ios issue with 2.5.0 tns run ios issue with 2.5.0 - unable to sync files on iOS Simulator Feb 2, 2017
@Plamen5kov
Copy link
Contributor

Plamen5kov commented Feb 2, 2017

How to reproduce:
Add folder or file to <project_name>/app folder once an application is created with any template.

@JuanDelgadillo
Copy link

JuanDelgadillo commented Feb 3, 2017

I got the same problem over here. I'm using the plugin nativescript-i18n and when I make a first change after run tns run ios it refresh the app but with next changes it throws that error and does not reload the app anymore. I'm using tns 2.5.0

@toddanglin
Copy link

+1 I've go the same situation as @JuanDelgadillo. Building on Mac for iOS, targeting the simulator.

tns run ios --emualtor will work the first time and do one LiveSync. After that, it errors-out with the copyFileSync errors. Current workaround is to simply kill the running command and restart tns run.

@ludwiktrammer
Copy link

I'm experiencing the problem while using nativescript-dev-sass. I'm able to run the app using "tns run android", but as soon as I touch a single .scss file NativeScript tries to sync and everything blow ups. Here is the relevant issue in nativescript-dev-sass bugtracker: NativeScript/nativescript-dev-sass#18

@vance
Copy link

vance commented Apr 28, 2017

I still get this in tns --version 2.5.4. The first time is fine, but on 2nd run, my assets directory fails every time since I added images to it.

[1] Transferring project files...
[1] Unable to sync files. Error is: EEXIST: file already exists, mkdir '... /assets '

@lukeramsden
Copy link

I still get this aswell.

@pkoleva
Copy link
Contributor

pkoleva commented May 12, 2017

Hey, @vance @lukeramsden,
We've released 2.5.5 and 3.0.1 with another fix that references this problem. Would you like to give it a try and write back with the results. Meanwhile I'll reopen the issue.

@pkoleva pkoleva reopened this May 12, 2017
@dtopuzov
Copy link
Contributor

@vance @lukeramsden Can you reproduce the problem with hello-world app?

I believe it is an issue caused by nativescript-dev-sass, nativescript-i18n or some other plugin.
If the issue is caused by some 3rd party plugin we should log it in plugin's repo.

@lukeramsden
Copy link

@dtopuzov I will try tomorrow, and I use both of those plugins :P

@toddanglin
Copy link

FWIW, the nativescript-dev-sass plugin should be updated and working as expected in NativeScript 2.5.x and 3.x. Let me know if you encounter an issue and we'll try to troubleshoot.

@dtopuzov
Copy link
Contributor

dtopuzov commented May 13, 2017

@lukeramsden pelase also post versions of nativescript-dev-sass and nativescript-i18n plugings in your proejct, it might hapen that it is plugin problem that is fixed in newer versions of the plugin.

@dtopuzov
Copy link
Contributor

@lukeramsden Any update on this?

@lukeramsden
Copy link

@dtopuzov Sorry I didn't get a chance to test it, been very busy releasing the app.

@shakes90
Copy link

I'm getting a similar problem with the latest version of nativescript 3.0.1 - Very basic setup on Ubuntu 16.04 although my colleagues who work in a windows environment tell my live-sync is OK for them - error as follows when edit a basic ts file from the Hello world app and save:

Executing before-prepare hook from /home/simon/projects/nativescript/HelloWorld/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/simon/projects/nativescript/HelloWorld/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (android)
Executing after-prepare hook from /home/simon/projects/nativescript/HelloWorld/hooks/after-prepare/nativescript-dev-android-snapshot.js
Transferring project files...
Unable to sync files. Error is: Multiple errors were thrown:
ENOENT: no such file or directory, stat '/home/simon/projects/nativescript/HelloWorld/platforms/android/src/main/assets/app/app.component.ts___jb_tmp___'

@shakes90
Copy link

OK - found the answer to the above problem - Intellij saves temp files as a "safe write" option which was causing the issue. So if turn off evrything is OK. System Settings => "Use safe write" in intellij

@dtopuzov
Copy link
Contributor

dtopuzov commented May 30, 2017

Hi @shakes90

It looks you are hitting #2720 which is already fix in master branch.

If you want to try it:

npm un -g nativescript 
npm cache clean
npm i -g nativescript@next

@pkoleva pkoleva removed this from the 2.5.1 milestone Jun 6, 2017
@Nikoms
Copy link

Nikoms commented Jun 8, 2017

@shakes90 is right

On linux I didn't have this issue on NS 2.5, and I have it now on 3.0

@dtopuzov
Copy link
Contributor

dtopuzov commented Jun 8, 2017

Hi @Nikoms,

The issue @shakes90 is different from the original issue in this thread.
It is already fixed in code base, available in @next builds and will be released in 3.1.0.

How to test with @next builds:

npm un -g nativescript
npm cache clean
npm i -g nativescript@next

@dtopuzov
Copy link
Contributor

dtopuzov commented Jun 8, 2017

Closing this issue since tns run ios works property in general.

Reported issues are either problem with specific plugin (should be addressed by plugin itself) or not related with the original issue (the problem with temp files on linux).

@dtopuzov dtopuzov closed this as completed Jun 8, 2017
@RoyiNamir
Copy link

RoyiNamir commented May 29, 2018

No. This problem returned on TNS 4. ( already reported here #3630)

Look at this screen where my app is On :

image

Now let's change something in the code

image

See error :

image

It didn't happen before in v 3
Files are read only due to TFS. But it did work before v4.

complete package.json :

https://gist.github.com/RoyiNamir/c7adb7454b075369b0d325b88575f374

@dtopuzov
Copy link
Contributor

dtopuzov commented Jun 8, 2018

Hi @RoyiNamir

Thanks for logging it at separate issue, we will investigate and post updates there.

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