cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RAWilson
Level: Powered On

Cannot Add PCF Code Component to Canvas App

I am attempting to import one of my code components into a canvas app.  I receive a very generic error in the UI but after looking through the network traffic I get the following error.  Anyone have any thoughts or seen this before?

 

Thanks,

 

Rick

 

https://instance-eus.create.powerapps.com/v3.20022.21.144312096/api/v2/invoke

 

Request

Request.png

 

Response:

[{"dresult":{"f":[{"error":1,"errorMessage":"Sequence contains no matching element","templateName":"","controlName":"raw_RAW.ColorPicker.ColorPicker"}]}},
{"seq":35}]

 

Manifest File

https://github.com/rwilson504/PCFControls/blob/master/ColorPicker/ColorPicker/ControlManifest.Input....

 

Import Attempt

Import Code Component.pngImport Code Component

 

Error Message in UI

Cannot Import.pngError Message

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Cannot Add PCF Code Component to Canvas App

HI @RAWilson 

I couldn't import your component in the beginning ether.

First I thought it's because of the preview-image="preview.png" in your manifest, because it's documented only for model-driven apps: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/manifest-schema-reference/c...

But it still didn't work. 

BUT, strangely I could import it in a canvas app, after I deleted the second property "defaultColor" from the manifest.

I don't know what's "special" about this property. Maybe the defaultValue or comment, because of "#" in "#ffffff"? The only thing that I haven't tested before in a CanvasApp is the usage="input", but I think this shouldn't be a problem.

Best regards,

Diana

View solution in original post

3 REPLIES 3
Power Apps Staff HemantG
Power Apps Staff

Re: Cannot Add PCF Code Component to Canvas App

I was able to import the solution from the same github and have the working control inside my canvas app.

 

Can you please share your environment details and session ID for further investigation. (DM or hemantg@microsoft.com)

 

ColorPicker.png

 

hemant gaur

Re: Cannot Add PCF Code Component to Canvas App

HI @RAWilson 

I couldn't import your component in the beginning ether.

First I thought it's because of the preview-image="preview.png" in your manifest, because it's documented only for model-driven apps: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/manifest-schema-reference/c...

But it still didn't work. 

BUT, strangely I could import it in a canvas app, after I deleted the second property "defaultColor" from the manifest.

I don't know what's "special" about this property. Maybe the defaultValue or comment, because of "#" in "#ffffff"? The only thing that I haven't tested before in a CanvasApp is the usage="input", but I think this shouldn't be a problem.

Best regards,

Diana

View solution in original post

RAWilson
Level: Powered On

Re: Cannot Add PCF Code Component to Canvas App

Thank you Diana!!!

 

You were right on the money with the preview-image attribute causing the issue.

 

I copied the code from the original ColorPicker and renamed it to CanvasColorPicker and tried all these test below. 

 

-Initial Version. NO

-Remove preview-image attribute. NO

-Removed the ',' character from the description-key of the defaultColor property. NO
-Removed the ':' character from the description-key of the defaultColor property. NO
-Removed the '(' and ')' characters from the description-key of the defaultColor property. NO
-Removed # from the description-key and default-value of the defaultColor property. NO
-Removed the default-value attribute of the defaultColor property. NO
-Change name of defaultColor to something else. NO
-Removed the entire defaultColor property. NO

 

In between all the tests though I was only updating the control and solution versions and doing a publish all. So I took everything back from the start and this time between each test i actually deleted the control completely from the environment then re-imported.  It worked on the first test of removing the preview-image attribute!  I can even see my #ffffff default value.

 

Thanks Again Diana!

 

@HemantG Any way we could get an item put it to just ignore that attribute on import?

 

 

canvascolorpicker.png

 

 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Users online (10,306)