Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

(2) ShareShare
ReportReport
Posted on by 39

I have started setting up a component library and everything was working fine. Looks all ok in the component library and I am able to add components to the screens within the library. Once I try to import a component to another App I get the error "One or more component behaviour properties, event or action, have a mismatched return type". This is the same for every component in the library. I have checked the types being returned and they all look correct. Any advice on how to debug this?

  • arpost Profile Picture
    451 on at
    Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"
    I just started getting this message. This component library has been working for months and has suddenly started to throw errors. Anyone found a solution to this? My library has numerous components, and the error in Power Apps is totally unhelpful and doesn't explain WHAT is causing the issue.
     
  • dindzhov Profile Picture
    7 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    Hi, Thank you much. Yes, this does remove the most warnings but for some reason one of my button is still asking for a text value (because that's was my default value for the onselect property). It is strange as this happens with only one of my buttons. Your advice still does the job for most of them and I can compromise with the faulty button. This can save the situation for now, at least until I can spare more time to go over every single app/control and fix it. However, my only worry right now is this is definitely not intended solution by microsoft. It might work for a short-term period but I would never be confident if my apps won't break again because of some not announced and global changes by microsoft. 

     

     

  • SpoTechGeek Profile Picture
    59 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    @dindzhov 

    Someone mentioned in a separate post that if you turn on the "Disable component behavior property return type" retired feature in your app settings, it might work. Unfortunately, I can no longer find that post.

    DisableComponentBehavior.png

  • dindzhov Profile Picture
    7 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    Hi, this solves the issue but breaks all apps which use the previous version. When the new update is applied wipe out your previous code in the onselect property. Have anyone found a fix of that because otherwise I will have to go record every single code on every single button within each app and then again manually re-apply them with the new version of the comp. library ;/ 

  • Dr0idy Profile Picture
    39 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    Thanks, that did fix it. Not sure if this has always been the case but the component I had to fix wasn't the one I was trying to import also. It was on another component in the same library.

  • cipster Profile Picture
    168 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    Thanks @syed-j , that worked. I really wish the PowerApps team would just announce all these changes in advance.

  • Verified answer
    syed-j Profile Picture
    17 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    @Dr0idy @cipster 

    I started experiencing the same issue this week. The functionality of component properties seems to have unexpectedly changed. I was able to resolve it within one of my canvas apps. I think the issue in my case was that I had several components with event or action properties where I had left the default return data type as boolean while not actually returning a boolean value in the property's expression. This has always worked in the past but it seems to be throwing a warning now. Seems like PA is tightening this up.

     

    If you're not intending to return data from your property, one way to fix this is to change the return data type to "None". See attached screenshot. The other way is to add something in your expression that actually returns the expected data type. BE AWARE: THIS MAY WIPE OUT ANY EXISITNG DEFAULT EXPRESSION for your component property and within all instances of that component property on your screens. So copy/backup your expressions before changing.

     

    syedj_0-1712211898093.png

     

  • cipster Profile Picture
    168 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    Same error as well with an additional bug I mentioned here:

    Re: Components triggering when editing code - Power Platform Community (microsoft.com)

    and here

    Components executing events automatically when edi... - Power Platform Community (microsoft.com)

     

    Looks like the PA team is playing with our work without consideration 😞

     

  • TickoBoston Profile Picture
    on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    @Dr0idy No, I am not.

  • Dr0idy Profile Picture
    39 on at
    Re: Components Fail to Import - "One or more component behaviour properties, event or action, have a mismatched return type"

    @TickoBoston Are you aware of any MS response to this yet?

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard