Error during Octopus deployment

Hi team,

I am deploying certain files using Octopus 2019 version, but suddenly i got the below error today during deployment. I am not sure what the Octopus step is trying to look into the "Work"folder? The step where this error occured is a normal “Powershell script” step template of Octopus. And this was working on other machines before, this is the first time such error occured.

PFB error:

E:\Integration\Work\20200320131409-65313-546\Script.ps1 : You cannot call a method on a null-valued expression.

At E:\Integration\Work\20200320131409-65313-546\Bootstrap.Script.ps1:1746 char:1

  • . ‘E:\Integration\Work\20200320131409-65313-546\Script.ps1’

  • 
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException 
    
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Script.ps1 
    
    
    
    

Please help if you have any clue about this error. Thanks in advance.

Regards
Sohil

Hi Sohil,

Thanks for getting in touch! I’m sorry to hear you’re hitting this issue. From the error message, it seems like it could be due to the user not having write permissions on the work folder. Is it possible that’s the cause? From there, I think the best way forward is to have a look at the full task log where you’re hitting this error, which should provide some more context. Would you be willing to send that through? You can mark this thread as private, or send it through to support@octopus.com and we can retrieve it there. :slight_smile:

I look forward to hearing back!

Best regards,

Kenny

Hi Kenneth,

Thanks for your reply, I checked its permissions and it has all the rights on the drive and folder in which the tentacle is running. Can you tell me where can i find the full task log so i can look for it?

Looking at the error it seems the tentacle is trying to look something into the “Work” folder where it dumps the script.ps1 and bootstrap,Output file stuff, but i checked the “Work” folder is completely empty. Since you are well versed with Octopus functionality so probably you might have a rough idea about this folder and some reason its not dumping those files?

E:\Integration\Work\20200320131409-65313-546\Script.ps1 : You cannot call a method on a null-valued expression.

At E:\Integration\Work\20200320131409-65313-546\Bootstrap.Script.ps1:1746 char:1

  • . ‘E:\Integration\Work\20200320131409-65313-546\Script.ps1’
  • CategoryInfo : NotSpecified: (:slight_smile: [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Script.ps1

Thanks and Regards
Sohil

Hey,

It seems the issue was within the script due to which it threw those errors, nothing wrong with Octopus . The issue has been fixed now. Thanks for your help.

Thanks
Sohil

Hi Sohil,

That’s great to hear you’ve spotted the issue! I appreciate you letting me know, and please don’t hesitate to reach out if you have any questions or concerns in the future. :slight_smile:

Best regards,

Kenny