runtime.onInstalled event isn't fired in incognito mode
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
People
(Reporter: vtscan, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
Fresh install Firefox version 74.0a1 build id 20200125213807.
Change preference Privacy & Security > History.
Nightly will Use custom settings for history.
Select Always use private browsing mode.
Set xpinstall.signatures.required to false.
Install the following add-on.
manifest.json:
{
"background": {
"scripts": ["background.js"]
},
"manifest_version": 2,
"name": "onInstalledTest",
"version": "0.0.1",
"browser_specific_settings": {
"gecko": {
"id": "onInstalledTest@test.me"
}
}
}
background.js:
'use strict';
browser.runtime.onInstalled.addListener((details) => {
console.log(details.reason);
});
Actual results:
When inspecting the onInstalledTest extension the console log doesn't show the install reason.
Expected results:
The extension the console log shows the reason.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime mentions incognito only for runtime.onStartup but not for runtime.onInstalled.
Note that this happens only in incognito mode. Standard mode works fine.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Hi,
I tried to reproduce this issue on Mac OSX 10.14.6 on Nightly 74.0a1 (2020-01-27) (64-bit). I followed the above-mentioned steps, changed the browser's preferences, created a folder for the extension and saved two files: manifest.json and background.js, then went to about:debugging, loaded the manifest.json and clicked on Inspect. However, I didn't see anything on the console even when loading the extension on the regular browser window (not Private Browsing).
Can you provide additional information to reproduce this issue? Such as an extension file, screen capture, screen recording.
Thanks,
Virginia
Hi,
thank you for your response. I've added screen captures in the file screen-captures.zip.
I've used install from file. I've used the extension package onInstalledTest.zip.
Screen captures show the steps.
1-install-from-file.png: Install the extension from file.
As you've done from about:debugging click on Inspect.
2-console-log-shows-install.png: Observe that the console log shows the correct runtime.onInstalled reason "install".
Uninstall the extension.
3-incognito.png: Switch to incognito.
Install the extension from file.
4-install-from-file-allow-incognito.png: Allow the extension to run in incognito.
From about:debugging click on Inspect.
5-console-log-empty.png: Observe the empty console log.
Expected result: The console log shows "install" as in the screen capture 2-console-log-shows-install.png.
Thank you.
Updated•5 years ago
|
Description
•