Closed Bug 1726808 Opened 2 months ago Closed 2 months ago

nsToolkitProfileService::IsSnapEnvironment() hardcodes "firefox" instead of checking against MOZ_APP_NAME

Categories

(Toolkit :: General, defect)

Firefox 91
defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox-esr91 --- fixed
firefox93 --- fixed

People

(Reporter: olivier, Assigned: olivier)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

When running the thunderbird snap package version 91.0.1 (currently in the candidate channel), I observed that the profiles from an older version of that snap (78.13.0, currently in the stable channel) weren't being used, instead a new profile was being created.

Actual results:

I also observed that an Install section was being created in profiles.ini with an install hash, which isn't supposed to happen in a snap environment.

Expected results:

This is caused by nsToolkitProfileService::IsSnapEnvironment() checking the value of $SNAP_INSTANCE_NAME against the hardcoded string "firefox", instead of checking against MOZ_APP_NAME.

Blocks: snap
Assignee: nobody → olivier

Depends on D123239

Attachment #9237403 - Attachment is obsolete: true
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/441477965474
Un-hardcode the snap name to check against in nsToolkitProfileService::IsSnapEnvironment(). r=stransky,mossop
Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
Regressions: 1728037

Comment on attachment 9237254 [details]
Bug 1726808 - Un-hardcode the snap name to check against in nsToolkitProfileService::IsSnapEnvironment().

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Upgrading the snap package from 78.x to 91.y fails to reuse existing profiles, and instead creates a new profile. This is bad UX, so the fix should be uplifted to 91.
    The fix for bug 1728037 (unit tests regression) needs to be uplifted together with this one.
  • User impact if declined: Users upgrading the snap will start with a new profile.
  • Fix Landed on Version: 93
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The fix is trivial, and only affects snap packages of firefox/thunderbird.
  • String or UUID changes made by this patch:
Attachment #9237254 - Flags: approval-mozilla-esr91?

Comment on attachment 9237254 [details]
Bug 1726808 - Un-hardcode the snap name to check against in nsToolkitProfileService::IsSnapEnvironment().

Approved for 91.2esr.

Attachment #9237254 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
You need to log in before you can comment on or make changes to this bug.