Closed Bug 1555430 Opened 5 years ago Closed 5 years ago

browser.runtime.onInstalled is not fired when installing an extension in permanent private browsing mode

Categories

(WebExtensions :: General, defect, P3)

67 Branch
defect

Tracking

(firefox67 affected, firefox68 affected, firefox69 affected)

RESOLVED INVALID
Tracking Status
firefox67 --- affected
firefox68 --- affected
firefox69 --- affected

People

(Reporter: ngonzale, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: webext?)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

In permanent private browsing mode, browser.runtime.onInstalled is not fired when installing an extension. This happens since Firefox 67. For example, temporarily install the attached extension.

Actual results:

Nothing, browser.runtime.onInstalled is not fired.

Once the extension is installed, it is disabled as it is not allowed to run in private windows. If you allow it to run in private windows, browser.runtime.onInstalled is fired with reason "update". If the attached extension is installed, the message "runtime.onInstalled updating" is displayed in the browser console. (Note that this also happens in non permanent private browsing mode, which does not seem like a natural behavior.)

Expected results:

browser.runtime.onInstalled should have been fired, as in non permanent private browsing mode. If the attached extension is installed, the message "runtime.onInstalled installing" should have been displayed in the browser console.

When the extension is allowed to run in private windows, browser.runtime.onInstalled should not be fired (as the extension has already been installed and it is not being updated).

Component: Untriaged → General
Product: Firefox → WebExtensions

The issue can be reproduced on the latest Release version (67.0 / 20190516215225), Beta (68.0b6 / 20190529145824) and Nightly (69.0a1 / 20190602221035) by following the above STR under ‘Windows 10 Pro 64-bit’ and ‘macOS High Sierra 10.13.6’.

  • ‘runtime.onInstalled installing’ is fired (when installing the attached extension) in normal and non-permanent browsing mode, however it is not fired in permanent private browsing mode.
  • ‘ runtime.onInstalled updating’ is fired (when allowing the extension to run in private windows) in all browsing modes.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mixedpuppy)

What is not clear from reporter or qa is whether the extension monitoring onInstalled has been given private browsing access. A proper steps to reproduce would help identify that.

Flags: needinfo?(mixedpuppy) → needinfo?(ngonzale)

(In reply to Shane Caraveo (:mixedpuppy) from comment #2)

What is not clear from reporter or qa is whether the extension monitoring onInstalled has been given private browsing access. A proper steps to reproduce would help identify that.

I mentioned this under the "actual results" section: "Once the extension is installed, it is disabled as it is not allowed to run in private windows. If you allow it to run in private windows, browser.runtime.onInstalled is fired with reason "update". "

Flags: needinfo?(ngonzale)

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(ddurst)

If you could list the STR out in discrete steps (leaving nothing out), that would answer most of these questions.

When you say:

If the attached extension is installed, the message "runtime.onInstalled updating" is displayed in the browser console.

It's unclear if you've given it permission to run in private browsing or not.

Flags: needinfo?(ddurst) → needinfo?(ngonzale)

(In reply to David Durst [:ddurst] from comment #5)

If you could list the STR out in discrete steps (leaving nothing out), that would answer most of these questions.

When you say:

If the attached extension is installed, the message "runtime.onInstalled updating" is displayed in the browser console.

It's unclear if you've given it permission to run in private browsing or not.

The extension has been given that permission at that point, as the sentence immediately preceding that one indicates ;-)

Anyhow, hope the following STR are clearer:

  • In permanent private browsing mode, browser.runtime.onInstalled is not fired when installing an extension. This happens since Firefox 67. For example, temporarily install the attached extension; nothing is displayed in the browser console because browser.runtime.onInstalled is not fired.
  • After that first step the extension is installed, as it listed among the installed extensions, but is (by default) not allowed to run in private windows. If you allow it to run in private windows, browser.runtime.onInstalled is fired with reason "update", and the attached extension displays "runtime.onInstalled updating" in the browser console. (Note that this also happens in non permanent private browsing mode, which does not seem like a natural behavior.)

Expected results:

  • browser.runtime.onInstalled should be fired with reason "install" upon installing an extension in permanent private browsing mode.
  • When an extension is allowed to run in private windows (both in permanent private browsing mode and in non-permanent browsing mode), browser.runtime.onInstalled should not be fired (as the extension has already been installed and it is not being updated).
Flags: needinfo?(ngonzale)

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(ddurst)
See Also: → 1566000
Flags: needinfo?(ddurst)
Priority: -- → P3
Whiteboard: webext?
Flags: needinfo?(mixedpuppy)
Depends on: 1568635

(In reply to Nicolás González-Deleito from comment #6)

(In reply to David Durst [:ddurst] from comment #5)

  • In permanent private browsing mode, browser.runtime.onInstalled is not fired when installing an extension.

That notification wont happen because the extension does not have access to run when that event would occur. One item that will help address this in some cases, which is to allow turning on private access prior to install, is outlined in bug 1568635.

  • If you allow it to run in private windows, browser.runtime.onInstalled is fired with reason "update"

This will happen if you load the extension via about:debugging. A regular install wont fire this event.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(mixedpuppy)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: