Azure Automation Account Source Control Error

Louis Ruocco 5 Reputation points
2024-07-05T17:19:27.52+00:00

Hi there,

I'm getting an error when using the Source Control for one of my runbooks.

I'm getting the following error log everytime I try to turn on the 'Auto Sync' setting. Currently, I only have 1 runbook so I can't really test this out on another runbook unfortunately: Source

System.Management.Automation.PropertyNotFoundException: The property 'entries' cannot be found on this object. Verify that the property exists.
   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()

I have attempted to downgrade the Azure modules in this Automation account, however, when downgrading them to the version before the latest (7.3 I believe) and the same error message is occurring. As a result, I can't auto sync this runbook every time a change has been made.

Please could you let me know if this is a known issue, and whether there is a work around or a fix for this?

Many thanks for your response

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,261 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Chidiebere Ugwu 25 Reputation points
    2024-07-05T22:38:15.1133333+00:00

    The error you're encountering when trying to enable 'Auto Sync' for your runbook appears to be related to a missing property in the script or object it's interacting with. The specific error, System.Management.Automation.PropertyNotFoundException: The property 'entries' cannot be found on this object, suggests that the script is trying to access a property called 'entries' that doesn't exist on the object it's dealing with.

    Follow the steps below to resolve:

    1. Review the Script Logic

    · Check for Typographical Errors:** Ensure that the property 'entries' is correctly referenced in the script.

    · Debug the Script: Add debug statements to print the object's properties before accessing 'entries'. This can help identify if the object structure is as expected.

     
    
    # Example of debugging
    
    Write-Output "Properties of the object:"
    
    $object | Get-Member
    
    Write-Output "Attempting to access 'entries' property"
    
    $entries = $object.entries
    
    
    1. Validate the Object Type

    · Verify Object Type: Ensure the object type being accessed has the 'entries' property. You can use Get-Member to inspect the properties of the object.

    $object | Get-Member
    
    1. Check Module Versions and Compatibility

    · Module Downgrade: While you mentioned downgrading the Azure modules, ensure that all dependencies are also compatible. Sometimes, multiple modules need to be downgraded together.

    1 person found this answer helpful.

  2. Gulnaz Mushtaq 410 Reputation points MVP
    2024-07-05T20:36:55.6533333+00:00

    Ensure that the modules you’re using in your runbook are compatible with graphical PowerShell runbooks. If you’re using non-default modules, consider using textual runbooks instead of graphical ones to overcome this issue.

    Outdated Azure modules can cause unexpected errors. Make sure your Azure modules are up-to-date. You mentioned downgrading to version 7.3, but if that didn’t resolve the issue, consider using the latest version of the Azure modules. Regarding the ‘Auto Sync’ setting, there’s a known issue with Azure DevOps repositories.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.