Can't deploy in production - "can not read property credentials of null"

Hi there,
I have 2 environments deployed in bluemix/IBM cloud:
-Development: 1xnode-red instance + 1xCloudant instance
-Production: 1xnode-red instance + 1xCloudant instance
Things run fine, the instances are connected correctly together as they should with VCAP services.

Sometimes I want to push my dev work to production. To do that I do a couple of steps:

  • I copy the nodered/flows document from dev-cloudant to prod-cloudant
  • In this nodered/flows document, I change the name of the cloudant instance name to the production one.

I see this is not practicle today - time consuming and error prone and I am eager to find a better way. But still it should work (I think?). Nevertheless this is the weird behaviour I get, when I restart the node-red production app.

  • When I go to the editor, and hit "deploy all", ALL the cloudant nodes will generate a error debug message: "typeError: can not read property credentials of null".
    So I get like 30 of these at once, only from cloudant nodes.

  • I double click on one of these cloudant nodes - config looks ok (service is well set to the name of the production cloundant). I close this edit pannel. Redeploy. And the error is gone. (so I need to do it for the 30 nodes I have to get rid of the error debug messages)

So it looks like opening and closing the pannel will correct something that is wrong in the file.
Anyone has an idea why this is happening?

Just note I have read the nice workshop from Nick O'Leary about node-red in production.
But my setup is different as both my dev and production are in bluemix...

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.