Copy link to clipboard
Copied
I am trying to publish an AIR fla for both iOS and Android using Flash Pro CS6, but it keeps getting stuck at 5 seconds remaining (and this same .fla exports just fine for someone else). This occurs for publishing for App Store, AdHoc, and Quick Device Testing.
I have tried different versions of the AIR SDK (3.2, 3.5 and 3.9), tried different versions of the Java 1.6 JDK, rebuilt certificates... basically tried everything I can think of, but nothing seems to work.
Does anyone know of any circumstances that can possibly cause this to happen?
Copy link to clipboard
Copied
It happens most times. Those last five seconds of publishing must be the hardest part.
Things are generally faster with recent builds of 3.9.
Copy link to clipboard
Copied
How long should it take? I've tried leaving it for a few hours, but it remains stuck at 5 second.
Copy link to clipboard
Copied
A few hours sounds a bit long. Usually is a few minutes at most.
Copy link to clipboard
Copied
It's possible the working folders is getting locked, or otherwise messed with. When working out of dropbox for example, sometimes it will lock the build files while packaging is occuring, and it messes things up.
Try watching the output directory, and see if you notice any stranded tmp files or folders
Copy link to clipboard
Copied
Thanks for the suggestion esDotDev!
Well I was working out of a Dropbox folder, so your suggestion made perfect sense... however I'm seeing the same problem even after moving it outside of Dropbox.
I am seeing a new tmp file each time I attempt to publish. I have opened up Activiy Monitor, and inspected com.adobe.air.ADT, and under the 'Open Files' list, the tmp file is listed, and there does appear to be (minimal) CPU and Disk activity.
I am both puzzled, and somewhat frustrated by this. If you or anyone else have any more suggestions, I'd greatly appreciate it!!
Copy link to clipboard
Copied
In case this gives someone a hint to the cause, I believe it is getting stuck here:
Copy link to clipboard
Copied
Okay... I'm not sure whether I'd consider this a fix, but it definitely works as a workaround...
Considering the above callstack, it definitely looked like it was getting stuck in AWTStarter. This is pretty alien to me, but seeing that other Java projects have had similar stalls in this function, I researched further. It seems that if Java is invoked without the 'headless' option, it can get stuck waiting on keyboard/mouse input, so I wondered if something similar could be happening here.
Without knowing exactly how to change the java options used by AIR specifically, I tried a brute-force method... namely replacing /usr/bin/java with a script that invokes Java with headless mode enabled:
sudo mv /usr/bin/java /usr/bin/java.org
sudo nano /usr/bin/java
#!/bin/bash
java.org -Djava.awt.headless=true $JAVAOPT "$@"
chmod 755 /usr/bin/java
Then I tried publishing again.... and lo and behold, it worked!!!
I'm not sure if this is a bug within the AIR SDK, or whether I just happened to have a weird 'perfect storm' of a system configuration to cause this, but I thought I would record my findings/workaround here in case anyone else stumbles upon the same problem (and on the off-chance that someone from Adobe can make sense of it, in case a fix is required within the AIR toolchain).