"Error creating user account: Error: Invalid application name" when adding User Data using script via StreetCarts AP

When running below command as per StreetCarts: Deploying and Running StreetCarts:

node streetcarts-config-seed register-users ./streetcarts-config.json ./data/users.json

I am getting below error:

"Error creating user account: Error: Invalid application name"

The appName in streetcarts-config.json = streetcarts

So what could be the problem here?

0 3 264
3 REPLIES 3

Hi @Antonio Figueiredo - Just double-checking. Please make sure you've replaced all the strings in the streetcarts-config.json file, as described here. There are a number of string replacements to be made, including API BaaS app (which may be the issue you're running into.) Give that a look and let us know what you find.

Thanks!

@Steve Traut

@Steve Traut

Hi Steve, thanks for writing in.

Ok heres what I am doing:

I have setup the streetcarts-config.json file as described.

I am trying to Add users via the streetcarts API, with below log output:

Owner@Owner-Laptop MINGW64 ~/Tony/Projects/EAPI100/StreetCarts/root/streetcarts/proxies/src/gateway/bin/seed (master)

$ node streetcarts-config-seed register-users ./streetcarts-config.json ./data/users.json

Creating user Liz456

Creating user steffen111

Creating user freewill444

Creating user jonesy42

Creating user Alex666

Creating user steve303

Request: POST https://antoniofigueiredo1-test.apigee.net/v1/streetcarts/users

Headers: {"Content-Type":"application/json","x-api-key":"QMMdyu1N63b3nUjaTl0PcueEAG1AjiG4"}

Status code: 200

Response: {"statusCode":200,"body":"{\"message\":\"Invalid application name\",\"statusCode\":400,\"errorType\":\"illegal_argument\"}","headers":{"date":"Thu, 03 Nov 2016 14:54:51 GMT","content -type":"application/json; charset=utf-8","content-length":"86","connection":"close","x-powered-by":"Express","access-control-allow-origin":"*","etag":"W/\"56-vnfKJvw1QrkNglGMFM6M4A\"","server" :"Apigee Router"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"antoniofigueiredo1-test.apigee.net","port":443,"hostname":"antoniofigueiredo1-test.apigee.net","hash" :null,"search":null,"query":null,"pathname":"/v1/streetcarts/users","path":"/v1/streetcarts/users","href":"https://antoniofigueiredo1-test.apigee.net/v1/streetcarts/users"},"method":"POST","he aders":{"Content-Type":"application/json","x-api-key":"QMMdyu1N63b3nUjaTl0PcueEAG1AjiG4","content-length":206}}}

Error creating user account:

Error: Invalid application name

Request your inputs to the above error:

Thanks

Antonio

@Steve Traut

Hi,

Tracing the data-manager proxy for above issue, and the Output from the Transaction to add user is giving below error:

*** Error: Cannot find module 'cors' Error: Cannot find module 'cors' at module.js:340 at module.js:280 at module.js:364 at require (module.js:380) at /organization/environment/api/server.js:10 at module.js:456 at module.js:474 at module.js:356 at module.js:312 at module.js:497 at startup (trireme.js:142) at trireme.js:923 *** Starting script *** Error: Cannot find module 'cors' Error: Cannot find module 'cors' at module.js:340 at module.js:280 at module.js:364 at require (module.js:380) at /organization/environment/api/server.js:10 at module.js:456 at module.js:474 at module.js:356 at module.js:312 at module.js:497 at startup (trireme.js:142) at trireme.js:923

Request your inputs for this issue.

Thanks

Antonio