The default bug view has changed. See this FAQ.

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

NEW
Unassigned
(NeedInfo from)

Status

()

Toolkit
WebExtensions: Untriaged
P2
normal
8 months ago
7 months 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

8 months 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

8 months ago
Blocks: 905436
tracking-e10s: ? → +

Updated

8 months ago
Priority: -- → P2
Whiteboard: investigate

Comment 1

8 months ago
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

8 months ago
Flags: needinfo?(kmaglione+bmo)

Updated

7 months ago
Whiteboard: investigate → [webRequest] investigate

Updated

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

Updated

7 months ago
Whiteboard: [webRequest] investigate → [webRequest] investigate triaged
You need to log in before you can comment on or make changes to this bug.