Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5957

Unable to add WP8 platform in cordova 3.3.1-0.3.0

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: 3.4.0
    • Component/s: CLI, WP8 (deprecated)
    • Labels:
      None

      Description

      Install cordova 3.3.1-0.3.0

      C:\>cordova create hello com.example.hello HelloWorld
      Creating a new cordova project with name "HelloWorld" and id "com.example.hello"
      at location "C:\hello"
      Downloading cordova library for www...
      Download complete

      C:\>cd hello

      C:\hello>cordova platform add wp8
      Checking wp8 requirements...
      Creating wp8 project...
      Error: This file does not seem to be a cordova config.xml file: C:\hello\platfor
      ms\wp8\config.xml

        Issue Links

          Activity

          Hide
          leecrossley Lee Crossley added a comment -

          Reverting back to the previous release is the only solution for me at the moment.

          Show
          leecrossley Lee Crossley added a comment - Reverting back to the previous release is the only solution for me at the moment.
          Hide
          purplecabbage Jesse MacFadyen added a comment -

          This was addressed yesterday. Can you retry now that cordova-wp8 has been retagged?

          Show
          purplecabbage Jesse MacFadyen added a comment - This was addressed yesterday. Can you retry now that cordova-wp8 has been retagged?
          Hide
          leecrossley Lee Crossley added a comment -

          This is definitely not working, I tried for the first time today and I have (just now) reinstalled cordova (3.3.1-0.3.0) again and attempted to create a new project with the wp8 platform. Same issue.

          Show
          leecrossley Lee Crossley added a comment - This is definitely not working, I tried for the first time today and I have (just now) reinstalled cordova (3.3.1-0.3.0) again and attempted to create a new project with the wp8 platform. Same issue.
          Hide
          martinhujer Martin Hujer added a comment -

          Just tried it now (after updating to 3.3.1-0.3.1)

          Detailed log with --verbose option:

          >cordova create t t t
          Creating a new cordova project with name "t" and id "t" at location "C:\Users\Martin\Downloads\t"
          Downloading cordova library for www...
          Download complete
          
          
          
          t> cordova --verbose platform add wp8
          cordova library for "wp8" already exists. No need to download. Continuing.
          Checking if platform "wp8" passes minimum requirements...
          Checking wp8 requirements...
          Running ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs"" (output to follow)
          
          Creating wp8 project...
          Running bin/create for platform "wp8" with command: ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\create"  "C:\Users\Martin\Downloads\t\platforms\wp8" "t" "t"" (output to follow)
          platformRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8
          repoRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0
          Creating Cordova-WP8 Project:
                  App Name : t
                  Namespace : t
                  Path : C:\Users\Martin\Downloads\t\platforms\wp8
          CREATE SUCCESS : C:\Users\Martin\Downloads\t\platforms\wp8
          
          Error: This file does not seem to be a cordova config.xml file: C:\Users\Martin\Downloads\t\platforms\wp8\config.xml
              at Object.config_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\config_parser.js:33:15)
              at Object.wp8_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\metadata\wp8_parser.js:45:19)
              at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:50:23
              at Array.map (native)
              at Object.prepare (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:48:35)
              at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\platform.js:284:57
              at ChildProcess.exithandler (child_process.js:635:7)
              at ChildProcess.EventEmitter.emit (events.js:98:17)
              at maybeClose (child_process.js:743:16)
              at Process.ChildProcess._handle.onexit (child_process.js:810:5)
          
          
          Show
          martinhujer Martin Hujer added a comment - Just tried it now (after updating to 3.3.1-0.3.1) Detailed log with --verbose option: >cordova create t t t Creating a new cordova project with name "t" and id "t" at location "C:\Users\Martin\Downloads\t" Downloading cordova library for www... Download complete t> cordova --verbose platform add wp8 cordova library for "wp8" already exists. No need to download. Continuing. Checking if platform "wp8" passes minimum requirements... Checking wp8 requirements... Running ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs"" (output to follow) Creating wp8 project... Running bin/create for platform "wp8" with command: ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\create" "C:\Users\Martin\Downloads\t\platforms\wp8" "t" "t"" (output to follow) platformRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8 repoRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0 Creating Cordova-WP8 Project: App Name : t Namespace : t Path : C:\Users\Martin\Downloads\t\platforms\wp8 CREATE SUCCESS : C:\Users\Martin\Downloads\t\platforms\wp8 Error: This file does not seem to be a cordova config.xml file: C:\Users\Martin\Downloads\t\platforms\wp8\config.xml at Object .config_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\config_parser.js:33:15) at Object .wp8_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\metadata\wp8_parser.js:45:19) at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:50:23 at Array.map ( native ) at Object .prepare (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:48:35) at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\platform.js:284:57 at ChildProcess.exithandler (child_process.js:635:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Process .ChildProcess._handle.onexit (child_process.js:810:5)
          Hide
          leecrossley Lee Crossley added a comment -

          Confirmed that it's still an issue in 3.3.1-0.3.1

          Show
          leecrossley Lee Crossley added a comment - Confirmed that it's still an issue in 3.3.1-0.3.1
          Hide
          purplecabbage Jesse MacFadyen added a comment -

          I believe you will need to remove the previous installed version of cordova-wp8 from your node modules.
          Delete the folders in : C:\Users[USERNAME]\.cordova\lib\wp\cordova\

          Then re-run the command.
          Please report back here ...

          Show
          purplecabbage Jesse MacFadyen added a comment - I believe you will need to remove the previous installed version of cordova-wp8 from your node modules. Delete the folders in : C:\Users[USERNAME]\.cordova\lib\wp\cordova\ Then re-run the command. Please report back here ...
          Hide
          martinhujer Martin Hujer added a comment -

          I did this before posting my previous comment. But I tried it again:

          C:\Users\Martin\Downloads\a>cordova --verbose platform add wp8
          Requesting {"uri":"https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;a=snapshot;h=3.3.0;sf=tgz"}...
          Downloading cordova library for wp8...
          Downloaded, unzipped and extracted 251803 byte response.
          Download complete
          Checking if platform "wp8" passes minimum requirements...
          Checking wp8 requirements...
          Running ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs"" (output to follow)
          
          Creating wp8 project...
          Running bin/create for platform "wp8" with command: ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\create"  "C:\Users\Martin\Downloads\a\platforms\wp8" "a" "a"" (output to follow)
          platformRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8
          repoRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0
          Creating Cordova-WP8 Project:
                  App Name : a
                  Namespace : a
                  Path : C:\Users\Martin\Downloads\a\platforms\wp8
          CREATE SUCCESS : C:\Users\Martin\Downloads\a\platforms\wp8
          
          Error: This file does not seem to be a cordova config.xml file: C:\Users\Martin\Downloads\a\platforms\wp8\config.xml
              at Object.config_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\config_parser.js:33:15)
              at Object.wp8_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\metadata\wp8_parser.js:45:19)
              at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:50:23
              at Array.map (native)
              at Object.prepare (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:48:35)
              at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\platform.js:284:57
              at ChildProcess.exithandler (child_process.js:635:7)
              at ChildProcess.EventEmitter.emit (events.js:98:17)
              at maybeClose (child_process.js:743:16)
              at Process.ChildProcess._handle.onexit (child_process.js:810:5)
          
          
          Show
          martinhujer Martin Hujer added a comment - I did this before posting my previous comment. But I tried it again: C:\Users\Martin\Downloads\a>cordova --verbose platform add wp8 Requesting { "uri" : "https: //git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;a=snapshot;h=3.3.0;sf=tgz" }... Downloading cordova library for wp8... Downloaded, unzipped and extracted 251803 byte response. Download complete Checking if platform "wp8" passes minimum requirements... Checking wp8 requirements... Running ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs" " (output to follow) Creating wp8 project... Running bin/create for platform "wp8" with command: ""C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8\bin\create" "C:\Users\Martin\Downloads\a\platforms\wp8" "a" "a" " (output to follow) platformRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0\wp8 repoRoot = C:\Users\Martin\.cordova\lib\wp\cordova\3.3.0 Creating Cordova-WP8 Project: App Name : a Namespace : a Path : C:\Users\Martin\Downloads\a\platforms\wp8 CREATE SUCCESS : C:\Users\Martin\Downloads\a\platforms\wp8 Error: This file does not seem to be a cordova config.xml file: C:\Users\Martin\Downloads\a\platforms\wp8\config.xml at Object .config_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\config_parser.js:33:15) at Object .wp8_parser (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\metadata\wp8_parser.js:45:19) at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:50:23 at Array.map ( native ) at Object .prepare (C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\prepare.js:48:35) at C:\Users\Martin\AppData\Roaming\npm\node_modules\cordova\src\platform.js:284:57 at ChildProcess.exithandler (child_process.js:635:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Process .ChildProcess._handle.onexit (child_process.js:810:5)
          Hide
          jonathannaguin Jonathan Naguin added a comment -

          The config.xml from the template does not conform the validation that the config_parser.js runs. More specifically, the widget element does not have a xmlns attribute with "http://www.w3.org/ns/widgets" as value.

          Show
          jonathannaguin Jonathan Naguin added a comment - The config.xml from the template does not conform the validation that the config_parser.js runs. More specifically, the widget element does not have a xmlns attribute with "http://www.w3.org/ns/widgets" as value.
          Hide
          purplecabbage Jesse MacFadyen added a comment -

          Here are 2 possible workarounds until this is addressed either by a 3.4.0 platforms release or an update to the cordova-cli.

          a) Remove/Comment out this code from src/config_parser.js ( whereever you have cordova-cli installed )

          /*
          var r = this.doc.getroot();
          var xmlns ='http://www.w3.org/ns/widgets';
          if((r.tag !== 'widget') || !r.attrib || (r.attrib.xmlns !== xmlns)) {
              throw new Error("This file does not seem to be a cordova config.xml file: " + path);
          }
          */
          

          b) Update the config.xml in the windows phone 8 template used by the platform create.

          Change:
          <widget>
          To:
          <widget xmlns ='http://www.w3.org/ns/widgets'>
          In your case this is the file at C:\Users\Martin\Downloads\a\platforms\wp8\config.xml

          Show
          purplecabbage Jesse MacFadyen added a comment - Here are 2 possible workarounds until this is addressed either by a 3.4.0 platforms release or an update to the cordova-cli. a) Remove/Comment out this code from src/config_parser.js ( whereever you have cordova-cli installed ) /* var r = this .doc.getroot(); var xmlns ='http://www.w3.org/ns/widgets'; if ((r.tag !== 'widget') || !r.attrib || (r.attrib.xmlns !== xmlns)) { throw new Error("This file does not seem to be a cordova config.xml file: " + path); } */ b) Update the config.xml in the windows phone 8 template used by the platform create. Change: <widget> To: <widget xmlns ='http://www.w3.org/ns/widgets'> In your case this is the file at C:\Users\Martin\Downloads\a\platforms\wp8\config.xml
          Hide
          martinhujer Martin Hujer added a comment -

          Tried the a) and it works fine, thanks!

          Show
          martinhujer Martin Hujer added a comment - Tried the a) and it works fine, thanks!

            People

            • Assignee:
              purplecabbage Jesse MacFadyen
              Reporter:
              leecrossley Lee Crossley
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development