after extension installation, content scripts don't work until until Edge is restarted

Confirmed Issue #13521661 • Assigned to Irfan A.

Details

Author
V S.
Created
Aug 30, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
41.16275
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

STR:

  1. start Edge
  2. install the attached extension (I use the extension bar’s “Load Extension” for this)
  3. it should now alert() that executeScript works.

Result: It doesn’t. I have to restart edge and enable the extension for it to work. In fact, issuing browser.tabs.executeScript({code:"alert(2)"}) from the background page console does nothing and the extension also injects no content scripts on at least the tab that was open when the extension was installed.

If you can’t reproduce this, remove the extension and reinstall it - this reproduces the problem reliably for me. Merely reloading doesn’t.

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

  • Hello,

    Thank you for providing this information about the issue. Unfortunately, I cannot confirm the problem you report. When I load the extension in Edge16275, I can see the content script is loading and logging to F12 Console without any need to restart the browser; screenshot attached.

    Perhaps you find the background script is not loading? If so, we will need you to correct the subject of this case and the details. If you additionally find that tabs.executeScript does not alert, we will need a separate case filed with that repro.

    Best Wishes,
    The MS Edge Team

  • Here you go: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/13536532/

    I’ve also uploaded a more minimal repro and a screencast - turns out the conditions for reproducing my content script problems are slightly different and an extension reinstall is required to break content script loading.
    new files: content files after install.zip, 2017-08-31 17-20-01.mp4

    As an aside, you seem to have a working content script debugger, I don’t: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/13029920/

  • Microsoft Edge Team

    Changed Status to “Confirmed”

    Changed Title from “after extension installation, content scripts and tabs.executeScript don't work until until Edge is restarted” to “after extension installation, content scripts don't work until until Edge is restarted”

    Changed Assigned To to “Akshay P.”

    Changed Status from “Confirmed”

  • This issue is also seen on some page (like Facebook) refresh. Our extension’s content scripts are not attached on page refresh

  • Microsoft Edge Team

    Changed Assigned To from “Akshay P.” to “Irfan A.”

    Changed Status to “Confirmed”

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

Sign in