Hi
I have a portal set-up with nodeJS that allows us to perform deployments through octopus which uses the REST API heavily. This has been running quite well with v1.6 for some time now and we’ve decided to migrate over to 2.0.
This all went well except in some of the power-shell steps we have some invoke-webrequest commands to post some deploy specific data back to the portal to be stored in a database. In v2.0 this was causing a system.nullReferenceException with the octopus logging. We found a workaround by either adding ‘| out–null’ to the end of the web request or placing the invoke web request object into a variable which then contained the response content from node.
The very strange thing was we had a situation with two web requests being made close together, the first would cause the exception, the request still being performed however, at this point the logging would stop, but the second request would still be made and performed then the octopus service would stop.
On the nodejs side of things we’re using express and all we was sending back was a string of either success or an error message. This was done by simply using the res.send(‘success’) where res’ is the response object provided by express.
Whilst the problem is bandaged up so to speak it would be nice to know what exactly is different between the two versions to cause this behaviour? Plus this information might be useful to others with a similar problem.