mit-cml / appinventor-sources

MIT App Inventor Public Open Source
http://appinventor.mit.edu/appinventor-sources/
Apache License 2.0
1.5k stars 2.08k forks source link

Build Server Stuck at 85% #702

Closed MCSH closed 8 years ago

MCSH commented 8 years ago

Hello.

I'm running appinventor on a single node cluster on appscale (more info on how: https://github.com/AppScale/appscale/issues/1900 ) and while compiling an empty project the progress bar gets stuck at 85% without any additional information. Checking buildserver's logs, I found these:

     [java] INFO: The current progress is 85%
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.Compiler
getResource
     [java] INFO: file...true
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.Execution
 execute
     [java] INFO: ____Executing /tmp/aapt7292091220840934159 package -v -f -M /t
mp/1455349606178_0.1280465695964671-0/youngandroidproject/../build/AndroidManife
st.xml -S /tmp/1455349606178_0.1280465695964671-0/youngandroidproject/../build/r
es -A /tmp/1455349606178_0.1280465695964671-0/youngandroidproject/../assets -I /
tmp/android8415652618659621575.jar -F /tmp/1455349606178_0.1280465695964671-0/yo
ungandroidproject/../build/deploy/test.ap_ /tmp/1455349606178_0.1280465695964671
-0/youngandroidproject/../build/libs
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.Execution
 execute
     [java] WARNING: ____Execution failure:
     [java] java.io.IOException: Cannot run program "/tmp/aapt729209122084093415
9": error=2, No such file or directory
     [java]     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
     [java]     at java.lang.Runtime.exec(Runtime.java:617)
     [java]     at com.google.appinventor.buildserver.Execution.execute(Executio
n.java:111)
     [java]     at com.google.appinventor.buildserver.Compiler.runAaptPackage(Co
mpiler.java:1119)
     [java]     at com.google.appinventor.buildserver.Compiler.compile(Compiler.
java:613)
     [java]     at com.google.appinventor.buildserver.ProjectBuilder.build(Proje
ctBuilder.java:164)
     [java]     at com.google.appinventor.buildserver.BuildServer.build(BuildSer
ver.java:559)
     [java]     at com.google.appinventor.buildserver.BuildServer.buildAndCreate
Zip(BuildServer.java:514)
     [java]     at com.google.appinventor.buildserver.BuildServer.access$300(Bui
ldServer.java:66)
     [java]     at com.google.appinventor.buildserver.BuildServer$1.run(BuildSer
ver.java:452)
     [java]     at com.google.appinventor.buildserver.NonQueuingExecutor$1.run(N
onQueuingExecutor.java:52)
     [java]     at java.lang.Thread.run(Thread.java:745)
     [java] Caused by: java.io.IOException: error=2, No such file or directory
     [java]     at java.lang.UNIXProcess.forkAndExec(Native Method)
     [java]     at java.lang.UNIXProcess.<init>(UNIXProcess.java:187)
     [java]     at java.lang.ProcessImpl.start(ProcessImpl.java:130)
     [java]     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
     [java]     ... 11 more
     [java]
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.Compiler
runAaptPackage
     [java] WARNING: YAIL compiler - AAPT execution failed.
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er build
     [java] INFO: Build output: ________Preparing application icon<br>________Cr
eating animation xml<br>________Determining permissions<br>________Generating ma
nifest file<br>________Attaching native libraries<br>________Copying native libr
aries<br>________Attaching component assets<br>________Compiling source files<br
>(compiling appinventor/ai_sajjadheydari74/test/Screen1.yail to appinventor.ai_s
ajjadheydari74.test.Screen1)<br>(compiling /tmp/runtime5546640176899264689.scm t
o com.google.youngandroid.runtime)<br>Kawa compile time: 2.444 seconds<br>______
__Invoking DX<br>DX time: 6.169 seconds<br>________Invoking AAPT<br>YAIL compile
r - AAPT execution failed.<br>
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er build
     [java] INFO: Build error output: Error: Your build failed due to an error i
n the AAPT stage, not because of an error in your program.
     [java]
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er checkMemory
     [java] INFO: Build 1 current used memory: 10774184 bytes
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er buildAndCreateZip
     [java] SEVERE: Build 1 Failed: 1 Error: Your build failed due to an error i
n the AAPT stage, not because of an error in your program.
     [java]
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er$1 run
     [java] INFO: CallbackURL: http://192.168.2.26:8888/ode2/receivebuild/vdharf
1uyt6xxhaoketw8ewj4rkqb72a1wf2oj7jv3mt6jnhn7gir84ixniayyht8qwqgcxw9yoesafw49p9lp
uhlvkv5gjq8gcpyt308i8tmdxw9/build/Android
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er checkMemory
     [java] INFO: Build 1 current used memory: 10445632 bytes
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er$1 run
     [java] SEVERE: Bad Response Code!: 404
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er$1 run
     [java] SEVERE: Call back url weas: http://192.168.2.26:8888/ode2/receivebui
ld/vdharf1uyt6xxhaoketw8ewj4rkqb72a1wf2oj7jv3mt6jnhn7gir84ixniayyht8qwqgcxw9yoes
afw49p9lpuhlvkv5gjq8gcpyt308i8tmdxw9/build/Android
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er checkMemory
     [java] INFO: Build 1 current used memory: 8816224 bytes
     [java] Feb 13, 2016 7:46:56 AM com.google.appinventor.buildserver.BuildServ
er$1 run
     [java] INFO: BUILD 1 FINISHED

(I tried to modify the source a bit trying to get more info on why it's failing, but I haven't changed any actual code except logs.)

The problem as far as I have found is that it can not access the file it creates in /tmp directory. I checked to see if the file exists and here is printing the file.exists() in compile.java :

[java] INFO: file...true

Any ideas on what I can do for fixing this?

MCSH commented 8 years ago

More information: I checked file permission, tried to run the command myself (it worked), started buildserver with superuser access and clearted /tmp just in case. still no luck.

josmas commented 8 years ago

Hi there, we don't support appscale cause we know nothing about it. In any case, your logs seem to be pointing to aapt missing. I've seen that error before, but seem to recall it was on windows, and a path issue. Have you checked the open source forum? You may find some info there.

halatmit commented 8 years ago

I'm closing this. It should be a request in the forum, not an issue. But it looks like José's reply is appropriate.

MCSH commented 8 years ago

I found a solution.

I was running it in 64-bit ubuntu and the aapt was 32-bit. Here is the fix in case anyone else got this error:

http://stackoverflow.com/questions/19523502/how-to-make-androids-aapt-and-adb-work-on-64-bit-ubuntu-without-ia32-libs-work