Skip to content

Application entry point file not found... when using livesync (android) #1332

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
x4080 opened this issue Dec 10, 2015 · 8 comments · Fixed by #1443
Closed

Application entry point file not found... when using livesync (android) #1332

x4080 opened this issue Dec 10, 2015 · 8 comments · Fixed by #1443
Assignees
Milestone

Comments

@x4080
Copy link

x4080 commented Dec 10, 2015

TNS 1.5, my steps :

  1. tns run android
  2. multi tasking button, close application (to force cold boot)
  3. cold boot, works ok
  4. tns livesync android
  5. multi tasking button, close application (to force cold boot)
  6. Above error (...bootstrap js etc)

I think in 1.4 it works ok

Is it only me ? Thanks

EDIT : in 4.4.4 (nexus 7), but in 6.0 (nexus 5) no error

@x4080
Copy link
Author

x4080 commented Dec 10, 2015

Found the problem :

@app.js, application.cssFile = "app.css"; // was using Nathanael Livesync plugin

should be application.cssFile = "./app.css";

@x4080 x4080 closed this as completed Dec 10, 2015
@x4080 x4080 reopened this Jan 2, 2016
@x4080
Copy link
Author

x4080 commented Jan 2, 2016

I tried using tns build android and the error come back on android 4.4.4, I check the package.json in the app directory and it is already correct :
(it works on marshmallow)

{
"name": "tns-template-blank-ts",
"main": "app.js",
"version": "1.2.0",
"author": "Telerik [email protected]",
"description": "Nativescript blank-ts project template",
"license": "BSD",
"keywords": [
"telerik",
"mobile",
"nativescript",
"{N}",
"tns",
"appbuilder",
"template"
],
"repository": {
"url": "NativeScript/NativeScript@06ddbf1"
}
}

@rosen-vladimirov
Copy link
Contributor

Hi @x4080 ,
Please excuse us for somehow missing this case. Do you still have the problem? Can you send your application that reproduces the issue?

@x4080
Copy link
Author

x4080 commented Jan 26, 2016

Yes sir, tns livesync android on 4.4, nexus 7 and genymotion.. Everything good for lollipop and marshmallow.

Strangely the work around is using --watch :)

@x4080
Copy link
Author

x4080 commented Jan 26, 2016

Oh forgot, it happened when app open then we press the home button, then app error happened

@rosen-vladimirov
Copy link
Contributor

Ok, I've reproduced the issue. Here's the description of the problem (writing it down so I'm sure I'll not forget it):
When using tns livesync android CLI moves all files inside fullsync directory (in /data/loca/tmp/<app_id>) and changes permissions of all files to 777 so the runtime will be able to work with them.
When the app is started, the runtime cheks if there's something in /data/loca/tmp/<app_id>/fullsync/ dir and gets it inside the application. After that the runtime should remove the files inside fullsync dir. However it looks like CLI had not added write permissions to the directories (for example tns-core-modules). On most of the devices runtime has required privileges to delete the files in /data/loca/tmp/<app_id>/fullsync/ dir, but on some of them, it cannot do this. That's why CLI is executing chmod of the files inside it. In Genymotion, the runtime cannot delete the files in case CLI's chmod is not successfull.
So the real reason for the error is that CLI had not given write permissions on tns-core-modules (and possibly on all directories).

@x4080 thanks for the detailed steps to reproduce. The workaround is to use tns run android in order to fix your application on the device.

@x4080
Copy link
Author

x4080 commented Jan 28, 2016

Thanks again, but I use tns livesync android --watch for workaround since tns run android will be too slow :)

But why is it happened only on 4.4 ?

@rosen-vladimirov
Copy link
Contributor

Well, it could happen on various devices. When using Genymotion I've reproduced it on all devices, no mater which is the Android version.

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

Successfully merging a pull request may close this issue.

4 participants