Closed Bug 1466846 Opened 6 years ago Closed 6 years ago

"homepage" in chrome_settings_overrides doesn't work when extension is reenabled

Categories

(Firefox :: Extension Compatibility, defect)

61 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox60 --- unaffected
firefox61 --- verified
firefox62 --- verified
firefox63 --- verified

People

(Reporter: v.rusanova, Assigned: mkaply)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36

Steps to reproduce:

1) install addon with homepage override using the standard extension folders https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Alternative_distribution_options/Sideloading_add-ons#Installation_using_the_standard_extension_folders ( Copy the renamed XPI file to the extensions folder %AppData%\Mozilla\Firefox\Profiles\{profile_id}.default\extensions\ )
2) allow installation in dialog
3) check homepage settings


Actual results:

in beta Firefox 61.0b10 key "homepage" in chrome_settings_overrides https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/chrome_settings_overrides doesn't override the browser's home page.


Expected results:

homepage should be overrided by URL from addon
Hi, thank you for the feedback and for taking the time to report this, can you give me the example with the homepage override that you used ?

Here are the steps i ran:

1. I downloaded the Yahoo Homepage 1.1.12 addon manually.
2. I Copied the file to the extensions folder where the profile was.
3. After i started Firefox in the top right corner i had a notification : "Yahoo Homepage added to Firefox" which i had to manually enable. 
4. After i enabled the Addon, every time i click new tab it will redirect me to yahoo homepage.

After checking the manifest.js from the addon i noticed that : "chrome_url_overrides" : {
    "newtab": "homepage.html"
  },
and it only works with new tab.

Can you provide a few examples or maybe more steps on how to reproduce this issue, i tried multiple versions up to the latest nightly and i was unable to reproduce it.

