Note: There are a few cases of duplicates in user autocompletion which are being worked on.

tabs.executeScript in webRequest.onCompleted gives "Unchecked lastError value: Error: No matching message handler"

NEW
Unassigned
(NeedInfo from)

Status

()

Toolkit
WebExtensions: Request Handling
P2
normal
a year ago
3 days ago

People

(Reporter: robwu, Unassigned, NeedInfo)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [webRequest] investigate triaged)

Attachments

(1 attachment)

(Reporter)

Description

a year ago
Created attachment 8775480 [details]
executeScript-at-webRequest.onCompleted.zip

When tabs.executeScript is called in the webRequest.onCompleted event, the script is not injected and the console shows an error.

Steps to reproduce:
1. Start Firefox with e10s.
2. Load the attached addon.
3. Open the global JS console (Ctrl-Shift-J)
4. Visit example.com.
5. Look at the global console and/or the tab's console.

Expected: "Script injected in http://example.com" to be logged.
Actual: Unchecked lastError value: Error: No matching message handlerExtensionUtils.jsm:305

When I step through with a debugger I see that getHandlers in MessageChannel.jsm returns an empty list because the innerWindowID of the message manager (handler.messageFilterStrict) differs from the innerWindowID of |recipient|.
E.g.:
handler.messageFilterStrict.innerWindowID  // = 2147483680
recipient.innerWindowID                    // = 2147483679

Firefox versions tested:
- Firefox 47.0.1 (without e10s only = works fine)
- Firefox Beta (48, 2016-07-25)
- Firefox Nightly (50.0a1, 2016-07-23, with and without e10s)

Updated

a year ago
Blocks: 905436
tracking-e10s: ? → +

Updated

a year ago
Priority: -- → P2
Whiteboard: investigate
I'd generally expect the inner window ID of the browser to be updated long before onCompleted gets called for the main document request. But it's probably not guaranteed if the request happens very quickly.

I'm not sure if this is a bug, though, strictly speaking.

Updated

a year ago
Flags: needinfo?(kmaglione+bmo)

Updated

11 months ago
Whiteboard: investigate → [webRequest] investigate

Updated

11 months ago
tracking-e10s: + → ---

Updated

11 months ago
Whiteboard: [webRequest] investigate → [webRequest] investigate triaged
Component: WebExtensions: Untriaged → WebExtensions: Request Handling
You need to log in before you can comment on or make changes to this bug.