Skip to content

'webRequest' or 'webRequestBlocking' extension permissions prevents loading #22175

@samuelmaddock

Description

@samuelmaddock

relates to #19447

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • v9.0.0-beta.1
  • Operating System:
    • Windows 10.0.18362 Build 18362 64-bit
  • Last Known Working Electron version:
    • N/A

Expected Behavior

When an extension is loaded using Session.loadExtension with webRequest or webRequestBlocking permissions, no effect should be taken since these are currently unsupported Chrome APIs.

Actual Behavior

Loading an extension with webRequest or webRequestBlocking permissions causes all app network events to hang without resolving.

Adding a delay to calling Window.loadURL can fix the issue (seems like a race condition).

To Reproduce

This is likely the fastest way to test this issue:

  1. Modify spec-main/fixtures/extensions/content-script/manifest.json to include the following:
"permissions": ["webRequest", "webRequestBlocking", "<all_urls>"]
  1. Re-run spec-main/extensions-spec.ts tests and it should prevent loading any content in the window.

Otherwise you can try this repo:
https://github.com/samuelmaddock/electron-extensions-loading-blocked-bug

Screenshots

App not loading after calling win.loadURL('https://www.electronjs.org/')
electron_2020-02-12_18-16-08aZeL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions