---
schema_version: "1"
id: 3b7735e68f0da81176b5cf9484d09710477b029b51739c4718dd98e3df2b9560
title: Lightning Message Service Limitations
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/message-channel/message-channel-considerations.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/message-channel-considerations.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 909e8be0b04287cee3ca8115a0178b4dbef40528799bd5928de35792d9f534c1
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Lightning Message Service Limitations

Keep the following in mind when working with Lightning message service.

## Supported Experiences

Lightning message service supports only the following experiences:

- Lightning Experience standard navigation
- Lightning Experience console navigation
- Salesforce mobile app for Aura and Lightning Web Components, but not for Visualforce pages
- Lightning components used in Experience Builder sites.

  **note:** Lightning Message Service doesn't work with Salesforce Tabs + Visualforce sites or with Visualforce pages in Experience Builder sites.

## Aura Components That Don’t Render Aren’t Supported

Lightning message service only supports Aura components that render. You can’t use `lightning:messageChannel` in an Aura component that uses the background utility item interface. Similarly, Aura components that use `lightning:messageChannel` can’t call Lightning Message Service methods in the `init` lifecycle handler because the component hasn’t rendered.

## `lightning:messageChannel` Must Be a Child of `aura:component`

In a custom Aura component, `lightning:messageChannel` must be an immediate child of the `aura:component` tag. It can’t be nested in an HTML tag or another component.

For example, the following code renders without a problem.

```apex
<aura:component>
  <lightning:messageChannel type="myMessageChannel__c" />
  <lightning:card>...</lightning:card>
</aura:component>
```

This code throws an error when the Aura component tries to render.

```apex
<aura:component>
  <lightning:card>
    <lightning:messageChannel type="myMessageChannel__c" />
  </lightning:card>
</aura:component>
```

## Messages are Constrained by iframe Boundary

If your component uses Lightning message service to publish a message, that message is constrained by any iframe boundary. To work around this limitation, use the [`sforce.one.subscribe()` and `sforce.one.unsubscribe()` methods](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/message_channel_subscribe.htm).

## Avoid Dynamically Creating lightning:messageChannel Components in Aura

Do not use[`createComponent()`](https://developer.salesforce.com/docs/platform/aura-platform/ref-jsapi/ref-jsapi-dollara-createcomponent.md) to dynamically create a `lightning:messageChannel` component in Aura. Dynamically created components may not work as expected. For information on supported ways to create a `lightning:messageChannel` component, see [Create a Message Channel](https://developer.salesforce.com/docs/platform/aura-platform/guide/message-channel-create.md).

**See Also**

- [Invoking Actions on Component Initialization](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_cb_init_handler.htm)
- [_Component Reference_: lightning:backgroundUtilityItem](https://developer.salesforce.com/docs/component-library/bundle/lightning:backgroundUtilityItem/documentation)
