Closed Bug 1950637 Opened 12 days ago Closed 11 days ago

profile selection broken on Daily since 2025-02-26

Categories

(Thunderbird :: General, defect, P1)

Tracking

(thunderbird_esr128 unaffected, thunderbird136 unaffected)

RESOLVED FIXED
137 Branch
Tracking Status
thunderbird_esr128 --- unaffected
thunderbird136 --- unaffected

People

(Reporter: mkmelin, Assigned: sergesanspaille)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Profile selection is broken on 2025-02-26 daily.
Starting with thunderbird -p gives an empty profile selection dialog.
Also thunderbird -p name-of-existing-profile does not work.
No issue with Firefox nightly.

On my local build I see (with ./mach run --noprofile -- -p):

JavaScript error: resource://gre/modules/XULStore.sys.mjs, line 84: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.sys.mjs, line 84: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.sys.mjs, line 84: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.sys.mjs, line 84: Error: Can't find profile directory.

Which indicates ProfD and ProfDS both aren't available?
https://searchfox.org/mozilla-central/rev/fa11d06fd84c487cb0a135c08af796daa6a56e44/toolkit/components/xulstore/XULStore.sys.mjs#79-82

Duplicate of this bug: 1950676

edgul mentioned in #thunderbird slack:
In case it helps, the issue was that my profile location was ~/.thunderbird, and the daily install changed that location to be ~/.mozilla/thunderbird. This was of course empty so thunderbird probably created a fresh profile for me. By telling ~/.mozilla/thunderbird/profiles.ini about my previous profile, starting thunderbird -P to select the old profile I get all my data back

I think that means that https://searchfox.org/comm-central/rev/20340ce017f4e96d3e9e656672eac45b21573012/mail/confvars.sh#7 isn't working anymore. Do we have to move all the things out of that file after bug 1943612?

I think that's the spot yeah.

Regressed by: 1943612
See Also: → 1943547

(In reply to Martin Giger [:freaktechnik] from comment #6)

I think that means that https://searchfox.org/comm-central/rev/20340ce017f4e96d3e9e656672eac45b21573012/mail/confvars.sh#7 isn't working anymore. Do we have to move all the things out of that file after bug 1943612?

I thought the point of that was to load confvars.sh as key/value pairs.

There is new code in mozilla-central/moz.configure and a local test does show it calling helper.add with MOZ_APP_PROFILE=thunderbird

+@depends(build_environment, build_project, "--help")
+@checking("if project-specific confvars.sh exists")
+# This gives access to the sandbox. Don't copy this blindly.
+@imports("__sandbox__")
+@imports(_from="mozbuild.configure", _import="confvars")
+@imports("os.path")
+def load_confvars(build_env, build_project, help):
+    confvars_path = os.path.join(build_env.topsrcdir, build_project, "confvars.sh")
+    if os.path.exists(confvars_path):
+        helper = __sandbox__._helper
+        # parse confvars
+        try:
+            keyvals = confvars.parse(confvars_path)
+        except confvars.ConfVarsSyntaxError as e:
+            die(str(e))
+        for key, value in keyvals.items():
+            # FIXME: remove test once we no longer load confvars from old-configure.
+            if key in __sandbox__._options:
+                # ~= imply_option, but with an accurate origin
+                helper.add(f"{key}={value}", origin="confvars", args=helper._args)
+        return confvars_path

(In reply to Martin Giger [:freaktechnik] from comment #6)

I think that means that https://searchfox.org/comm-central/rev/20340ce017f4e96d3e9e656672eac45b21573012/mail/confvars.sh#7 isn't working anymore. Do we have to move all the things out of that file after bug 1943612?

It should not. The file should still be loaded and variable values made available to moz.configure. But only the variables declared as confvar. I think I can provide a patch.

Assignee: nobody → sguelton
Status: NEW → ASSIGNED

https://phabricator.services.mozilla.com/D239821 should do the trick, can you give it a try?

I think it's working. With a local build I'm now seeing more hits (and they're not empty) such as:
obj-x86_64-pc-linux-gnu/js/src/config.status: 'MOZ_APP_PROFILE': 'thunderbird',
obj-x86_64-pc-linux-gnu/config.status: 'MOZ_APP_PROFILE': 'thunderbird',
obj-x86_64-pc-linux-gnu/config/autoconf.mk:MOZ_APP_PROFILE = thunderbird

Can confirm it's working with ./mach run --no-profile -- -P with that patch applied to m-c.

Thanks :sergesanspaille! I just landoed your patch to expedite getting it fixed.

Target Milestone: --- → 137 Branch

This matches the recent configuration changes in mozilla-central: only
variable flagged as confvar should be set in confvars.sh

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/integration/autoland/rev/d1af5ea6ffba Move MOZ_APP_PROFILE from old-configure to moz.configure r=glandium
Status: ASSIGNED → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED

The Thunderbird patch is causing build bustage:
https://treeherder.mozilla.org/jobs?repo=comm-central&revision=8dceb73c2222143ec327f6471dff3e05a8aa0324

I am removing the checkin-flag to prevent accidential check-in. Could we handle the Thunderbird patch in a different Bug, since this bug is already marked as fixed for the part which landed in m-c?

Flags: needinfo?(corey)
See Also: → 1951143

Bug 1951143 has been opened

Flags: needinfo?(corey)
[task 2025-02-28T09:24:00.450Z] 09:24:00    ERROR -  Traceback (most recent call last):
[task 2025-02-28T09:24:00.451Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/configure.py", line 345, in <module>
[task 2025-02-28T09:24:00.451Z] 09:24:00     INFO -      sys.exit(main(sys.argv))
[task 2025-02-28T09:24:00.451Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/configure.py", line 140, in main
[task 2025-02-28T09:24:00.451Z] 09:24:00     INFO -      sandbox.run()
[task 2025-02-28T09:24:00.451Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/__init__.py", line 525, in run
[task 2025-02-28T09:24:00.451Z] 09:24:00     INFO -      self._value_for(option)
[task 2025-02-28T09:24:00.451Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/__init__.py", line 630, in _value_for
[task 2025-02-28T09:24:00.452Z] 09:24:00     INFO -      return self._value_for_option(obj)
[task 2025-02-28T09:24:00.452Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/util.py", line 917, in method_call
[task 2025-02-28T09:24:00.452Z] 09:24:00     INFO -      cache[args] = self.func(instance, *args)
[task 2025-02-28T09:24:00.452Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/__init__.py", line 665, in _value_for_option
[task 2025-02-28T09:24:00.452Z] 09:24:00     INFO -      value, option_string = self._helper.handle(option)
[task 2025-02-28T09:24:00.452Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/options.py", line 616, in handle
[task 2025-02-28T09:24:00.452Z] 09:24:00     INFO -      extra_ret = option.get_value(extra_arg, extra_origin)
[task 2025-02-28T09:24:00.453Z] 09:24:00     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/options.py", line 443, in get_value
[task 2025-02-28T09:24:00.453Z] 09:24:00     INFO -      raise InvalidOptionError(
[task 2025-02-28T09:24:00.453Z] 09:24:00     INFO -  mozbuild.configure.options.InvalidOptionError: MOZ_APP_PROFILE=thunderbird can not be set by implied. Values are accepted from: confvars

Sorry, wrong bug

Pushed by sguelton@mozilla.com: https://hg.mozilla.org/comm-central/rev/c6ec012e4036 Move configuration variables from confvars.sh to moz.configure r=coreycb

Backed that out for bustage.
Please continue in bug 1951143

Backout by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/dfa9bcf0b166 Backed out changeset c6ec012e4036 for build bustages

Comment on attachment 9468872 [details]
Bug 1950637 - Move configuration variables from confvars.sh to moz.configure r=dandarnell

Revision D239871 was moved to bug 1951143. Setting attachment 9468872 [details] to obsolete.

Attachment #9468872 - Attachment is obsolete: true
Duplicate of this bug: 1951535
Blocks: 1895251
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: