Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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?

  • JP-09110045-0 Profile Picture
    on at
    Re: Couldn't import components (PCF)

    That issue should already be fixed and checked in, it's just the train it's on isn't available yet.  Hopefully it will be available next week, but no guarantees.

  • TechnoKitty Profile Picture
    68 on at
    Re: Couldn't import components (PCF)

    Another issue related to this you may want to look into, @jopursle, is when a component cannot be imported (for whatever reason) during an update of the existing app, the error is NOT displayed which makes it difficult to detect and troubleshoot.  

  • JP-09110045-0 Profile Picture
    on at
    Re: Couldn't import components (PCF)

    @TechnoKitty Thanks for the confirmation.  I was able to find the error message at least that let me know that somewhere a Linq command was failing to find an element which narrowed it down a bit, but based on your info I think I know where it is happening.

    It looks like import is still getting resources no longer directly referenced and then we fail on the check where all resources must be referenced by the manifest file.

    I'll log a bug against myself to get this fixed.  It shouldn't be that difficult to fix, but it will take a while to become available due to release schedules.  For now, I'd advise not removing resources from a control (if using in Canvas) to get around this issue until a fix becomes available.

     

    Thanks again @TechnoKitty for the info to track down the issue.

  • TechnoKitty Profile Picture
    68 on at
    Re: Couldn't import components (PCF)

    I think I can reproduce and fix* the issue now, @jopursle 

    If I remove any resource from the Manifest which was declared there previously (I tried CSS), then I cannot import the component - it fails with the error. If I put the resource back, the component imports successfully!

     

    *) with the <img> it seems stuck because it doesn't work one way, neither the other when once added :))

  • TechnoKitty Profile Picture
    68 on at
    Re: Couldn't import components (PCF)

    Sure,

    Session ID: b96eda80-dd74-4264-ad4b-e67b3a84aeef
    PowerApps 3.20023.4

  • JP-09110045-0 Profile Picture
    on at
    Re: Couldn't import components (PCF)

    @TechnoKitty That's interesting it would still be having issues afterwards.  I'll see if I can get a local repro doing similar steps tomorrow.

    Would it be possible to get the session id from a Canvas session hitting the import issue so I can see if there is any extra information on why this happened?

    Session Id can be found under "File>Account>Session details" 

  • TechnoKitty Profile Picture
    68 on at
    Re: Couldn't import components (PCF)

    Thank you, @jopursle for looking into this and the advice on the managed solutions!

     

    The component is for Canvas app, I didn't try in a model-driven one.

     

    I tried the following and can report:

    • Update the version, rebuild, redeploy and publish all customisations - tried (as before), didn't help. 
    • Rename component and redeploy it - works as expected!

    On the possible reasons (confession time) - I did try to use <img> resource. It successfully compiled and deployed, but I could not import. I removed the resource (in the manifest and project), but it didn't fix the import issue as per this thread until I renamed the component.

  • JP-09110045-0 Profile Picture
    on at
    Re: Couldn't import components (PCF)

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

  • TechnoKitty Profile Picture
    68 on at
    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. 

  • JP-09110045-0 Profile Picture
    on at
    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.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 57 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard