microsoft / powercat-creator-kit

This toolkit helps create well-designed Power App experiences on the web & mobile. It contains a component library; PCF controls and other utilities that increase developer productivity.
MIT License
321 stars 53 forks source link

[BUG]: CreatorKitCore (CKC) components do not load in my canvas app in a managed solution #401

Closed jknudson-scoular closed 1 year ago

jknudson-scoular commented 1 year ago

Describe the bug Everything works in dev in an unmanaged solution, both out-of-box components and CKC components, but in a managed solution in a different environment (CKC imported first for dependencies, of course), the CKC components don't exist. No errors in the app, no failures, no logs, just no CKC components. Everything else loads just fine.

To Reproduce Steps to reproduce the behavior:

  1. Be me
  2. Create a blank canvas app
  3. Add any CKC component to it (I'm specifically using ProgressIndicator, ContextMenu, Icon, AutoWidthLabel, and KeyboardShortcuts)
  4. Publish App
  5. Export App as Managed
  6. Import into different environment

Expected behavior CKC components load and function in canvas app

Additional context This could definitely be user error, but I've wasted 3 days on this issue. If anyone has an idea for something I missed, I would greatly appreciate it, thanks!

jknudson-scoular commented 1 year ago

Figured it out, not a bug, just my ignorance, thanks.

Ludzik1993 commented 1 year ago

Hi, and what was the issue? - that it's managed solution, or something else? - I'm dealing currently with same think :/

jknudson-scoular commented 1 year ago

@Ludzik1993 There's an environment setting that needs to be toggled on. Go to the Power Platform Admin Center, choose the env you're importing into. Go to the env's Settings > Product > Features, find the one always down on the right side labeled Power Apps component framework for canvas apps, and toggle it's one setting to Allow publishing of canvas apps with code components. You'll then need to go to the app inside Power Apps and re-publish the app itself from the new environment where the components aren't loading. If that's not enough, you might just delete the app in the target env and re-import. Let me know if anything there doesn't make sense! 👍🏻

Ludzik1993 commented 1 year ago

@jknudson-scoular I was able to solve the issue (sort of) - I did turned on the framework settings before, but after reinstalling the solution everything went ok this time. I do recall a case when I was importing reference kit for the Canvas just seconds after enabling the framework setting and I was also missing some controls - my best guess is that these need to have some time to process and be really ON in the Environment, so I added to the internal guideline to wait for 15 minutes before importing something that have those code components. - we'll see :)

Thanks for answering!

jknudson-scoular commented 1 year ago

@Ludzik1993 The biggest thing for me was the env setting, but you also have to publish the app itself (from Apps, not the solution), that was the second biggest thing for me. Which since no changes have been made, you won't get an unmanaged layer, but you still have to publish an existing app when you tick on that change. Delete/Re-import of the app will accomplish the same goal, just takes a bit longer.

Best wishes!

Ludzik1993 commented 1 year ago

@jknudson-scoular - Yea, there are a lot of little things to do and remember when importing solutions. Thanks a lot and best wishes for you too!