This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 242972 - Error during compilation imported cordova project on Linux
Summary: Error during compilation imported cordova project on Linux
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 15:58 UTC by ironbone
Modified: 2016-07-07 08:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Problematical exported project (1.94 MB, application/zip)
2014-03-24 12:22 UTC, ironbone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ironbone 2014-03-17 15:58:52 UTC
On Linux after importing a project from zip there is the following error when trying to run the application on Android device/emulator:

execvp(): Permission denied
Error: /home/xxxx/NetBeansProjects/MT/platforms/android/cordova/run: Command failed with exit code EACCES
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:112:23)
    at ChildProcess.EventEmitter.emit (events.js:95:17)
    at Process.ChildProcess._handle.onexit (child_process.js:787:12)
Running command: /home/xxxx/NetBeansProjects/MT/platforms/android/cordova/run args=[]
Command finished with error code EACCES: /home/xxxx/NetBeansProjects/MT/platforms/android/cordova/run 
/home/tomek/NetBeansProjects/MT/nbproject/build.xml:267: exec returned: 1
BUILD FAILED (total time: 7 seconds)


How to generate this error on LINUX machine:

1. Create a new cordova project with the Hello World template. Run it on a device. There are no errors.
2. Export the project to zip
3. Delete the old project. Delete the project whole folder too.
4. Import the project from zip.
5. Try to run in on an android device - you will obtain an error
Comment 1 Jan Becicka 2014-03-21 07:49:53 UTC
platforms/android/cordova/run has wrong permissions.
Try to delete whole platforms folder - it should be recreated on run.
Comment 2 ironbone 2014-03-21 15:46:51 UTC
Thank you. It works but I thing it should be solved in Netbeans. 
When I describe this solution to my students they will just surest to use another tool but not Netbens.
Comment 3 Jan Becicka 2014-03-21 18:39:30 UTC
(In reply to ironbone from comment #2)
> Thank you. It works but I thing it should be solved in Netbeans. 
> When I describe this solution to my students they will just surest to use
> another tool but not Netbens.

OK and what happens if you unzip this project, cd to this project and run this command from command line "cordova run android"

I guess you will get the very same error.
Comment 4 ironbone 2014-03-21 21:47:32 UTC
Yes of course. But this problem occurs first after Netbeans creates the zip file.  

Additionally when I create a project, add platform and build using command line and them I make a zip archive. 

Then I unzip and build one more time it there are no problems. So does not seams to be cordova error.
Comment 5 Jan Becicka 2014-03-24 11:15:22 UTC
(In reply to ironbone from comment #4)
> Yes of course. But this problem occurs first after Netbeans creates the zip
> file.  

How do you create zip files in NetBeans?
Comment 6 ironbone 2014-03-24 12:15:14 UTC
I just export my project to zip.

File -> Export Project -> To Zip

One thing what I have forgotten and is very important for this error. Before you export the project you MUST RUN IT first. In my opinion the files/directories with Permission denied are created during the building process.
Comment 7 ironbone 2014-03-24 12:22:59 UTC
Created attachment 146269 [details]
Problematical exported project

Just import this project on a computer with Linux into NetBeans and try to run on Android device. You will see the problem.
Comment 8 Jan Becicka 2014-03-28 08:26:40 UTC
I would say, that the problem is, that project was zipped on platform without execute permissions (windows) and later unzipped without execute permission. I'm really not sure how to fix it properly.
Comment 9 ironbone 2014-03-28 08:49:39 UTC
No. It was "ziped" on Linux and then imported on Linux. I will try to observe this situation and maybe will find something
Comment 10 Jan Becicka 2014-03-28 12:30:53 UTC
Export project to zip does not preserve file permissions. Reassigning to projects.
Comment 11 ironbone 2014-03-31 21:15:57 UTC
I also confirm the same problem on Mac computers.
I have this situation only with CORDOVA projects.

There are no problems with export/import C++ or Java applications
Comment 12 ironbone 2014-04-26 20:14:28 UTC
I have also the same problem when after the compilation I move my Project to a new directory (using the netbeans Move... option)
Comment 13 Martin Balin 2016-07-07 08:39:24 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss