We keep running into an issue where we try and do a deployment and the deployment fails with a ‘Object Reference not set to an instance of an object’ during the Acquire packages step. What we noticed is that when we cleared the “PackageCache” Folder, on the octopus server, this clears up the issue and we can rerun the deployment and it will work but later the issue will crop up again and we need to keep repeatedly clearing the octopus “PackageCache” folder.
Below is the error log of the deployment in which the error happens.
Is this a known issue in the version of octopus we are using?
I was able to trace back and find that it looks like an antivirus that got installed on the octopus server was causing a lock on the file and having octopus be unable to access a package from the octopus server package cache. I would call this problem resolved!
I thought this was the issue but it seems to still be happening. I have done more investigation and it seems related to the Octo Delta Compression that is happening.
It looks like when you have an older version of the package on a tentacle octopus tries to do a delta compression to be efficient and this is when this error occurs. If delta compression is turned off the error goes away.
Would support be able to help on this issue so we can leave delta compression enabled?
Would you be able to provide us with the base package (the package that is already on Tentacle) and the packages that is being transferred so we can try to reproduce the problem on our end? Feel free to mark the conversation as private if the packages include any sensitive information.
Hi there, I’ll also be following this issue. I’m just recently having a similar issue upon deployment with the error message “Object Reference not set to an instance of an object.” To fix this, I clear the PackageCache folder of the previous version and retry the step. I believe Octo is trying to compare the delta and fails out at “Using nearest package:” – upon clearing the previous version’s package and retrying it works and proceeds to “Success: Upload package”.
Thanks for getting in touch! Would you be able to provide us with the base package (the package that is already on Tentacle) and the package that is being transferred so we can try to reproduce the problem on our end?
Feel free to send us the details via our support email and please mention this conversation.
Sorry for not getting back and hopefully this will solve harooys issue as well. The issue turned out to be i upgrade nuget.exe to the latest stable version. It apparantly is more strict on sem ver and was stripping leading 0’s out of the version #. This was somehow effecting octopus deploys delta algorithm. I would consider this resolved. I have made sure i have stripped leading 0’s before informing octopus about the version
Not a problem. Thank you for getting back to me with the outcome of your investigation. I’m glad you’ve solved the problem. We’ve received a few similar reports and we might do something about that in the future. You can track the progress of our work here.