You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/06/24 17:28:24 UTC

[GitHub] [cordova-mobile-spec] brodybits opened a new issue #207: createmobilespec.js fails with a git error

brodybits opened a new issue #207:
URL: https://github.com/apache/cordova-mobile-spec/issues/207


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   A command like this from the documentation should just work after following the prerequisites:
   
   ```sh
   node ./cordova-mobile-spec/createmobilespec/createmobilespec.js --android
   ```
   
   ### What does actually happen?
   
   failed with a git error, like this:
   
   ```sh
   brodybits@brodybits-mini-macbook cordova-testing % ./cordova-mobile-spec/createmobilespec/createmobilespec.js --android           
   ### Creating project from local git repos. If you have any errors, it may be from missing repositories.
   To clone repositories:
     ./cordova-coho/coho repo-clone -r mobile-spec -r plugin-test-framework -r cli -r lib -r plugman -r android -r js -r plugins
     mkdir cordova-cli/node_modules
     (cd cordova-lib && npm install)
     (cd cordova-plugman/ && npm install)
     mkdir cordova-cli/node_modules
     ln -s ../../cordova-lib cordova-cli/node_modules
     (cd cordova-cli && npm install)
   To update all repositories:
     ./cordova-coho/coho repo-update
   Checking if you are using master branch of tools (js, lib, plugman, cli)
   $ git symbolic-ref HEAD
   refs/heads/master
   $ git symbolic-ref HEAD
   refs/heads/master
   $ git symbolic-ref HEAD
   refs/heads/master
   $ git symbolic-ref HEAD
   refs/heads/master
   You are on master branch of tools, checking npm links
   npm links are OK
   ### Creating project mobilespec...
   $ /Users/brodybits/dev/cordova-testing/cordova-cli/bin/cordova create mobilespec org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec/www
   Warning: using prerelease version 10.0.0-dev (cordova-lib@10.0.0-dev)
   Creating a new cordova project.
   Error: npm: Command failed with exit code 1 Error output:
   npm ERR! Error while executing:
   npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/cordova-mobile-spec/www.git
   npm ERR! 
   npm ERR! ERROR: Repository not found.
   npm ERR! fatal: Could not read from remote repository.
   npm ERR! 
   npm ERR! Please make sure you have the correct access rights
   npm ERR! and the repository exists.
   npm ERR! 
   npm ERR! exited with error code: 128
   
   npm ERR! A complete log of this run can be found in:
   npm ERR!     /Users/brodybits/.npm/_logs/2020-06-24T17_16_23_896Z-debug.log
       at ChildProcess.whenDone (/Users/brodybits/dev/cordova-testing/cordova-common/src/superspawn.js:136:25)
       at ChildProcess.emit (events.js:315:20)
       at maybeClose (internal/child_process.js:1021:16)
       at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
     stderr: 'npm ERR! Error while executing:\n' +
       'npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/cordova-mobile-spec/www.git\n' +
       'npm ERR! \n' +
       'npm ERR! ERROR: Repository not found.\n' +
       'npm ERR! fatal: Could not read from remote repository.\n' +
       'npm ERR! \n' +
       'npm ERR! Please make sure you have the correct access rights\n' +
       'npm ERR! and the repository exists.\n' +
       'npm ERR! \n' +
       'npm ERR! exited with error code: 128\n' +
       '\n' +
       'npm ERR! A complete log of this run can be found in:\n' +
       'npm ERR!     /Users/brodybits/.npm/_logs/2020-06-24T17_16_23_896Z-debug.log\n',
     code: 1
   }
   ```
   
   ### possible fix
   
   The following change seemed to resolve this issue:
   
   ```diff
   diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
   index 1e0bf85..21cf96b 100755
   --- a/createmobilespec/createmobilespec.js
   +++ b/createmobilespec/createmobilespec.js
   @@ -420,7 +420,7 @@ if (argv.plugman) {
        // Create the project using "cordova create"
        myDelete(cli_project_dir);
        console.log("### Creating project mobilespec...");
   -    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www");
   +    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www");
        shelljs.cp("-f", path.join(mobile_spec_git_dir, 'config.xml'), path.join(projectDirName, 'config.xml'));
    
        // Config.json file ---> linked to local libraries
   ```
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   see above
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   see above
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   host: macOS Catalina
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org