Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

iOS 4.2 Build onto Device Fails

Hi

I am trying to deploy my final BETA onto the device before I build for distribution, however I keep getting an install failed.

Below is the report from the build.log, can anyone shed any light? I am on a really tight timescale :(

** BUILD FAILED **


The following build commands failed:
Knight Finder:
    PhaseScriptExecution Pre-Compile "/Users/thesargenator/Titanium/Knight Finder/build/iphone/build/Knight Finder.build/Release-iphoneos/Knight Finder.build/Script-241EAF36118E30260081A5BE.sh"
(1 failure)

EXIT CODE WAS: 1

Exception detected in script:
Traceback (most recent call last):
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/iphone/builder.py", line 994, in main
    execute_xcode("iphoneos%s" % iphone_version,args,False)
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/iphone/builder.py", line 790, in execute_xcode
    output = run.run(args,False,False,o)
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/iphone/run.py", line 31, in run
    sys.exit(rc)
SystemExit: 1
— asked December 1st 2010 by Justin Howard
  • 4.2
  • 4.2sdk
  • build
  • install
  • iphone
0 Comments

8 Answers

  • Accepted Answer

    I seen the strange image issue as well. I had to remove files in and out to narrow it down and it turns out if you save an jpg into .png file type or vice-versa, you get that error. I spent countless hours figuring this out but that was the issue for me. Maybe titanium will fix it but I'm not counting on it, I just watch the images when I save them.

    — answered December 2nd 2010 by Sj Singh
    permalink
    3 Comments
    • Mm ok, I shall try that approach and see if I can get it to build. How does it know that an image saved from Jpg to Png though, if this is doen outside of the TI route folder?

      — commented December 2nd 2010 by Justin Howard
    • Great this worked, thanks. But check out my next problem above. Did you encounter this at all?

      — commented December 2nd 2010 by Justin Howard
    • I had the same issue but in a different form: XCode 4 was telling me that the build failed because it was unable to find a shell script. When I examined the actual build log, it referred to a .png file that I had created dynamically with my app in the Simulator. Getting rid of the dynamic pngs and cleaning the build solved the problem.

      — commented August 9th 2011 by Mark Pemburn
  • This happens also when your code has some syntax errors.

    — answered April 25th 2013 by Kristof Gruber
    permalink
    1 Comment
    • Phew! You just saved my ass Kristof. Was going to remove images like the other answers are saying, even though I had not added any new images since last successful build… Luckily I took some time to read my code and found the silly error.

      Thanx!

      — commented May 1st 2013 by Andreas Olsson
  • Can you open up the Xcode project and debug it on device?

    I get errors attempting to build on device through Titanium… I have to do it through Xcode…

    — answered December 1st 2010 by Critter
    permalink
    4 Comments
    • Not sure how to actually install onto my device through xCode, I am looking into that at the moment

      — commented December 2nd 2010 by Justin Howard
    • Justin - I uploaded a quick screen here: http://s283.photobucket.com/albums/kk292/k0rneliuz/stuff/?action=view&current=ScreenFlow.mp4

      maybe that will help..

      — commented December 2nd 2010 by Critter
    • Hey Critter, I am sort of getting there, although I get the following build fail:
      Command /bin/sh failed with exit code 2
      I am tempted to try going back to 4.1 and 1.4.1.1 Titanium SDK.

      — commented December 2nd 2010 by Justin Howard
    • Cant be bothered to back out everything, would mean having to try and change my iPhone back to 4.1, and the SDK etc. Why is Titanium so unreliable sometimes :(

      — commented December 2nd 2010 by Justin Howard
  • I've just get this error. And I found this bug occurs due to my app has a "strange" .png image. This image is originally in .jpeg (find in google images) and i convert & resize it to .png format. After remove this "invalid" image, my app run normally.

    Check you app and tell me if using my method, you can fix this bug :)

    — answered December 2nd 2010 by Triet BuiMinh
    permalink
    1 Comment
    • I'll take a look into that, where was this image located in your directory?

      — commented December 2nd 2010 by Justin Howard
  • bump for justin..

    — answered December 2nd 2010 by Critter
    permalink
    0 Comments
  • Bump, I have tried everything today. And I cant downgrade to 4.1 iOS. So am really at a loss now. Still unable to build onto the device with either Ti or xCode

    — answered December 2nd 2010 by Justin Howard
    permalink
    0 Comments
  • Ok, I managed to finally get onto my device. However I am now having another different error when trying to package for distribution! Arhhhhhh

    So this is the latest build failure message:

    ** BUILD FAILED **
    
    
    The following build commands failed:
    Knight Finder:
        PhaseScriptExecution Pre-Compile "/Users/thesargenator/Titanium/Knight Finder/build/iphone/build/Knight Finder.build/Release-iphoneos/Knight Finder.build/Script-241EAF36118E30260081A5BE.sh"
        Ld "/Users/thesargenator/Titanium/Knight Finder/build/iphone/build/Knight Finder.build/Release-iphoneos/Knight Finder.build/Objects-normal/armv6/Knight Finder" normal armv6
    (2 failures)
    
    EXIT CODE WAS: 1
    
    Exception detected in script:
    Traceback (most recent call last):
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/iphone/builder.py", line 1047, in main
        execute_xcode("iphoneos%s" % iphone_version,args,False)
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/iphone/builder.py", line 790, in execute_xcode
        output = run.run(args,False,False,o)
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/iphone/run.py", line 31, in run
        sys.exit(rc)
    SystemExit: 1
    
    — answered December 2nd 2010 by Justin Howard
    permalink
    1 Comment
    • All sorted for some reason. It does seem a little touch and go, but so far the app seems to be building for distribution

      — commented December 2nd 2010 by Justin Howard
  • I am getting that last exit code 2 error as well, any solutions?

    — answered January 5th 2011 by Dennis Nielsen
    permalink
    1 Comment
    • It turned out it was to do with an image that was a JPG then converted to a PNG. I just deleted all the images, and then added them one at a time till I found the one causing the problem. I then created a new PNG of that image and it all worked.

      — commented January 5th 2011 by Justin Howard
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.