web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Couldn't import compon...
Power Apps
Unanswered

Couldn't import components (PCF)

(0) ShareShare
ReportReport
Posted on by 4

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?

I have the same question (0)
  • v-yutliu-msft Profile Picture
    on at

    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/270504

    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,

  • Joerio Profile Picture
    4 on at

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

     

  • JP-09110045-0 Profile Picture
    on at

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

  • TechnoKitty Profile Picture
    68 on at

    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>

     

  • TechnoKitty Profile Picture
    68 on at

    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? 

     

     

  • JP-09110045-0 Profile Picture
    on at

    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?

  • TechnoKitty Profile Picture
    68 on at

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

  • JP-09110045-0 Profile Picture
    on at

    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.

  • TechnoKitty Profile Picture
    68 on at

    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. 

  • JP-09110045-0 Profile Picture
    on at

    Looking at the project you provided, it looks like you are building the solution as unmanaged.  Removing an unmanaged solution won't actually remove the components, which is a limitation to unmanaged whereas managed doesn't have this issue.  Managed has other restrictions however as that's only really meant for deployment (although I still use it personally for testing as uninstalling is nice).

     

    I can ask around for the best way to clean up the older files, but you can also try publishing a newer version and hitting "Publish all customizations".  You can also change the name of the control and it will see it as a new control and won't have this issue.

    If you can remember the steps on how you got to this state, that would be helpful as CDS shouldn't be having the control files in this state, whatever it is...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard