runtime.onMessage is broken after Windows goes to sleep or Edge is killed

By design Issue #9405171

Details

Author
Olivier B.
Created
Oct 18, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
38
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Context

I have an Edge extension which has a background page, and a front-end that runs in an HTML page opened in an Edge tab. Obviously, they communicate through the runtime API.

Code

Frontend code:

browser.onMessage.addListener(function(){
  console.log('foo!');
});

Background page code:

browser.runtime.sendMessage('hello world', function(){});

Under normal conditions, this works as expected, logging foo!. However, it can be broken using these steps:

  1. Open Edge
  2. Open your extension’s frontend page
  3. Put Windows to sleep
  4. Re-login to Windows
  5. Re-open Edge - your extension’s tab will open automatically

In that automatically opened tab, the runtime API is not functioning.

Another way to reproduce it is to kill Edge through the Task Manager instead of putting Windows to sleep.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Ibrahim O.”

      Changed Assigned To from “Ibrahim O.” to “Akshay P.”

      Changed Assigned To from “Akshay P.” to “Snehita P.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Snehita P.” to “Brad E.”

      Changed Assigned To from “Brad E.” to “Snehita P.”

      Changed Assigned To from “Snehita P.” to “Brad E.”

      Changed Assigned To from “Brad E.” to “Snehita P.”

      Changed Status from “Confirmed” to “By design”

      Changed Assigned To to “Snehita P.”

      Changed Status from “By design”

      Changed Status to “Confirmed”

      Changed Status from “Confirmed” to “By design”

      Changed Assigned To to “Arif S.”

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

    Sign in