web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Solution Deployment to...
Power Apps
Unanswered

Solution Deployment to another environment

(0) ShareShare
ReportReport
Posted on by 9

I am deploying my solution to another environment and I am not getting any depedency issues. the solution starts importing but then it shows :failed to import " because of following error:

Import of app module(s) failed: Value cannot be null. Parameter name: canvasAppReference

I have no idea why this is happening, because i have selected option "include all objects" for the model-driven app in the solution and also for the canvas app in solution.

 

if anybody has ideas please let me know

Categories:
I have the same question (0)
  • JoeFitz Profile Picture
    43 on at

    I would suggest using the Solution Checker to try and identify the missing dependencies. You can see the Microsoft Documentation here https://learn.microsoft.com/en-us/power-apps/maker/data-platform/use-powerapps-checker 

     

    ---------------------------

    If the solution I provided assisted you in resolving this issue, kindly select "Accept as solution".

     

  • ErikLm Profile Picture
    17 on at

    Hi @Akanksha09,

     

    I have the exact same problem, have you been able to solve it?

  • matthhias Profile Picture
    48 on at

    Same here. No clue what is causing this issue

  • K43876 Profile Picture
    37 on at

    Same here. Any one?

  • K43876 Profile Picture
    37 on at

    It happened after I included a custom control. Solution Checker did not give any serious problems. The deployment pipeline from dev to test validated the solution with "passed" but threw an error: 

     

    Failure details
    Value cannot be null. Parameter name: canvasAppReference
    Operation details
    Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault] Message: Value cannot be null. Parameter name: canvasAppReference
  • K43876 Profile Picture
    37 on at

    Here's the stack trace of the error:

     

    System.ArgumentNullException: Value cannot be null. Parameter name: canvasAppReference
    at Microsoft.Dynamics.AppModule.Plugins.Common.Exceptions.ThrowIfNull(Object obj, String name, ITelemetryProvider telemetryProvider)
    at Microsoft.Dynamics.AppModule.Plugins.CreateAppElement.ExecuteInternal(IServiceProviderWrapper serviceProvider)
    at Microsoft.Dynamics.AppModule.Plugins.PluginBase.<>c__DisplayClass0_0.<Execute>b__0()
    at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
    at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    --- End of inner exception stack trace ---
    --- End of inner exception stack trace ---
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass6_0.<RunStep>b__0() 

  • K43876 Profile Picture
    37 on at

    I have finally resoled the issue by unpacking the solution zip file and editing manually AppModule.xml file and then repacking, importing back to the solution. The cause looks like a bug in the Microsoft's Power Apps solution management. 

     

    Use the following pac command:

    # Unpack
    pac solution unpack --zipfile yoursolution_1.1.2.59.zip --folder Unpacked\unpacked_1.1.2.59\. 
    # Repack after edit
    pac solution pack --folder Unpacked\unpacked_1.1.2.59\ --zipfile yoursolution_1.1.2.59_repacked.zip

    Once unpacked, load the files in Visual Studio (or your favorite editor) and examine AppModule.xml files under AppModule folder.  I discovered one of AppElement has missing <canvasAppId> :

    <appelement uniquename="..._manageedits_4f5eb">
    <canvasappid>
    <name>..._manageedits_4f5eb</name>
    </canvasappid>
    <iscustomizable>1</iscustomizable>
    <name>..._manageedits_4f5eb</name>
    </appelement>
    <appelement uniquename="..._editinitiative_a8ddb">
    <iscustomizable>1</iscustomizable>
    <name>..._editinitiative_a8ddb</name>
    </appelement>

    I showed one normal appelement ("..._manageedit") and a broken one ("...editinitiative") above. You can see the second element has missing "<canvasappid><name>..._editinitiative_a8ddb</name></canvasappid>" part. This aligns well with the deployment error message "Value cannot be null. Parameter name: canvasAppReference" too. 

     

    I am not sure how this broken element was creeped into my solution but I guess Power Platform did not completely removed all the reference when I deleted an unnecessary custom page (custom pages are considered as "canvas app" in the unpacked xml files). This must be a bug in the platform. 

     

    So, what I did was basically, add back the deleted custom page to my solution, exported again, still the <canvasappid> element was missing, manually add them back, repack, re-import, export again, unpack, confirm my edit of <canvasappid> was still there, then pushed to TEST environment again. Voila! it deployed successfully. 

     

    Hope this helps. Cheers!

     

     

  • Youcef Doumandji Profile Picture
    6 on at
    Hi,
    I have exactly the same issue. Did you find a solution ?
    Bets regards.
    Youcef

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard