Closed Bug 1586612 Opened 3 years ago Closed 3 years ago

Web Extension tabs.onUpdated event incorrectly fired before tabs.onCreated


(WebExtensions :: Compatibility, defect, P2)

70 Branch


(firefox69 wontfix, firefox70 wontfix, firefox71 wontfix, firefox72 wontfix, firefox73 verified)

Tracking Status
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- verified


(Reporter: pauanyu+bugzilla, Assigned: mixedpuppy)



(2 files)

Attached file

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

  1. Install the attached extension (
  2. Open the extension debugging console
  3. Open a new tab using Ctrl+T
  4. Look at the debugging console

Actual results:

It logs the following (the id number will be different):

Updated 2137
Created 2137
Updated 2137

This is incorrect behavior (onCreated should always fire first), and it is not how Chrome behaves.

Expected results:

You should see these results:

Created 2137
Updated 2137
Updated 2137

(This also affects the browser.tabs.onCreated and browser.tabs.onUpdated APIs, not just the chrome ones)

I tested this and i was able to reproduce on all these Os and FF Versions:

Windows 10 64bit:
FF Nightly Release 71.0a1
FF Release 69.0.3
FF Beta 70.0

MacOs 10.14:
FF Nightly Release 71.0a1
FF Release 69.0.3
FF beta 70.0

Ubuntu 18.04:
FF Nightly Release 71.0a1
FF Release 69.0.3
FF Beta 70.0

Component: Untriaged → Developer Tools
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → WebExtensions
Hardware: Unspecified → Desktop
Version: 70 Branch → Firefox 70
Version: Firefox 70 → 70 Branch

Thanks! But, shouldn't this be filed under the "Frontend" component? The issue is not with debugging, the issue is that the tabs API itself is working incorrectly.

The priority flag is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Component: Developer Tools → Compatibility
Flags: needinfo?(jmathies)
Priority: -- → P3
Whiteboard: webext?
Priority: P3 → P2
Whiteboard: webext?
Flags: needinfo?(mixedpuppy)

Ensure that our delay in firing the onCreated (TabOpen) event does not result
in other events happening prior to onCreated.

Assignee: nobody → mixedpuppy
Flags: needinfo?(mixedpuppy)
Pushed by
properly handle tab events that happen prior to firing tabs.onCreated r=rpl,Gijs
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.


Verified the fix on the latest Nightly (73.0a1/20191215214948) under Windows 10 Pro 64-bit and MacOS Catalina 10.15.

The tabs.onUpdated event will now be correctly fired after tabs.onCreated when opening a new tab, thus confirming the fix.

You need to log in before you can comment on or make changes to this bug.