Common issues and workarounds
Here are some common issues that you might come across while using the Power Apps component framework and Microsoft Power Platform CLI.
Component changes are not reflected after the updated solution import?
Update the component version (minor or patch) in the component manifest file (for example, 1.0.0 to 1.0.1). Every update in the component needs a component version bump to be reflected on the Microsoft Dataverse server.
<control namespace="SampleNamespace" constructor="TSLinearInputControl"
version="1.0.1"
display-name-key="TSLinearInputControl_Display_Key" description-key="TSLinearInputControl_Desc_Key" control-type="standard">
Msbuild error MSB4036
- The name of the task in the project file is same as the name of the task class.
- The task class is public and implements the Microsoft.Build.Framework.ITask interface.
- The task is correctly declared with <UsingTask> in the project file or in the *.tasks files located in the path directory.
Workaround:
- Open Visual Studio Installer.
- For Visual Studio 2017 or higher, select Modify.
- Select Individual Components.
- Under Code Tools, check NuGet targets & Build Tasks.
Note
We will be constantly adding common issues and workarounds as we come across during the development process. If you encounter an issue and have a workaround and you think that is helpful, raise the issue here or raise a pull request so that we can review and add it to the list.
Issues while updating existing code components
If you have created a code component using the CLI version 0.1.817.1 or earlier and want to ensure that the latest build and debug modules are being used, make the updates to the
package.json
file as shown below:"dependencies": { "@types/node": "^10.12.18", "@types/powerapps-component-framework": "1.1.0"}, "devDependencies": { "pcf-scripts": "~0", "pcf-start": "~0" }
Error: Failed to retrieve information about Microsoft.PowerApps.MSBuild.Pcf from remote source <Feed Url> when the build fails for authorization issues.
Workaround
Open the
NuGet.Config
file from %APPDATA%\NuGet. The feed from which the user is getting the error should be present in this file.Remove the feed from the
NuGet.Config file
or generate a PAT token and add it to theNuget.Config file
. For example:<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="YourFeedName" value="https://contoso.com/_packaging/YourFeedName/nuget/v3/index.json" /> </packageSources> <packageSourceCredentials> <YourFeedName> <add key="Username" value="anything" /> <add key="Password" value="User PAT" /> </YourFeedName> </packageSourceCredentials> </configuration>
Web resource size is too large
Error Import Solution Failed: Web resource content size is too big.
Workaround
- Build the
.pcfproj
as release configuration, which sets the web pack to production mode using the commandmsbuild /property:configuration=Release
- Run the msbuild command with an extra property as shown below:
msbuild /p:PcfBuildMode=production
- Edit the
.pcfproj
to always build the web pack in production mode by setting the propertyPcfBuildMode
to production:<PropertyGroup> <Name>TS_ReactStandardControl</Name> <ProjectGuid>0df84c56-2f55-4a80-ac9f-85b7a14bf378</ProjectGuid> <OutputPath>$(MSBuildThisFileDirectory)out\controls</OutputPath> <PcfBuildMode>production</PcfBuildMode> </PropertyGroup>
When running Power Apps checker with the solution built using CLI tooling in default configuration
Error: Do not use the eval function or its functional equivalents
This warning is by design since the default msbuild
configuration is Configuration=Debug
. This in turn instructs web pack (used to bundle the code component) to package in development mode, which emits eval()
.
Workaround
Re build the solution file using the following either of the commands and reimport the solution into Dataverse.
msbuild/property:configuration:Release
npm run build -- --buildMode production
Authentication for third party services fails in Canvas
PCF authentication for third parties is not supported.
Workaround
Use combination of a custom page and a connector.
Control cannot finish loading
If you use refresh in updateView
you must include a guarding condition, otherwise it will create an infinite loop. Whenever refresh
is called, it will reset the page number to 1, and then fetch the first page of records under the current filtering and sorting criteria. When the updated data is received by the client, updateView
will be called to update the display. The result is that the control cannot finish loading and will not be able to fetch records beyond the first page.
Same page is loaded rather than the expected one
refresh, loadExactPage, loadNextPage, loadPreviousPage do not support parallel execution.
When these functions are called, the results for the requested page will not be available immediately in the next line. Instead they will trigger updateView
on the control with newly fetched results.