browser.runtime.Port problem

Fixed Issue #12156180

Details

Created
May 27, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
40.15063
Reports
Reported by 4 people

Sign in to watch or report this issue.

Steps to reproduce

Hello! I have a problem with communication based on runtime.connect between a content script and a background script of my test echo extension. I have published my code and extension package on github: https://github.com/alexeysidorov92/edge.echo.extension

Short description: the content script connects to the background script using browser.runtime.connect and sends a message via browser.runtime.Port object when “Submit” button is clicked. The background script receives the messsage, converts it to upper case and sends back. Then content script receives the modified message and displays it on the page.

This extension works fine when I add it to Edge using Load extension button as described in https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/adding-and-removing-extensions. So if you open the page https://alexeysidorov92.github.io/edge_echo.html you should see “HELLO FROM BACKGROUND SCRIPT” text in the received message field.

But there is a strange problem if this extension is installed from a package… The extension doesn’t work properly until I open the background page of this extension and reload the page…
So you can try to reproduce it:

  1. Install this extension from the package
  2. Open the page https://alexeysidorov92.github.io/edge_echo.html. The background script doesn’t work (received message field is empty) and this script doesn’t receive sent messages… Page reloading or turning off\on of the extension doesn’t help.
  3. Open background page of this extension https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/debugging-extensions. Then this page may be closed.
  4. Reload the page https://alexeysidorov92.github.io/edge_echo.html
  5. Extension starts to work properly…

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Akshay P.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Akshay P.” to “Arif S.”

      Changed Assigned To from “Arif S.” to “Vasanth C.”

      Changed Status from “Confirmed” to “In progress”

      Changed Status from “In progress” to “In code review”

      Changed Status from “In code review” to “Fixed”

      Changed Status from “Fixed” to “Fixed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in