cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

PCF Control Question

Hi Team,

 

We have developed a PCF control for a single line of text and we use the latest PowerApps Component Framework (Version: 0.2.899.1). We do not get the WebAPI and Utility feature inside context. All values inside context of WebAPI and Utility feature are nulls. We add below lines in ControlManifest.Input.xml  but no success, we get below error while importing the solution as below:

 

<feature-usage>

      <uses-feature name="Utility" required="true" />

     <uses-feature name="WebAPI" required="true" />

</feature-usage>

 

Error: Import Solution Failed: CustomControl with name  failed to import with error: The import manifest file is invalid. XSD validation failed with the following error: 'The import manifest file is invalid. XSD validation failed with the following error: 'The element 'control' has invalid child element 'feature-usage'. List of possible elements expected: 'data-set, built-by, modes, child, type-group, common-property, property, groups, dependencies, property-dependencies, event, subscribed-functionalities, resources, AvailableOn'.'."'."

 

Thank You.

19 REPLIES 19
TopShelf-MSFT
Level 10

Re: PCF Control Question

@sheldoncopper73  Moving to PCF forum. @HemantG 

PowerApps Staff GregHurlmanMSFT
PowerApps Staff

Re: PCF Control Question

Sorry for this; it seems that you're caught between planned preview release updates at this point which is why you're having trouble on both ends. What I would recommend to you right now would be to re-comment out the feature-usage element tree in the manifest, and add null-handling code when checking for feature usage.

On Saturday the server-side update is scheduled to be deployed, and you'll be able to uncomment that part of the manifest and be good to import your control with those manifest changes and see proper responses from the feature use APIs going forward.

Re: PCF Control Question

Hi,

We are facing the same issue in some organization and the same control is working in other organization. Please refer the attached screenshot.

 

ContextIssue.png

 

JoCas
Level: Powered On

Re: PCF Control Question

Hi MSFT team,

Do we have any updates regarding this matter? We have a bunch of components in use that heavily rely on the webAPI and utility functions and all of them aren't working right now. Can you suggest any temporary workaround that we can do in the manifest or in the code while we're waiting for the update?

Many thanks!

PowerApps Staff GregHurlmanMSFT
PowerApps Staff

Re: PCF Control Question

@sheldoncopper73 @JoCas Can you post what your ComponentManifest.Input.xml files look like so I can confirm the config is correct?

JoCas
Level: Powered On

Re: PCF Control Question

@GregHurlmanMSFT 
<?xml version="1.0" encoding="utf-8" ?>
<manifest>
  <control namespace="ActivityPlanView" constructor="ActivityPlanView" version="1.5.0" display-name-key="ActivityPlanView" description-key="ActivityPlanView" control-type="standard">
    <!-- dataset node represents a set of entity records on CDS; allow more than one datasets -->
    <data-set name="ActivityAssignments" display-name-key="Activity Assignments">
      <property-set name="ActivityTemplate" display-name-key="Activity Template" description-key="Activity Template" of-type="Lookup.Simple" usage="bound" required="true" />
      <property-set name="AssignToId" display-name-key="Assign To ID" description-key="Assign To ID" of-type="SingleLine.Text" usage="bound" required="true" />
      <property-set name="DaysFromStart" display-name-key="Days From Start" description-key="Days From Start" of-type="Whole.None" usage="bound" required="true" />
      <property-set name="ActivityJson" display-name-key="Actvity JSON" description-key="Activity JSON" of-type="Multiple" usage="bound" required="true" />
    </data-set>
    <resources>
      <code path="index.ts" order="1"/>
    </resources>
    <!-- UNCOMMENT TO ENABLE THE SPECIFIED API
    -->
    <feature-usage>
      <uses-feature name="Device.captureAudio" required="true" />
      <uses-feature name="Device.captureImage" required="true" />
      <uses-feature name="Device.captureVideo" required="true" />
      <uses-feature name="Device.getBarcodeValue" required="true" />
      <uses-feature name="Device.getCurrentPosition" required="true" />
      <uses-feature name="Device.pickFile" required="true" />
      <uses-feature name="Utility" required="true" />
      <uses-feature name="WebAPI" required="true" />
    </feature-usage>
  </control>
</manifest>
JoCas
Level: Powered On

Re: PCF Control Question

Screenshot_1.png

@GregHurlmanMSFT  It's working fine yesterday, but without doing any changes, now it doesn't. Already tried re-commenting the feature-usage tag.

PowerApps Staff GregHurlmanMSFT
PowerApps Staff

Re: PCF Control Question

@JoCas After making that change, did you increment the control's version number in the manifest, and the version of the solution file as well?

If so, can you post the Unified Interface version number you have in the environment where it's not working? To find it, open a Unified Interface app, click the gear icon in the upper right next to your name, click About, and copy the information there.

JoCas
Level: Powered On

Re: PCF Control Question

@GregHurlmanMSFT Yes I did both the increments. I'm pretty sure the changes were applied. 
Here's the versions I found:
Server version: 9.1.0000.6430
Client version: 1.3.1974-190715-212024

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,154)