cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WarrenR
Frequent Visitor

Invoke-PowerAppsChecker Message: Value cannot be null. Parameter name: source

Hi
I am trying to run the PowerApps Checker from PowerShell and am getting a error as shown below. Struggling as to where to look to troubleshoot this. Any guidance would be appreciated.

 

The command i am executing is (all variables assigned before this call):

$analyzeResult = Invoke-PowerAppsChecker `
-TenantId                $Tenantid `
-Geography               $Geography `
-ClientApplicationId     $ClientApplicationId `
-ClientApplicationSecret $ClientApplicationSecret `
-Ruleset                 $ruleSetToUse `
-FileUnderAnalysis       $FileUnderAnalysis `
-OutputDirectory         $OutputDirectory `
-Verbose

 

The error is:

VERBOSE: TrackingId is 9d419980-bc62-4809-bc33-19ca2ba27450 VERBOSE: Entering InvokePowerAppsChecker - EndProcessing VERBOSE: Executing InvokePowerAppsChecker
VERBOSE: Upload started : 1 files
VERBOSE: Requesting Authentication - Start
VERBOSE: Requesting Authority from server - Start
VERBOSE: Requesting Authority from server - Finished : 00:00:00.0748128
VERBOSE: Requesting Authentication - Completed : 00:00:00.3220412
VERBOSE: Uploaded finished: 1 files taking 00:00:07.3402576
VERBOSE: Requesting Authentication - Start
VERBOSE: Requesting Authentication - Completed : 00:00:00.0083386
VERBOSE: Calling status check API. Loop count 1
VERBOSE: Requesting Authentication - Start
VERBOSE: Requesting Authentication - Completed : 00:00:00.0009733
VERBOSE: Finished calling status check API. Loop count 1
VERBOSE: Pausing for 15 seconds.
VERBOSE: Calling status check API. Loop count 2
VERBOSE: Requesting Authentication - Start
VERBOSE: Requesting Authentication - Completed : 00:00:00.0039218
VERBOSE: Finished calling status check API. Loop count 2
VERBOSE: Failed InvokePowerAppsChecker - EndProcessing : 00:00:22.9153801
VERBOSE:
VERBOSE: Message: Value cannot be null.
Parameter name: source
VERBOSE: Source : System.Core
Method : Select
Date : 29/03/2021
Time : 09:07:33
Error : Value cannot be null.
Parameter name: source
Stack Trace : at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at Microsoft.PowerApps.Checker.PowerShell.Cmdlets.InvokePowerAppsChecker.EndProcessing()
================================================================================================================
======
Id Name
-- ----
083a2ef5-7e0e-4754-9d88-9455142dc08b AppSource Certification
0ad12346-e108-40b8-a956-9a8f95ea18c9 Solution Checker
0ad12346-e108-40b8-a956-9a8f95ea18c9 Solution Checker
Invoke-PowerAppsChecker : Value cannot be null.
Parameter name: source
At C:\SOURCE\Test.ps1:68 char:18
+ $analyzeResult = Invoke-PowerAppsChecker `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-PowerAppsChecker], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.PowerApps.Checker.PowerShell.Cmdlets.InvokePowerAppsChecker

1 ACCEPTED SOLUTION

Accepted Solutions
MikeHuguet
Power Apps
Power Apps

Hello @WarrenR,

 

Thank you for providing the TrackingId. This helped in analyzing the internal telemetry. Can you double check the path provided and ensure that it includes a valid Dataverse solution either directly or in a Package? The telemetry is telling me that there isn't one found in the file provided.

 

Thanks,

Mike

View solution in original post

4 REPLIES 4
cchannon
Memorable Member
Memorable Member

Not 100% sure exactly what your problem is, but here is my take on the error, hopefully it is useful to your debugging:

First, you are not crazy: Source is not a parameter anywhere in the PowerShell module. You have not skipped anything and AFAICT your Invoke-PowerAppsChecker looks correct.

 

Second, look at your message in detail: there is an authentication loop in there that tries twice immediately before your error hits:


VERBOSE: Requesting Authentication - Start
VERBOSE: Requesting Authentication - Completed : 00:00:00.0083386
VERBOSE: Calling status check API. Loop count 1
VERBOSE: Requesting Authentication - Start
VERBOSE: Requesting Authentication - Completed : 00:00:00.0009733
VERBOSE: Finished calling status check API. Loop count 1
VERBOSE: Pausing for 15 seconds.
VERBOSE: Calling status check API. Loop count 2
VERBOSE: Requesting Authentication - Start
VERBOSE: Requesting Authentication - Completed : 00:00:00.0039218
VERBOSE: Finished calling status check API. Loop count 2

 

If I were debugging this, I would put all my focus there. Why did the auth not work on the first try, and yet not throw an error? It logged out steps for requesting Authority, so I have to assume you don't have a connectivity error; maybe there is something amiss in your app registration's permissions? Or maybe (and this would be my first guess here) your authentication is working but you aren't getting the proper redirect URL from AD, so your app never knows that it worked.  I'd start with doublechecking your app registration:

 

(from MSFT documentation)

The following are required for the application's registration in AAD for all interactions:

  • Redirect URI
    • Type: Public client (mobile & desktop)
    • Redirect URI: urn:ietf:wg:oauth:2.0:oob
  • API level permissions to the PowerApps-Advisor first party Micrsoft AAD application
    • Application permissions to Analysis.All

 

If that doesn't sort it out for you, then I would double-check for connectivity issues and make sure you are using the correct key and secret (maybe you have one for a different app with the wrong setup?) after that, to be honest, I would just be stabbing in the dark.

MikeHuguet
Power Apps
Power Apps

Hello @WarrenR,

 

Thank you for providing the TrackingId. This helped in analyzing the internal telemetry. Can you double check the path provided and ensure that it includes a valid Dataverse solution either directly or in a Package? The telemetry is telling me that there isn't one found in the file provided.

 

Thanks,

Mike

View solution in original post

Hi Mike,
Thanks for your reply ... I made a real Dodo error ... I had downloaded the main App file in my solution instead of exporting the whole solution (I was doing it manually instead of in my DevOps pipeline).

Downloaded the correct file and I now get a new zip file in the Output folder with the .sarif file embedded!!

All sorted.

Thanks again.
Warren

MikeHuguet
Power Apps
Power Apps

This is great news indeed!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,352)