Can you also try reproducing this issue on the latest version of nightly, you can find it here : https://nightly.mozilla.org/ .
Flags: needinfo?(v.rusanova)
(In reply to Rares Doghi from comment #1)
> Hi, thank you for the feedback and for taking the time to report this, can
> you give me the example with the homepage override that you used ?
> 
> Here are the steps i ran:
> 
> 1. I downloaded the Yahoo Homepage 1.1.12 addon manually.
> 2. I Copied the file to the extensions folder where the profile was.
> 3. After i started Firefox in the top right corner i had a notification :
> "Yahoo Homepage added to Firefox" which i had to manually enable. 
> 4. After i enabled the Addon, every time i click new tab it will redirect me
> to yahoo homepage.
> 
> After checking the manifest.js from the addon i noticed that :
> "chrome_url_overrides" : {
>     "newtab": "homepage.html"
>   },
> and it only works with new tab.
> 
> Can you provide a few examples or maybe more steps on how to reproduce this
> issue, i tried multiple versions up to the latest nightly and i was unable
> to reproduce it.
> 
> Can you also try reproducing this issue on the latest version of nightly,
> you can find it here : https://nightly.mozilla.org/ .

Hi,
Examples of extensions with this behavior - 
https://addons.mozilla.org/ru/firefox/addon/yandex-homepage/?src=search
https://addons.mozilla.org/ru/firefox/addon/%D0%B4%D0%BE%D0%BC%D0%B0%D1%88%D0%BD%D1%8F%D1%8F-%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0-mail-ru/
Flags: needinfo?(v.rusanova)
Hi, I managed to reproduce this issue using the examples from Comment 2, i have copied the extensions manually to the extensions folder enabled them as soon as i started Firefox but the chrome_settings_override key would not apply.

Please note that this issue does not occur when the user installs the Add-on from the page.
Status: UNCONFIRMED → NEW
Component: Untriaged → Extension Compatibility
Ever confirmed: true
Am I right, that this bug'll be fixed in Firefox 61, which release is planned on 2018-06-26?
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
FYI, This also breaks the display of the icon on the toolbar.
Comment on attachment 8987196 [details]
Bug 1466846 - Enabling addon should set homepage override.

https://reviewboard.mozilla.org/r/252438/#review258948

Should probably have a test for this...
Attachment #8987196 - Flags: review?(kmaglione+bmo) → review+
This can be created without sideloading.

1. Install an addon that takes over the homepage.
2. Verify homepage button navigates correctly.
3. Go to addon manager.
4. Disable addon.
5. Close Firefox.
6. Open Firefox
7. Go to addon manager.
8. Reenable addon.
9. Click Home button.
10. Notice you are taken to the default homepage, not the extension homepage.

This fixes that as well.


I'll see if we have enabling/reenabling tests already.
Summary: Key "homepage" in chrome_settings_overrides doesn't work in Firefox 61 → "homepage" in chrome_settings_overrides doesn't work when extension is reenabled
> Should probably have a test for this...

I'll file a followup for that. I'd like to get this in before the merge.
Are we sure this is a regression? The preference is supposed to be managed by ExtensionPreferencesManager [1]. The `inControl` variable is just used for showing the doorhanger. This might fix the issue but I don't think it is the root cause.

[1] https://searchfox.org/mozilla-central/rev/93d2b9860b3d341258c7c5dcd4e278dea544432b/toolkit/components/extensions/ExtensionPreferencesManager.jsm#50-54
It's too late for this fix to ship in Fx61 (the release candidate builds are already built), but I'd be willing to consider this for a dot release ride-along should the opportunity arise.
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/1de24ca67b86
Enabling addon should set homepage override. r=kmag
https://hg.mozilla.org/mozilla-central/rev/1de24ca67b86
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Comment on attachment 8987196 [details]
Bug 1466846 - Enabling addon should set homepage override.

Approval Request Comment
[Feature/Bug causing the regression]: Regressed by 1397809
[User impact if declined]: In certain cases, homepage is not overridden by an extension.
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Not yet
[Needs manual test from QE? If yes, steps to reproduce]: Yes, In bug comment 9
[List of other uplifts needed for the feature/fix]: No
[Is the change risky?]: Very low
[Why is the change risky/not risky?]: Very localized, only impacts reenabling
[String changes made/needed]: None
Attachment #8987196 - Flags: approval-mozilla-release?
Attachment #8987196 - Flags: approval-mozilla-beta?
Mike, could you work with QA to verify the fix in Nightly? 
From comment 10, you were also intending to add tests or file a followup bug for test coverage.
Flags: needinfo?(mozilla)
Could we get someone from QE to do a quick pass on this? Would love to get it into 61.0.1 if I could.

Liz: I'll get the followup test bug opened.
Flags: needinfo?(mozilla) → needinfo?(andrei.vaida)
See Also: → 1472815
I have reproduced this bug using the STR from comment 9, on an affected Beta build (62.0b5, 20180702164905).

This is verified fixed on latest Nightly 63.0a1 (2018-07-02) running Windows 10 x64, Mac OS X 10.11.6 and Ubuntu 16.04 x86. Tested with both extensions from comment 2.
Status: RESOLVED → VERIFIED
Flags: needinfo?(andrei.vaida)
Comment on attachment 8987196 [details]
Bug 1466846 - Enabling addon should set homepage override.

Thanks for the verification. Approved for 62.0b6 and 61.0.1.
Attachment #8987196 - Flags: approval-mozilla-release?
Attachment #8987196 - Flags: approval-mozilla-release+
Attachment #8987196 - Flags: approval-mozilla-beta?
Attachment #8987196 - Flags: approval-mozilla-beta+
This bug is verified fixed on 61.0.1 (20180704003137) as well, under Windows 10 x64, macOS 10.12 and Ubuntu 16.04 x64.

Ni myself as a reminder to verify it tomorrow, on 62 Beta 6.
Flags: needinfo?(ciprian.georgiu)
Verified fixed on 62.0b6 too (20180705151535) with the same platforms mentioned in the above comment.
Flags: qe-verify+
Flags: needinfo?(ciprian.georgiu)
You need to log in before you can comment on or make changes to this bug.