_From @S4M37 on February 3, 2017 14:27_
I'm using NativeScript 2.5.0 with Angular2, using android platform with building tool 25.0.2, I'm testing on a device, and tns doctor no issues are found. So my problem is when running 'tns run android' the app is launched but no changes are applied, here is the log
Project successfully prepared (android)
Transferring project files...
Unable to sync files. Error is: ENOENT: no such file or directory, stat 'C:\Users\S4M37\Desktop\CrossPlatform\project\platforms\android\srcmain\assets\app\modules\feed\item\feed.item.css___jb_tm
p___'
02-03 15:16:18.512 5693 5693 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.project/sync/tns_modules/rxjs/src/MiscJSDoc.ts
02-03 15:16:18.532 5335 5335 E audit : type=1400 msg=audit(1486131378.512:526786): avc: denied { unlink } for pid=5693 comm="tivescript.project" name="MiscJSDoc.ts" dev="dm-1" ino=335142 s
context=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
02-03 15:16:18.562 5693 5693 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.project/sync/tns_modules/rxjs/src/observable/dom/MiscJSDoc.ts
02-03 15:16:18.582 5335 5335 E audit : type=1400 msg=audit(1486131378.562:526982): avc: denied { unlink } for pid=5693 comm="tivescript.project" name="MiscJSDoc.ts" dev="dm-1" ino=335340 s
context=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
JS: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
02-03 15:16:22.322 5693 5693 W ExifInterface: at com.tns.Runtime.callJSMethodNative(Native Method)
_Copied from original issue: NativeScript/NativeScript#3569_
Also experiencing this error after updating to 2.5
Had the same problem. Removing and adding again the android platform fixed the error, but now the app crashes for the tiniest UI changes without any error. I have to restart the app every time to get it working again.
I had already tried removing the platform and re-adding it, but the problem still persisting.
Same here ! Problem also occured without using Angular.
+1
@alpinparker @S4M37 @rhanbIT @RaphaelJenni, can you provide steps to reproduce. What devices are you using?
Can't reproduce it. Happens from time to time and then I have to restart the app. (tns run android)
I'm using the android emulator. Haven't tried it on a physical device.
Happened again:
Transferring project files...
Unable to sync files. Error is: ENOENT: no such file or directory, stat 'C:\_Projects\_NativeScript\project\platforms\android\src\main\assets\app\tns_modules\sharp\build\Release\obj\libvips-cpp\libvips-cpp.tlog\link-VCTIP.delete.93.tlog'
The folder sharp doesn't exist. Is sharp a necessary import? Added it now to the dependencies ("sharp": "^0.16.2"). I will keep you updated if it changes anything.
I'm testing on Samsung Galaxy S7, android 6.0.1
I run tns run android, it builds the app, installs it on device then after each changes the app is refreshed but without synchronizing files with the same error mentioned in the issue, to synchronize files I stop the processes and re-run tns run android.
same issue , testing on genymotion Google Nexus 7 API 22 emulator .
same here, using Samsung Note 7 device.
NativeScript Debugger started
[NSDebugAdapter] Ready to attach to application on 40000
[NSDebugAdapter] Connection to target application established on 40000
Executing before-watch hook from c:\SORTE\src\SORTE.Mobile\hooks\before-watch\nativescript-dev-typescript.js
Found peer TypeScript 2.1.502-10 12:30:28.051 22470 22470 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/com.sortenasvendas.app/sync/tns_modules/lodash/fp/toJSON.js
02-10 12:30:28.091 6849 6849 E audit : type=1400 msg=audit(1486737028.051:404395): avc: denied { unlink } for pid=22470 comm="tenasvendas.app" name="toJSON.js" dev="sda17" ino=397221 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
02-10 12:30:29.251 6849 6849 E audit : type=1400 msg=audit(1486737029.221:407491): avc: denied { unlink } for pid=22470 comm="tenasvendas.app" name="MiscJSDoc.ts" dev="sda17" ino=400321 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
02-10 12:30:30.121 22470 22470 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/com.sortenasvendas.app/sync/tns_modules/rxjs/src/MiscJSDoc.ts
02-10 12:30:30.151 6849 6849 E audit : type=1400 msg=audit(1486737030.121:409914): avc: denied { unlink } for pid=22470 comm="tenasvendas.app" name="MiscJSDoc.ts" dev="sda17" ino=402740 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
02-10 12:30:30.181 22470 22470 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/com.sortenasvendas.app/sync/tns_modules/rxjs/src/observable/dom/MiscJSDoc.ts
02-10 12:30:30.221 6849 6849 E audit : type=1400 msg=audit(1486737030.181:410108): avc: denied { unlink } for pid=22470 comm="tenasvendas.app" name="MiscJSDoc.ts" dev="sda17" ino=402936 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
JS: Firebase.init done
Hey guys,
The issue reported by @S4M37 is in fact two separate issues.
The first one: Unable to sync files. Error is: ENOENT: no such file or directory, stat 'C:\Users\S4M37\Desktop\CrossPlatform\project\platforms\android\src\main\assets\app\modules\feed\item\feed.item.css___jb_tm
p___' should be resolved with our incoming 2.5.1 release.
The other one:
02-03 15:16:18.562 5693 5693 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.project/sync/tns_modules/rxjs/src/observable/dom/MiscJSDoc.ts is something specific for some devices, I believe mostly Samsung ones. I'm still unable to reproduce it on my side, so most probably we'll release 2.5.1 without fix for this. Once we reproduce the problem, we'll provide a fix as soon as possible. In order to help us, can you please try reproducing the EACCESS error with tns run android --log trace and send us the output of the command when the error happened.
After that, try executing the following:
$ adb shell -s <device id>
$ cd /data/local/tmp/
$ ls -la
$ cd <app id> (for example `cd org.nativescript.project`)
$ ls -al
$ ls -al sync
and send us the output of all these commands. This will help us to detect the permissions of the files and to understand what migth cause this issue.
Thanks in advance for your help!
Hi there ,
am already signed up on Github and I tried to run those commands on the
Github Command Line Interface ,but not able to know how to install the
nativescript cli.
Regards,
Palak Grover
On Sat, Feb 18, 2017 at 2:18 PM, Angel Tsvetkov notifications@github.com
wrote:
Hi Guys,
In regards of the second error I think I figured out why this happens. In
my AndroidManifest.xml file in my NativeScript project the
android:minSdkVersion="17". There is a user permission for write external
storage:
According to Android documentation WRITE_EXTERNAL_STORAGE starting in API
level 19 is not required to read/write files in your application-specific
directories (documentation
https://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE).
My test device is Samsung Galaxy S5 with Android 6.0.1 (API 23). I think
that the issue comes when you request user permission
WRITE_EXTERNAL_STORAGE on Android API > 18.
The solution I found is to set android:maxSdkVersion="18" attribute to
WRITE_EXTERNAL_STORAGE user-permission (documentation
https://developer.android.com/guide/topics/manifest/uses-permission-element.html)
so it looks like:
android:maxSdkVersion="18"/> Don't forget to remove platform (tns platform remove android) and then
re-run your app.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/NativeScript/nativescript-cli/issues/2485#issuecomment-280832069,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYiZ-9Rjcl99s8GWkfqY5xYzMIOcDilNks5rdrBqgaJpZM4L2anI
.
Hey everyone,
We've released NativeScript 2.5.1, can you give it a try and see if it resolves your issues? In order to update your CLI's installation, please execute:
$ npm install -g nativescript@latest
I'm looking forward to hearing from you.
Thx, when updating to nativescript 2.5.1 the sync file issue is resolved for me. And thx for @Palak5034 too because his solution resolves the EACCES issues.
Hey @S4M37 , can you give some information how did you resolve the EACCESS issue, so other users reading this thread will be able to find the solution as well.
I resolved it by editing the AndroidManifest.xml of the App_resources, by excluding the permission check for Android Api >18 with :
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18"/>
according to @Palak5034 comment on this issue
Fix the issue for me on Linux :smile:
Windows, CLI 2.5.2
tns run android --log trace
...
Successfully synced application org.test.app on device 32042064931e22df.
BeforeHookName for command watch is before-watch
Executing before-watch hook from C:\projects\Test\hooks\before-watch\nativescript-dev-typescript.js
Executing before-watch hook at location C:\projects\Test\hooks\before-watch\nativescript-dev-typescript.js in-process
Validating before-watch arguments.
Found peer TypeScript 2.1.6
C:\Program Files\nodejs\node.exe --max_old_space_size=4096 C:\projects\Test\node_modules\typescript\lib\tsc.js --project C:\projects\Test --watch --inlineSourceMap --inlineSources
Hook promises to signal completion
13:53:23 - Compilation complete. Watching for file changes.
Hook completed
03-17 13:53:27.109 3936 3936 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.test.app/sync/tns_modules/nativescript-angular/node_modules/rxjs/src/MiscJSDoc.ts
03-17 13:53:27.274 3487 3487 E audit : type=1400 msg=audit(1489751607.109:948223): avc: denied { unlink } for pid=3936 comm="org.test.app" name="MiscJSDoc.ts" dev="mmcblk0p21" ino=335337 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file
03-17 13:53:27.279 3487 3487 E audit : type=1302 msg=audit(1489751607.109:948223): item=1 name="/data/local/tmp/org.test.app/sync/tns_modules/nativescript-angular/node_modules/rxjs/src/MiscJSDoc.ts" inode=335337 dev=103:0d mode=0100666 ouid=2000 ogid=2000 rdev=00:00 obj=u:object_r:shell_data_file:s0
03-17 13:53:27.824 3936 3936 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.test.app/sync/tns_modules/nativescript-angular/node_modules/rxjs/src/observable/dom/MiscJSDoc.ts
03-17 13:53:28.004 3487 3487 E audit : type=1400 msg=audit(1489751607.819:948416): avc: denied { unlink } for pid=3936 comm="org.test.app" name="MiscJSDoc.ts" dev="mmcblk0p21" ino=335532 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file
03-17 13:53:28.009 3487 3487 E audit : type=1302 msg=audit(1489751607.819:948416): item=1 name="/data/local/tmp/org.test.app/sync/tns_modules/nativescript-angular/node_modules/rxjs/src/observable/dom/MiscJSDoc.ts" inode=335532 dev=103:0d mode=0100666 ouid=2000 ogid=2000 rdev=00:00 obj=u:object_r:shell_data_file:s0
03-17 13:53:34.879 3936 3936 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.test.app/sync/tns_modules/rxjs/src/MiscJSDoc.ts
03-17 13:53:35.094 3487 3487 E audit : type=1400 msg=audit(1489751614.869:949932): avc: denied { unlink } for pid=3936 comm="org.test.app" name="MiscJSDoc.ts" dev="mmcblk0p21" ino=337866 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file
03-17 13:53:35.099 3487 3487 E audit : type=1302 msg=audit(1489751614.869:949932): item=1 name="/data/local/tmp/org.test.app/sync/tns_modules/rxjs/src/MiscJSDoc.ts" inode=337866 dev=103:0d mode=0100666 ouid=2000 ogid=2000 rdev=00:00 obj=u:object_r:shell_data_file:s0
03-17 13:53:35.719 3936 3936 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.test.app/sync/tns_modules/rxjs/src/observable/dom/MiscJSDoc.ts
03-17 13:53:35.974 3487 3487 E audit : type=1400 msg=audit(1489751615.714:950125): avc: denied { unlink } for pid=3936 comm="org.test.app" name="MiscJSDoc.ts" dev="mmcblk0p21" ino=338061 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file
03-17 13:53:35.979 3487 3487 E audit : type=1302 msg=audit(1489751615.714:950125): item=1 name="/data/local/tmp/org.test.app/sync/tns_modules/rxjs/src/observable/dom/MiscJSDoc.ts" inode=338061 dev=103:0d mode=0100666 ouid=2000 ogid=2000 rdev=00:00 obj=u:object_r:shell_data_file:s0
...
Afterwards can't get past this one:
adb shell -s 32042064931e22df
/system/bin/sh: /system/bin/sh: - : unknown option
I can report the same issue. I am running into it now:
AfterHookName for command livesync is after-livesync
03-19 08:26:40.274 19346 19346 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/com.pame.payroll/sync/tns_modules/rxjs/src/MiscJSDoc.ts
I can't seem to get around it. I am running and building on Windows 10.
Hey all, would you try our 3.0 RC (nativescript@rc) release and check if you still experience these problems and if so write back with specific steps to reproduce.
@jwuliger @dxshindeo @smarza @AbbeYassine @danieljohngomez @RaphaelJenni
I was getting this error so I installed the 3.0 RC on Windows 10. I then created a new project using the tns create MyApp --template tns-template-hello-world-ng@rc command. Still got the same error with tns run android on my Galaxy S6. Doesn't seem to stop the app from running. Only does this on my phone, the emulator is fine.
03-30 21:48:36.604 26548 26548 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.Wisps/sync/tns_modules/rxjs/src/MiscJSDoc.ts
03-30 21:48:36.624 6857 6857 E audit : type=1400 msg=audit(1490932116.604:46392): avc: denied { unlink } for pid=26548 comm="ivescript.Wisps" name="MiscJSDoc.ts" dev="sda21" ino=337123 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
03-30 21:48:36.664 26548 26548 W System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.Wisps/sync/tns_modules/rxjs/src/observable/dom/MiscJSDoc.ts
03-30 21:48:36.674 6857 6857 E audit : type=1400 msg=audit(1490932116.664:46585): avc: denied { unlink } for pid=26548 comm="ivescript.Wisps" name="MiscJSDoc.ts" dev="sda21" ino=337312 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
I can confirm what @ferryfax says.
It happens only on some Samsung devices and it does not stop lives sync, it is just error on console.
@ferryfax please give it a try with latest cli: npm install -g nativescript@next
@Plamen5kov Here is what happens with @next
Project successfully prepared (Android)
Successfully transferred app.css.
Refreshing application...
System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.TestApp/sync/app.css
System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.TestApp/sync
System.err: remove failed: ENOENT (No such file or directory) : /data/local/tmp/org.nativescript.TestApp/removedsync
Successfully synced application org.nativescript.TestApp on device 0715f791139b1a36.
Preparing project...
Project successfully prepared (Android)
Successfully transferred main-view-model.js.
Refreshing application...
System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.TestApp/sync/main-view-model.js
System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.TestApp/sync
System.err: remove failed: ENOENT (No such file or directory) : /data/local/tmp/org.nativescript.TestApp/removedsync
ActivityManager: Killing 15255:org.nativescript.TestApp/u0a1261 (adj 0): stop org.nativescript.TestApp cause from pid 15770
ActivityManager: cleanUpApplicationRecord -- 15255
Successfully synced application org.nativescript.TestApp on device 0715f791139b1a36.
Preparing project...
Project successfully prepared (Android)
Successfully transferred main-view-model.js.
Refreshing application...
System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.TestApp/sync/main-view-model.js
System.err: remove failed: EACCES (Permission denied) : /data/local/tmp/org.nativescript.TestApp/sync
System.err: remove failed: ENOENT (No such file or directory) : /data/local/tmp/org.nativescript.TestApp/removedsync
System.err: com.tns.NativeScriptException:
System.err: Calling js method run failed
System.err: TypeError: Cannot set property '_modal' of null
System.err: File: "file:///data/data/org.nativescript.TestApp/files/app/tns_modules/tns-core-modules/ui/page/page-common.js, line: 211, column: 22
System.err: StackTrace:
System.err: Frame: function:'PageBase._showNativeModalView', file:'file:///data/data/org.nativescript.TestApp/files/app/tns_modules/tns-core-modules/ui/page/page-common.js', line: 211, column: 23
System.err: Frame: function:'Page._showNativeModalView', file:'file:///data/data/org.nativescript.TestApp/files/app/tns_modules/tns-core-modules/ui/page/page.js', line: 112, column: 47
System.err: Frame: function:'PageBase.showModal', file:'file:///data/data/org.nativescript.TestApp/files/app/tns_modules/tns-core-modules/ui/page/page-common.js', line: 172, column: 18
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.TestApp/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 24, column: 25
System.err: Frame: function:'invoke', file:'file:///data/data/org.nativescript.TestApp/files/app/tns_modules/tns-core-modules/timer/timer.js', line: 19, column: 48
System.err: Frame: function:'run', file:'file:///data/data/org.nativescript.TestApp/files/app/tns_modules/tns-core-modules/timer/timer.js', line: 23, column: 13
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1043)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:925)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:912)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:896)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:888)
System.err: at com.tns.gen.java.lang.Runnable.run(Runnable.java:10)
System.err: at android.os.Handler.handleCallback(Handler.java:739)
System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
System.err: at android.os.Looper.loop(Looper.java:158)
System.err: at android.app.ActivityThread.main(ActivityThread.java:7229)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
ActivityManager: Process org.nativescript.TestApp (pid 15809)(adj 0) has died(74,1237)
ActivityManager: cleanUpApplicationRecord -- 15809
Successfully synced application org.nativescript.TestApp on device 0715f791139b1a36.
It looks livesync works (at least in basic scenarios), but we still log a log of errors.
Tested with:
[email protected]
[email protected]
[email protected]
@dtopuzov can you give me the steps to reproduce and the API level and model of the device you tested on.
@Plamen5kov Galaxy S6 Edge, Android 6.0
Steps:
tns create TestApp
tns run android
change app.css (change theme from light to dark)
change main-view-model.js (replace counter from 42 to 52)
The new LiveSync with sockets, that will be used in CLI 4.2.0 will resolve this issue.
In order to give it a try, you need both latest CLI and latest android runtime.
Most helpful comment
I'm testing on Samsung Galaxy S7, android 6.0.1
I run
tns run android, it builds the app, installs it on device then after each changes the app is refreshed but without synchronizing files with the same error mentioned in the issue, to synchronize files I stop the processes and re-runtns run android.