cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Couldn't import components (PCF)

I created a simple button component to test the code components framework.  I build the solution and uploaded/published it successfully. 

In a powerapp, after enabling components, I see my component in the import window. However, when I actually try to add it to my PowerApp I always get the error "Couldn't import components".

No other error message is displayed, and the component isn't added. Is there somewhere I can see what the actual issue is, and how I can solve this?

17 REPLIES 17
Highlighted
Community Support
Community Support

Re: Couldn't import components (PCF)

Hi @joerio ,

If you not give me error message, it's hard to find where the problem is.

Please check this issue, did you meet problem like this:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Unable-to-import-Components/m-p/270...

Maybe you could check the component limit to see whether you made mistake here:

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/limitations

Still many functions are not supported yet.

If the problem still exists, please ask for help here:

https://powerapps.microsoft.com/en-us/support/pro/ticket/

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Couldn't import components (PCF)

@v-yutliu-msft The whole issue is that I don't get any error message that could point me to the right direction

 

I see my component in the list and can select it.

ImportComponents.png

 

However, when I click the import button I only see this red banner with "Couldn't import components". No other error message is shown anywhere.

CouldntImport.png

 

How can I figure out what the actual exception is that is being thrown?

 

Highlighted
Power Apps
Power Apps

Re: Couldn't import components (PCF)

Hi @joerio 

Can you share out the ControlManifest.xml file from the control package you are trying to import?

The issue is probably due to using a tag in the xml file that Canvas doesn't support in loading yet like 'img'.

Highlighted
Helper I
Helper I

Re: Couldn't import components (PCF)

y updates on this issue? I'm having the same error - now way to debug!

My control stopped importing at some point in time. I rolled back version to the one I did import correctly. It didn't help:

  • when I import a component into a new app, it gives the error "Couldn't import component"
  • when I open an app with the existing component, it correctly detects that there is a new version, tries to update, but nothing happens - no error, but the app is opened with an old version of the component and it repeats again next time. 

 

Any help here @jopursle , please?? The manifest is really basic:

 

<?xml version="1.0" encoding="utf-8" ?>
<manifest>
  <control namespace="Technomancy" constructor="StripePayments" version="0.1.14" display-name-key="StripePayments" description-key="StripePayments description" control-type="standard">
    <property name="amount" display-name-key="Amount" description-key="Payment amount" of-type="Currency" usage="bound" required="true" />
    <resources>
      <code path="index.ts" order="1"/>
    </resources>
  </control>
</manifest>

 

Highlighted
Helper I
Helper I

Re: Couldn't import components (PCF)

An update on the above.

  1. I created a new project from scratch, copied the source files and manifest, renamed id, build, deployed - IT WORKS, successfully imported the component.
  2. I tried to remove all the generated bin, obj and out files from the original component to leave only source and project config files, rebuilt it and... no luck, the same error. This is really puzzling as directories seem to be identical. 

Any way to debug it? 

 

 

Highlighted
Power Apps
Power Apps

Re: Couldn't import components (PCF)

Hi @TechnoKitty 

Unfortunately, there isn't a good way to debug locally as the issue is happening in remote processing.

I haven't seen this issue before, so I can try to grab a repro to look in to why it's happening.  Do you have a test control that has the issue I could look at, or the Canvas session id from a session that hit this issue?

Highlighted
Helper I
Helper I

Re: Couldn't import components (PCF)

I sent you the code in a private message. Curious to know what it could be...

Highlighted
Power Apps
Power Apps

Re: Couldn't import components (PCF)

I was able to import and use the control successfully, so it's nothing to do with the control itself.

I assume it probably has to do with the files stored in CDS.  Are you able to use this control successfully with all the updated resources in Model or is this just a Canvas issue?  Also, did you recently remove files from the project or uninstall/reinstalled the solution?

 

One thing you can try is update the control version again and republish.  Afterwards click the "Publish all customizations" button,  attempt to add the control to a new Canvas app and see if it repros again.

My best guess is that there is an unexpected file from the old version that is no longer expected.

Highlighted
Helper I
Helper I

Re: Couldn't import components (PCF)

An update - I've tried to import the original component into another environment and it works! 

So, somehow, the component became incompatible (?!) with my environment (if it helps it's instance id a37edd15-97c2-4d3b-a9a9-c71279cfe9d0 or https://orgb14a6e51.crm6.dynamics.com/) . How might I clean it? Removing solution doesn't help, the deployment still says the component is present in the environment. 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Users online (8,343)