Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createmobilespec.js fails with a git error #207

Open
3 tasks done
brodycj opened this issue Jun 24, 2020 · 0 comments
Open
3 tasks done

createmobilespec.js fails with a git error #207

brodycj opened this issue Jun 24, 2020 · 0 comments

Comments

@brodycj
Copy link

brodycj commented Jun 24, 2020

Bug Report

Problem

What is expected to happen?

A command like this from the documentation should just work after following the prerequisites:

node ./cordova-mobile-spec/createmobilespec/createmobilespec.js --android

What does actually happen?

failed with a git error, like this:

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 --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

see above

Command or Code

see above

Environment, Platform, Device

see above & below

Version information

host: macOS Catalina

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant