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

Get-AzApplicationInsights : Exception calling ".ctor" with "3" argument(s): "Value cannot be null. Parameter name: source" At line:1 char:1 #20697

Closed
krishnasingh1818 opened this issue Jan 18, 2023 · 2 comments · Fixed by #20782
Assignees
Labels
Azure PS Team bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Monitor - LogAnalytics

Comments

@krishnasingh1818
Copy link

Description

This command earlier used to work but now its not working

Get-AzApplicationInsights -Name "appinsname" -ResourceGroupName "rgname" -Full

returns error

Get-AzApplicationInsights : Exception calling ".ctor" with "3" argument(s): "Value cannot be null.
Parameter name: source"
At line:1 char:1

image

Please advise what could be causing this error.

Issue script & Debug output

Get-AzApplicationInsights : Exception calling ".ctor" with "3" argument(s): "Value cannot be null.
Parameter name: source"
At line:1 char:1

Environment data

Name                           Value                                                                                                                                                                        
----                           -----                                                                                                                                                                        
PSVersion                      5.1.19041.2364                                                                                                                                                               
PSEdition                      Desktop                                                                                                                                                                      
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                      
BuildVersion                   10.0.19041.2364                                                                                                                                                              
CLRVersion                     4.0.30319.42000                                                                                                                                                              
WSManStackVersion              3.0                                                                                                                                                                          
PSRemotingProtocolVersion      2.3                                                                                                                                                                          
SerializationVersion           1.1.0.1

Module versions

PS C:\Users\v485292> Get-Module Az*

ModuleType Version    Name                                ExportedCommands                                                                                                                                  
---------- -------    ----                                ----------------                                                                                                                                  
Script     2.10.4     Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault...}                                                                          
Script     2.2.0      Az.ApplicationInsights              {Get-AzApplicationInsights, Get-AzApplicationInsightsApiKey, Get-AzApplicationInsightsContinuousExport, Get-AzApplicationInsightsLinkedStorageA...

Error output

Message        : Exception calling ".ctor" with "3" argument(s): "Value cannot be null.
                 Parameter name: source"
StackTrace     :    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.DoProcessRecord()
                    at System.Management.Automation.CommandProcessor.ProcessRecord()
Exception      : System.Management.Automation.MethodInvocationException
InvocationInfo : {}
Line           :             $PSCmdlet.WriteObject([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan]::New($component, $pricingPlan, 
                 $dailyCapStatus))
                 
Position       : At C:\Program Files\WindowsPowerShell\Modules\Az.ApplicationInsights\2.2.0\custom\Get-AzApplicationInsights.ps1:149 char:13
                 +             $PSCmdlet.WriteObject([Microsoft.Azure.PowerShell.Cmdlets ...
                 +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : Value cannot be null.
                 Parameter name: source
StackTrace     :    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
                    at Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponent..ctor(ApplicationInsightsComponent component)
                    at Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan..ctor(ApplicationInsightsComponent component, 
                 ApplicationInsightsComponentBillingFeatures billing, ApplicationInsightsComponentQuotaStatus status)
                    at CallSite.Target(Closure , CallSite , Type , Object , Object , Object )
Exception      : System.ArgumentNullException
InvocationInfo : {}
Line           :             $PSCmdlet.WriteObject([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan]::New($component, $pricingPlan, 
                 $dailyCapStatus))
                 
Position       : At C:\Program Files\WindowsPowerShell\Modules\Az.ApplicationInsights\2.2.0\custom\Get-AzApplicationInsights.ps1:149 char:13
                 +             $PSCmdlet.WriteObject([Microsoft.Azure.PowerShell.Cmdlets ...
                 +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1
@krishnasingh1818 krishnasingh1818 added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jan 18, 2023
@ghost ghost added customer-reported and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jan 18, 2023
@RakeshMohanMSFT RakeshMohanMSFT self-assigned this Jan 19, 2023
@RakeshMohanMSFT RakeshMohanMSFT added the CXP Attention [Deprecated] The Azure CXP Support Team is responsible for this issue. label Jan 19, 2023
@ghost
Copy link

ghost commented Jan 19, 2023

Thank you for your feedback. This has been routed to the support team for assistance.

@RakeshMohanMSFT
Copy link
Contributor

@krishnasingh1818 Thank you for reaching out to us, we are looking into it.

@RakeshMohanMSFT RakeshMohanMSFT added Azure PS Team and removed CXP Attention [Deprecated] The Azure CXP Support Team is responsible for this issue. labels Jan 19, 2023
@RakeshMohanMSFT RakeshMohanMSFT removed their assignment Jan 19, 2023
@VeryEarly VeryEarly self-assigned this Jan 19, 2023
@VeryEarly VeryEarly linked a pull request Jan 30, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure PS Team bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Monitor - LogAnalytics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants