Skip to content

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

@cskiraly

Description

@cskiraly

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions