creativemarket / csxs

A build tool for Adobe® Creative Suite® extensions. Create, compile, debug, package, & deploy to S3 with ease!
84 stars 11 forks source link

Extension packaging (ucf.jar) fails with java.io.IOException: Unable to create output file #2

Closed hamstu closed 11 years ago

hamstu commented 11 years ago

When I run csxs package everything is fine up until the step where it runs the ucf.jar packaging script.

java -jar /usr/local/lib/node_modules/csxs/bin/ucf.jar -package -storetype PKCS12 -keystore .certificate-self.p12 -storepass password -tsa https://timestamp.geotrust.com/tsa PlacePanelExtension.0.0.1.zxp -C ./package .

At that point I get this error:

Packaging failed: Unable to create output file: PlacePanelExtension.0.0.1.zxp
░ java.io.IOException: Unable to create output file: PlacePanelExtension.0.0.1.zxp
░   at com.adobe.ucf.Packager.renameOutput(Packager.java:165)
░   at com.adobe.ucf.UCFPackager.createPackage(UCFPackager.java:112)
░   at com.adobe.ucf.UCF.doPackage(UCF.java:109)
░   at com.adobe.ucf.UCF.main(UCF.java:59)
░   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
░   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
░   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
░   at java.lang.reflect.Method.invoke(Method.java:597)
░   at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
░ ERROR: File not found "PlacePanelExtension.0.0.1.zxp".

I tried updating Java and restarting, but no dice. Any ideas?

brianreavis commented 11 years ago

Could you try running this?

sudo chmod -R 0777 ./

(within the project folder)

hamstu commented 11 years ago

Still no luck.

Oh, and looking back it appears this error happens like three times. (The same UCF error message, just different files.)

For what it's worth, I tried just running one of the lines manually on my Ubuntu machine and it packaged the .zxp just fine...

brianreavis commented 11 years ago

That makes sense—packaging is executed for a CS5 build, CS6 build, and then a combined build. What platform are you running csxs on?

hamstu commented 11 years ago

Just OS X 10.8.3 — When I did the Ubuntu test I just copied the whole directory and downloaded the UCF.jar from Adobe. (Although I did try installing csxs on Ubuntu, but the node package isn't supported.)

hamstu commented 11 years ago

I've found the problem! (And bizarrely enough it's the same reason for a bug I found in my own unrelated code today...)

You cannot have spaces in your extension's path

I'm keeping my extension code in a folder within Dropbox ~/Dropbox/Photoshop Extensions/[blabla] and I guess somehow UCF chokes on that path. I just did a test in another directory and it worked perfectly. I'm going to test again and confirm.

brianreavis commented 11 years ago

Excellent! Confirmed. I just tried a path with a space in it and it spit out the same error. For the time being, I put in a fix that will at least cause the build to stop. I imagine we can write to a temp directory to solve the problem. I'll keep you posted.

hamstu commented 11 years ago

Sweet, I tested again and it built just fine as well. Thanks for the quick patch there. Yeah I imagine a temp directory might be the best solution, unless you can somehow "quote" the paths going into UCF.

brianreavis commented 11 years ago

The paths being passed to the tool are relative to the project directory (so there are technically no spaces in the argument list to escape). I tried using absolute paths for kicks... no dice. Bummer.

I just pushed an update that writes to a temp directory and then moves the file out once it's complete. Fixes the problem for me! Mind re-installing and giving it a shot?

brianreavis commented 11 years ago

I'm going to assume this is fixed and close this. If it happens to not work, please feel free to comment and we'll reopen this and get it fixed! Thanks for the help and info on this... really appreciate it.

hamstu commented 11 years ago

Thanks Brian! Sorry for the lull there. Had a busy weekend. Sounds like your fix will do it, but if I have any issues when testing I'll let you know. Cheers!