Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOF Compilation Failed at Compile Artifacts #3

Open
milkaohnil opened this issue Dec 5, 2024 · 2 comments
Open

MOF Compilation Failed at Compile Artifacts #3

milkaohnil opened this issue Dec 5, 2024 · 2 comments

Comments

@milkaohnil
Copy link

milkaohnil commented Dec 5, 2024

Hello I'm currently facing an issue while compiling the Configuration.
I used the example configurations in the Data Project and fasing following error:

 | at <ScriptBlock>, D:\a\_temp\681802b7-c229-4ca9-8c12-15f694b93581.ps1: line 4
 | at <ScriptBlock>, <No file>: line 1
2024-12-05 10:03:53 [FAILURE] Build.ps1: [006] Error message: Exception calling "InvokeWithContext" with "2" argument(s): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: You cannot call a method on a null-valued expression."
2024-12-05 10:03:53 [FAILURE] Build.ps1: [006] StackTrace: at Configuration, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1: line 2232
 | at <ScriptBlock>, D:\a\1\s\CICD\Scripts\M365Configuration.ps1: line 1
 | at <ScriptBlock>, D:\a\1\s\CICD\Scripts\Build.ps1: line 104
 | at <ScriptBlock>, D:\a\_temp\681802b7-c229-4ca9-8c12-15f694b93581.ps1: line 4
 | at <ScriptBlock>, <No file>: line 1
2024-12-05 10:03:53 [FAILURE] Build.ps1: [007] Error message: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: You cannot call a method on a null-valued expression.
2024-12-05 10:03:53 [FAILURE] Build.ps1: [007] StackTrace: at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\M365DSC.CompositeResources\1.24.1016.100\DSCResources\AzureAD\AzureAD.schema.psm1: line 37
 | at Configuration, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1: line 2232
 | at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\M365DSC.CompositeResources\1.24.1016.100\DSCResources\AzureAD\AzureAD.schema.psm1: line 2
 | at <ScriptBlock>, D:\a\1\s\CICD\Scripts\M365Configuration.ps1: line 41
 | at Node, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1: line 1026
 | at <ScriptBlock>, D:\a\1\s\CICD\Scripts\M365Configuration.ps1: line 5
 | at Configuration, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1: line 2232
 | at <ScriptBlock>, D:\a\1\s\CICD\Scripts\M365Configuration.ps1: line 1
 | at <ScriptBlock>, D:\a\1\s\CICD\Scripts\Build.ps1: line 104
 | at <ScriptBlock>, D:\a\_temp\681802b7-c229-4ca9-8c12-15f694b93581.ps1: line 4
 | at <ScriptBlock>, <No file>: line 1

I'm also writing debug informations to the host:
CommandType Name Version Source


Configuration M365Configuration

Name Value


AllNodes {System.Collections.Hashtable}
NonNodeData {Environment, AppCredentials}

Following Cmdlets are used, to gather the output
Get-Command -Name M365Configuration
$mergedConfigDataNode | Format-Table -AutoSize

So the Files are imported correctly, but look like there are additional informations needed.
Any inputs?

@milkaohnil
Copy link
Author

Problem is still there

@ykuijs
Copy link
Owner

ykuijs commented Dec 20, 2024

Looks like there is an issue in the Azure AD data file. DSC is unable to compile the Azure AD config due to a value being NULL (not entered correctly / not present). Please check your data file if all fields are correctly entered.

You can also check the pipeline artifacts that is added to the Build pipeline. That will contain the merged data file.

You can also share the data file here. Just make sure you obfuscate any sensitive information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants