Closed Bug 1853807 Opened 2 years ago Closed 1 year ago

The firefox-nightly .deb package doesn't get localized and is missing its distribution ID when using an existing profile

Categories

(Firefox :: Distributions, defect)

Desktop
Linux
defect

Tracking

()

VERIFIED FIXED
122 Branch
Tracking Status
firefox120 --- wontfix
firefox121 --- verified
firefox122 --- verified

People

(Reporter: gabriel, Assigned: mkaply)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The firefox-nightly .deb package doesn't get localized when using a profile from created by the tarred binary. The Distribution ID is also missing. Thing work as expected if a new profile is created for the .deb package.

Distribution ID => empty with my firefox binary profile
Distribution ID => mozilla-deb with a new profile

have you been able to reproduce this ? :)

Confirming the issue with Firefox .deb 120.0a1 (2023-10-01) on Lubuntu 20.04 LXQt. The distributionID is not displayed in about:support or about > Firefox window. The Firefox .deb build is not localized after opening a profile from a tar.bz2 firefox with a Firefox .deb package. I followed the next steps:

Preconditions: have the system set to FR language and region

  1. Download and extract the latest Firefox nightly .tar.bz2 and open it with a new profile.
  2. Install Firefox.deb l10n FR (sudo apt-get install firefox-nightly-l10n-fr)
  3. Open Firefox .deb (/usr/bin/firefox-nightly -p) using the profile created at step 1.

Actual Result:

  • Firefox is not localized (language present in about:addons)
  • distribution is missing from about:support and About Firefox window.

The distributionID missing can be seen on Ubuntu 22.1 and Ubuntu 22.04 as well for an en-US .deb build.

S3 because it seems that in a clean environment (default user profiles) the firefox.deb will create a new profile after running if the profile manager is not used. For example: If Firefox Nightly tar.bz2 is opened there will be two profiles (default-nightly and default). Installing and opening firefox.deb without the profile manager will create a new profile (default-nightly-1)

Using a new profile fixes the issue. If more information is needed please let me know, Thank you!

Severity: -- → S3

Hello! I found some more information here. It seems that the issue is only reproducing if the previous profile was created and used by Firefox Nightly (120.0a1). If for example, I open a profile with Firefox 120.0a1.deb that was created with Firefox 119.0b4, 118.0.1, or 115esr the issue does not reproduce. The Firefox .deb is correctly localized based on the downloaded build and region/ language set and the distributionID is correctly displayed in the About Nightly window and about:support.

I can confirm the issue, I had Firefox nightly on my workstation from tarball moved to debian package with the repository and installed the italian package.
Also if it is configured (again) and restarted multiple times doesn't load the language.

Flags: needinfo?(gabriel)

I created a profile with the nightly .tar.bz2 and one using the beta .tar.bz2.

I installed the .deb and opened the profile created by the nightly .tar.bz2 and I was able to replicate the bug.

The profile created by the beta .tar.bz2 didn't trigger the bug.

In the profile's prefs.js created by the nightly .tar.bz2 there is a line setting distribution.iniFile.exists to false:

user_pref("distribution.iniFile.exists.value", false);

In the profile created by the beta that preference is set to true:

user_pref("distribution.iniFile.exists.value", true);

I manually set distribution.iniFile.exists to true in the profile created by the nightly .tar.bz2 and opened it in the .deb and Firefox got localized (and I see the Distribution ID in about:support)

https://searchfox.org/mozilla-central/source/browser/components/distribution.sys.mjs
https://searchfox.org/mozilla-central/source/browser/components/tests/unit/test_distribution_cachedexistence.js

Flags: needinfo?(gabriel)

Thanks for finding this, :gabriel! :mkaply, would happen to have some insights the way distribution.ini files are handled? If not, who would be the right person to contact?

Flags: needinfo?(mozilla)

The distribution.ini is only rechecked for on version changes, so this behavior is kind of expected. We cache the value so we don't check for it at every startup if its not needed.

I'm unclear how this relates to the localization bit though...

Flags: needinfo?(mozilla)

Same. Maybe it has something to do with this?

https://github.com/mozilla-partners/deb/blob/main/desktop/deb/distribution/distribution.ini#L8

intl.locale.requested=""

You're right. completely forgot that was in distribution.ini.

So the question is can we detect this scenario to read distribution.in again. The EXE location has changed I think so in theory if we can detect that we can reprocess the file.

I took a look at the code and it seems to be the right approach to me too. I'm moving this bug to Firefox :: Distributions, then. :mkaply, in your opinion, what would be the effort to make this change?

Assignee: nobody → mozilla
Component: General → Distributions
Flags: needinfo?(mozilla)
Product: Release Engineering → Firefox
QA Contact: jlorenzo
Flags: needinfo?(mozilla)
Attachment #9362202 - Attachment description: Bug 1853807 - Recheck distrbution.ini if executable location has changed. r?Mossop → Bug 1853807 - Recheck distribution.ini if executable location has changed. r?Mossop
Pushed by mozilla@kaply.com: https://hg.mozilla.org/integration/autoland/rev/cd5d7992648e Recheck distribution.ini if executable location has changed. r=mossop
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

The patch landed in nightly and beta is affected.
:mkaply, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox121 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(mozilla)
Attachment #9366083 - Flags: approval-mozilla-beta?

Uplift Approval Request

  • Steps to reproduce for manual QE testing: Steps are in bug
  • Explanation of risk level: Only affects distibution code.
  • Is Android affected?: no
  • Code covered by automated testing: no
  • Risk associated with taking this patch: Low
  • Needs manual QE test: yes
  • String changes made/needed: None
  • User impact if declined: Switching profile on .DEB doesn't switch locale
  • Fix verified in Nightly: no
Flags: qe-verify+
Flags: needinfo?(mozilla)

Comment on attachment 9366083 [details]
Bug 1853807 - Recheck distribution.ini if executable location has changed. r?Mossop

Approved for 121.0b6.

Attachment #9366083 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Hello! We verified the issue with Firefox 122.0a1 (2023-12-05) .deb and Firefox 121.0b7 .deb on Debian 10, Lubuntu 20.04 LXQt, Mint 21 and Kubuntu 22.

After following the steps from comment 3 the .deb builds are correctly localized and the distribution is set to mozilla-deb. Note that Firefox 121.0b7.deb was installed from the archive.

Status: RESOLVED → VERIFIED
Has STR: --- → yes
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: