Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11891] CLI: iOS: Build - Titanium mobile project fails to build intermittently

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-31T06:26:21.000+0000
Affected Version/sRelease 3.0.0, Release 3.1.0
Fix Version/s2013 Sprint 22, 2013 Sprint 22 Core, Release 3.2.0
ComponentsiOS
Labelsqe-ios100112, qe-sdk3.1.0, triage
ReporterAnshu Mittal
AssigneeChris Barber
Created2012-11-29T10:06:25.000+0000
Updated2013-10-31T06:26:21.000+0000

Description

Titanium mobile project fails to build intermittently. When the project is cleaned and build multiple times, it gets built successfully. Steps to reproduce: 1. Create or import a titanium mobile project into the studio. 2. Try to install the project on iOS simulator or device. Actual: The following error is displayed on console and the project is not build: [ERROR] :  ** BUILD FAILED ** [ERROR] :  The following build commands failed: [ERROR] :   CompileC build/tabeviewrow_timob4658.build/Debug-iphoneos/tabeviewrow_timob4658-universal.build/Objects-normal/armv7/ApplicationRouting.o Classes/ApplicationRouting.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] :  (1 failure) Expected: The project should build successfully.

Attachments

FileDateSize
ApplicationRouting.txt2012-12-01T11:57:37.000+0000148207
p-iPad.build.zip2013-03-28T18:48:22.000+00005259068
StudioConsoleLog.txt2013-10-22T07:07:44.000+00001204
studio-console-log.txt2013-03-28T18:48:22.000+00001867
studio-environment.txt2013-03-28T18:48:22.000+00009347
studio-error-log.txt2013-03-28T18:48:22.000+0000282035
terminal-command-log.txt2013-03-28T18:48:22.000+000091631
ti-info.txt2013-03-28T18:48:22.000+000026344
TIMOB11891Logs.rtf2012-11-30T11:47:29.000+0000234045

Comments

  1. Thomas Huelbert 2012-11-29

    please be sure to include the version of xcode on these bugs
  2. Chris Barber 2012-11-29

    @Anshu, you're building for iOS 6, right? Can you set the console log level to "trace" and include any more relevant error messages that could help identify the source of the problem?
  3. Max Stepanov 2012-11-29

    Need /build/iphone/build/build.log attached.
  4. Anshu Mittal 2012-12-01

    Just tried reinstalling the xcode and now, I am unable to reproduce the issue. However, please find the required file(ApplicationRouting.m) as attachment.
  5. Ingo Muschenetz 2012-12-01

    Marking as can't reproduce for now.
  6. Chris Barber 2012-12-03

    FWIW, I've seen this before when the iOS build command calls titanium_prep to encrypt the JavaScript files and for some reason the output is truncated and written to the ApplicationRouting.m file. I don't think this is an async thing. Doing a clean and rebuild should fix it.
  7. Nathan Nadeau 2013-02-27

    FWIW I had this same error message today, repeatable many times in a row (about 20 times, with many "Project->Clean" sprinkled in between). I am using Titanium SDK 3.0.2 and targeting an iOS 6.1 device. Finally I went into iTunes and noticed (as it sometimes does) that it was complaining that "iphone could not be synced because the sync session failed to start". So something was wrong with iTunes' connection to my device. I restarted iTunes (which is what people recommend when they see that message in general) and when I confirmed that the syncing was again working as expected, then back in Titanium it compiled to the device just fine. So it could be this Titanium compilation error message is related to when iTunes can't connect to the device properly?
  8. Eric Merriman 2013-02-28

    @Nathan: Were you seeing the same error as listed in this bug? If different, was it the "itunes sync failed to start" error?
  9. Nathan Nadeau 2013-02-28

    @Eric Yes I was seeing the exact error message listed in this bug report. I was seeing the CompileC "build/Gleim Flashcards.build/Debug-iphoneos/Gleim Flashcards-universal.build/Objects-normal/armv7/ApplicationRouting.o" Classes/ApplicationRouting.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler error on the Titanium side. I did not see any other error on the Titanium side. Then when I checked iTunes (exasperated, I didn't know what else to do), that's when I saw that iTunes was telling me "iphone could not be synced because the sync session failed to start". This seemed problematic, so I restarted iTunes and then did a manual sync operation to the device to verify it was once again working normally. Then going back to Titanium, the very next attempt (after 20 failures in a row at least) to compile to the device succeeded. I can't say for sure that the error listed in this bug started exactly when iTunes started failing to start the sync session (I did not know to look for that at first). I can say that directly previously to the 20+ failures, it had been working great, as normal, and then it suddenly just stopped working and I started seeing the Titanium error. So it would at least seem plausible that it could be related. I'll keep an eye out for it now that I know to look for it, and if I can confirm that this bug starts to appear as soon as iTunes starts having session sync problems, I'll confirm it here.
  10. Eric Merriman 2013-02-28

    @Nathan, thanks. We have occasionally seen iTunes failures generally requiring a disconnect/reconnect of the device. This has been known to happen when no Studio or Titanium activity is occurring, and it occurs more often with iTunes 11. What version of iTunes are you running? I will instruct the QE team to keep an eye open for this issue, and will keep this ticket open. If we see this issue again we will try to capture the error. I will open an improvement request for better error handling in these cases and link to this ticket.
  11. Nathan Nadeau 2013-02-28

    @Eric I have iTunes 11.0.1 currently.
  12. Thomas Stalcup Jr 2013-03-08

    I'm now seeing this issue pop up 20 times in a row. I've tried checking iTunes for errors, Restarting iTunes, Manual Sync, Clean Project a bunch of times, same result: [ERROR] :  ** BUILD FAILED ** [ERROR] :  The following build commands failed: [ERROR] :   CompileC build/AchievementUnlocked.build/Debug-iphoneos/AchievementUnlocked-universal.build/Objects-normal/armv7/ApplicationRouting.o Classes/ApplicationRouting.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] :  (1 failure)
  13. Dustin Hyde 2013-03-28

    I've seen this a few times, I am currently stuck in this state, attaching logs.
  14. Dustin Hyde 2013-03-28

    Attaching: ti-info.txt terminal-command-log.txt studio-error-log.txt studio-environment.txt studio-console-log.txt p-iPad.build.zip => ./build/iphone/build/p.build/Debug-iphonesimulator/
  15. Dustin Hyde 2013-03-28

    If a project is named 'p' this error occurs, if a project is named 'project' the error goes away.
  16. Chris Barber 2013-03-28

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/4052
  17. Francois Mouchati 2013-07-11

    Hi, I have the exact same problem and do not understand why this ticket is marked as resolved. Where is the resolution? What should I do to get ride of the problem? Tks.
  18. Dhirendra Jha 2013-10-22

    I got this issue again using SDK 3.2.0 build. See the details below - Environment - Appc Studio - 3.2.0.201310181700 SDK - 3.2.0.v20131021142445 acs - 1.0.7 alloy - 1.2.2 titanium - 3.2.0 titanium-code-processor - 1.0.3 Xcode - 5.0 OS - Mountain Lion (10.8.5) Device - iPhone 5 (v7.0.2) Result - Project fails to build. See the attached log file. Hence reopening this issue.
  19. Pragya Rastogi 2013-10-31

    The error mentioned by Dhirendra seems to be fixed with TIMOB-14624. Same error occurred for TIMOB-14235 and TIMOB-15441 which now appears to be working fine with build: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201310300145 SDK: 3.2.0.v20131029150357 acs:1.0.7 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: iOS7(v7.0.3)-iPodTouch1

JSON Source