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

request to nodered fails with TypeError: config.forEach is not a function #7

Open
cskiraly opened this issue Mar 16, 2018 · 2 comments
Labels

Comments

@cskiraly
Copy link
Contributor

@SedaPolatErdeniz, it seems there is some problem in the use of the NodeRed API. The below error message is repeated periodically in the logs:

agile-recommender        | will call get token
agile-recommender        | will call get token
agile-recommender        | get token succeeded
agile-recommender        | get token succeeded
agile-recommender        | will call flows
agile-nodered            | TypeError: config.forEach is not a function
agile-nodered            |     at Object.parseConfig (/opt/secure-nodered/node_modules/node-red/red/runtime/nodes/flows/util.js:78:16)
agile-nodered            |     at Object.setFlows (/opt/secure-nodered/node_modules/node-red/red/runtime/nodes/flows/index.js:109:34)
agile-nodered            |     at post (/opt/secure-nodered/node_modules/node-red/red/api/flows.js:68:22)
agile-nodered            |     at Layer.handle [as handle_request] (/opt/secure-nodered/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
agile-nodered            |     at next (/opt/secure-nodered/node_modules/node-red/node_modules/express/lib/router/route.js:131:13)
agile-nodered            |     at /opt/secure-nodered/node_modules/node-red/red/api/auth/index.js:57:28
agile-nodered            |     at complete (/opt/secure-nodered/node_modules/passport/lib/middleware/authenticate.js:250:13)
agile-nodered            |     at /opt/secure-nodered/node_modules/passport/lib/middleware/authenticate.js:257:15
agile-nodered            |     at pass (/opt/secure-nodered/node_modules/passport/lib/authenticator.js:421:14)
agile-nodered            |     at Authenticator.transformAuthInfo (/opt/secure-nodered/node_modules/passport/lib/authenticator.js:443:5)
agile-recommender        | will call flows
agile-recommender        | Exception in nodered api: 400 Bad Request
agile-recommender        | End of adding devices and workflows into the profile
agile-recommender        | 1- update profile is done
agile-recommender        | 2- call the service
agile-recommender        | with recommenderProfile with dev size: 1
agile-recommender        | with recommenderProfile with dev title: CC2650 SensorTag Temperature Humidity Pressure Optical
agile-recommender        | Exception in nodered api: 400 Bad Request
agile-recommender        | End of adding devices and workflows into the profile
@cskiraly
Copy link
Contributor Author

@seda, @nopbyte, @ansriaz, please have a look

@nopbyte
Copy link

nopbyte commented Mar 20, 2018

This exception only includes code from node-red in the stack. You can see this because all the entries in the exception stack trace are inside /node_modules/.

It is hard to understand the error, as there is no description of what you are attempting to do in your code @SedaPolatErdeniz.

Can you please post a minimal sample of code or curl command lines that reproduces the error?

To discard any potential issues regarding updates of AGILE security, i would recommend you to remove the $DATA/security folder and restart the containers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants