Closed Bug 1362748 Opened 7 years ago Closed 7 years ago

WebExtensions: sending messages between two add-ons does not work

Categories

(WebExtensions :: Untriaged, defect)

52 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1258360

People

(Reporter: dw-dev, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170302120751

Steps to reproduce:

I have developed two WebExtensions add-ons, Print Edit WE and Zoom Page WE, that need to communicate.

Both add-ons have their ID's explicity declared in application keys in their manifest files.

In Print Edit WE, I send a message to Zoom Page WE using:

    chrome.runtime.sendMessage("zoompage-we@DW-dev",{ type: "externalReset" } );

In Zoom Page WE, I listen for the message from Print Edit WE using:

    chrome.runtime.onMessageExternal.addListener(
    function(message,sender,sendResponse)
    {
        switch (message.type)
        {
            case "externalReset":
                
                if (sender.id == "printedit-we@DW-dev")
                {
                    .....
                }
        }
    });

When both add-ons are installed locally as folders, the communication works correctly.

When both (or either) add-ons are installed from the Mozilla Add-ons website as .xpi files, the communication does not work and there is no error message in the browser console.



Actual results:

When the add-ons are installed .xpi files, the communication does not work and there is no error message in the browser console.



Expected results:

When the add-ons are installed .xpi files, the communication should work correctly.
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.