Apache Cordova
  1. Apache Cordova
  2. CB-5125

cordova compile build emulate ios broken

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.2.0
    • Component/s: iOS
    • Labels:
      None

      Description

      build scripts runs half way and it doesn't finish
      this affects also "cordova emulate ios" which depends on build

      Recreate
      cordova -v
      3.1.0-0.1.0
      cordova create foo com.foo foo
      cd foo
      cordova platform add ios
      cat "echo build is done" >> ./platforms/ios/cordova/build
      cordova build ios -d

      [xcode output]
      never see the end of build "build is done"

      strange but it works from terminal
      ./platform/ios/cordova/build

        Issue Links

          Activity

          Hide
          ASF subversion and git services added a comment -

          Commit dedc29a81b1bc57ce25d88bbad51478d0d1091c1 in branch refs/heads/master from Carlos Santana
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=dedc29a ]

          CB-5125 add tests for chil process spawn

          Show
          ASF subversion and git services added a comment - Commit dedc29a81b1bc57ce25d88bbad51478d0d1091c1 in branch refs/heads/master from Carlos Santana [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=dedc29a ] CB-5125 add tests for chil process spawn
          Hide
          ASF subversion and git services added a comment -

          Commit 01c7ecec7ccf4a3c1423ddf3844e125d24965025 in branch refs/heads/master from Carlos Santana
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=01c7ece ]

          CB-5125: replace child process exec with spawn

          Show
          ASF subversion and git services added a comment - Commit 01c7ecec7ccf4a3c1423ddf3844e125d24965025 in branch refs/heads/master from Carlos Santana [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=01c7ece ] CB-5125 : replace child process exec with spawn
          Hide
          Carlos Santana added a comment -

          Proposed fix here for code review
          https://github.com/apache/cordova-cli/pull/57

          Show
          Carlos Santana added a comment - Proposed fix here for code review https://github.com/apache/cordova-cli/pull/57
          Hide
          Carlos Santana added a comment -

          Submitted fix for review, on review comments before merging
          https://reviews.apache.org/r/14822/

          Show
          Carlos Santana added a comment - Submitted fix for review, on review comments before merging https://reviews.apache.org/r/14822/
          Hide
          Carlos Santana added a comment -

          currently working on different implementation

          using .spwan instead of .exe
          http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options

          Show
          Carlos Santana added a comment - currently working on different implementation using .spwan instead of .exe http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options
          Hide
          Carlos Santana added a comment -
          Show
          Carlos Santana added a comment - please review proposed fix https://github.com/apache/cordova-cli/pull/56
          Hide
          Carlos Santana added a comment -

          tested with node v0.10.20

          Show
          Carlos Santana added a comment - tested with node v0.10.20
          Hide
          Carlos Santana added a comment - - edited

          I think I found the problem.
          xcode puts out around 300KB of stdout when running ./platforms/ios/cordova/build

          cordova-cli is using child_process.exec()
          maxBuffer Number (Default: 200*1024) ~200KB
          http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

          child_process.exec() exits with error on maxBuffer

          fix is to modify cordova-cli
          src/emulate.js
          src/run.js
          src/compile.js

          to increase maxBuffer
          child_process.exec(cmd,

          {maxBuffer:500*1024}

          ,function(err, stdout, stderr) {
          ...

          Show
          Carlos Santana added a comment - - edited I think I found the problem. xcode puts out around 300KB of stdout when running ./platforms/ios/cordova/build cordova-cli is using child_process.exec() maxBuffer Number (Default: 200*1024) ~200KB http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback child_process.exec() exits with error on maxBuffer fix is to modify cordova-cli src/emulate.js src/run.js src/compile.js to increase maxBuffer child_process.exec(cmd, {maxBuffer:500*1024} ,function(err, stdout, stderr) { ...

            People

            • Assignee:
              Carlos Santana
              Reporter:
              Carlos Santana
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development