Cannot setup Coursera lab environment due to an error reported by Maven when running node setup command

Hello,

I'm trying to go through the Coursera courses for Apigee and I'm trying to setup the lab environment. I have installed and configured on my laptop the following:

java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T22:00:29+03:00)
Maven home: C:\apache-maven-3.6.1\bin\..
Java version: 12.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-12.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

However, when I run command node setup I get the following errors:

Modified files: [object Object]
[INFO] Scanning for projects...
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.144 s
[INFO] Finished at: 2019-05-06T18:01:41+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with t[INFO] ----------------------------------he -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information--------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.153 s
[INFO] Finished at: 2019-05-06T18:01:41+03:00
[INFO] ------------------------------------------------------------------------
 about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
'*' is not recognized as an internal or external command,
operable program or batch file.
(node:4500) UnhandledPromiseRejectionWarning: #<Object>
(node:4500) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4500) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
'*' is not recognized as an internal or external command,
operable program or batch file.
(node:4500) UnhandledPromiseRejectionWarning: #<Object>
(node:4500) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

What am I doing wrong?

Thank you.

Solved Solved
0 17 1,138
1 ACCEPTED SOLUTION

The error was caused by my apigee edge password. It must not contain characters '&' and '*'.

View solution in original post

17 REPLIES 17

I ran into the similar Mavin plug-in issue with the first lab for Api design course in Coursera. My environment is Mac, so the environment could be at play. I fixed mine by correctly configure the organization and password parameter using the one I obtained from the initial setup of Apigee Edge evaluation account. This appears to be a configuration setting issue.

Can you please check your Maven home, its usually the path that contains the bin directory. I see your Maven home includes the bin directory too. Please update that

Can you please confirm you provided the correct values for the prompt (like Apigee org, env, etc) when you ran node setup.js ?

Hello Sai Saran,

Regarding the value of my PATH environment variable, I set it as instructed by the official Maven page Installing Apache Maven. Here they say the following:

"Adding to PATH: Add the unpacked distribution’s bin directory to your user PATH environment variable by opening up the system properties (WinKey + Pause), selecting the “Advanced” tab, and the “Environment Variables” button, then adding or selecting the PATH variable in the user variables with the value C:\Program Files\apache-maven-3.6.1\bin."

I can try to add also the maven root folder but I fail to see how that might help.

As for the prompt values, I think I input the right ones. My Apigee username is the e-mail address I used to sign in into Apigee Edge portal. My organization is cpetrenciuc-eval as you can see in the screenshot below

8550-apigee-coursera-setting-up-lab-error-1.png

I entered "test" for the environment. For Firebase hostname I've entered "apigee-developer-trainin-2f8c5.firebaseio.com".

8551-apigee-coursera-setting-up-lab-error-2.png

My password contains characters '&' and '*'. Could this have an impact?

Thank you.

Hi @Cosmin Petrenciuc - yeah that could be the issue. I have seen a recent post with that issue. Team is working on the fix for that. I will get back to you once I have the fix. You could try changing your password to use other special character like ! or so

Sorry for the inconvenience

The error was caused by my apigee edge password. It must not contain characters '&' and '*'.

I tried this on my Mac and it works with the special character you have. Probably its an issue only on Windows

I am getting following error

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff} span.s1 {font-variant-ligatures: no-common-ligatures}

(node:1409) UnhandledPromiseRejectionWarning: Error: spawn mvn ENOENT

at _errnoException (util.js:1022:11)

at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)

at onErrorNT (internal/child_process.js:372:16)

at _combinedTickCallback (internal/process/next_tick.js:138:11)

at process._tickCallback (internal/process/next_tick.js:180:9)

(node:1409) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:1409) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

(node:1409) UnhandledPromiseRejectionWarning: Error: spawn mvn ENOENT

at _errnoException (util.js:1022:11)

at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)

at onErrorNT (internal/child_process.js:372:16)

at _combinedTickCallback (internal/process/next_tick.js:138:11)

at process._tickCallback (internal/process/next_tick.js:180:9)

(node:1409) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

I had "@" in my password as special character before i changed my password and put "(" special character but its still not working. Not sure what is the issue. If anyone can help.

Note: I am on MAC

Agreed with Sai, needs to confirm myOrganization and password value since the original build script is "canned" and needs to be updated to match the one you created for your eval Apigeee account during on-boarding. I also ran into a similar password issue including !@#$. I ran into some Edge private cloud installation issues, as well as the bash error running curl. It appears these characters may not be desirable for passwords, at least in command line or configuration files.

My password also contained one of those characters and was preventing the build. I changed my password and the build ran successfully.

Thanks @Victor Salas for chiming up. I tried to run the system admin change command, but received this error of "-bash: !@#$: event not found", the same one when running curl with this password. It looks this the Edge doesn't like "!@#$" in the password string.


Hello @Simon Xuan,

Currently my password contains an exclamation mark in it and it works just fine. I believe that the dollar sign and pound sign (&) are the trickiest ones.

Looks like this happens only in Windows. On my Mac, I tried with different special characters.. They all worked. Can you please confirm if you are seeing the error in Windows

Yes, it happens on Windows 10.

Yes, I am using Windows and my password contained the '&' character. I changed my password and everything ran fine.

Ok looks like its only on Windows. We will look into this. Thanks

navc88
New Member

Hi All,

I also got the similar issue changed my password containing the '&' character after that i am getting

GET https://api.enterprise.apigee.com/v1/organizations/navc88-eval/environments/test/targetservers accept: application/json accept-encoding: gzip authorization: Basic [Not shown in log] [ERROR] 500 Server Error { "code" : "usersandroles.SsoInternalServerError", "message" : "Invalid host or public key. Please provide the valid host and key value.", "contexts" : [ ] }

error.

Can any one help me out with this?

I had this same issue of getting a 500 error response and message "Invalid host or public key. Please provide the valid host and key value" when making a GET call to https://api.enterprise.apigee.com/v1/o/orgname/userroles/arole.

The problem was that I had an invalid username/password. Once I fixed this the call worked correctly.