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

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
Anonymous
Not applicable

@sheldoncopper73  Moving to PCF forum. @HemantG 

Power Apps
Power Apps

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.

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

 

Helper I
Helper I

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!

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

@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>

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.

@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.

@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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Users online (3,521)