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:
- Install this extension from the package
- 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.
- Open background page of this extension https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/debugging-extensions. Then this page may be closed.
- Reload the page https://alexeysidorov92.github.io/edge_echo.html
- Extension starts to work properly…
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”
Thank you for providing this information about the issue. We confirmed the problem, and will release a solution with a later build of Edge. We are resolving this issue as a duplicate of an existing internal bug report. We look forward to additional feedback you may have on how we can improve Microsoft Edge.
The MS Edge Team
Hello Microsoft Edge Team!
When do you plan to publish an update that contains this fix? It seems that this problem exists in the latest version of Edge 41.16299.15…