Open Bug 1653997 Opened 4 years ago Updated 3 years ago

Clicking on a push notification when using multiple profiles takes you to wrong profile

Categories

(Core :: Widget: Cocoa, defect, P3)

78 Branch
x86_64
macOS
defect

Tracking

()

People

(Reporter: zeid, Unassigned)

Details

This issue appears to happen randomly, though is reproducible most of the time.

Expected behaviour:

If I have two different Firefox profiles open, and Firefox is in the background / not in focus, clicking on a push notification (say from Slack or something else) should take me to the correct Firefox window/instance.

Actual behaviour:

Clicking on said notification sometimes (most of the time) takes me to the wrong instance of Firefox (wrong profile).

Steps to reproduce:

You can reproduce this by having two profiles open, and going to https://web-push-book.gauntface.com/demos/notification-examples/ and triggering the simple example push notification. Clicking on the notification that comes up takes me to the wrong window (and in fact, away from the correct one).

Using Firefox 78.0.2 on macOS 10.15.5.

Severity: -- → S2
Priority: -- → P2

Hi Zeid, thanks for reporting. Do you still see this issue?

Flags: needinfo?(zeid)

Hi Emma - yes I was able to just reproduce this. Triggered a notification from a different profile, and it took me back to the wrong profile upon clicking on it. Running 88.0.1 (64-bit) on macOS 11.3.1.

Flags: needinfo?(zeid)

Can you clarify how you're running the 2 profiles? Specifically:

  • Are you running any of the profiles with --no-remote?
  • Are the two Firefox instances separate binaries/app bundles/installs, or do they share the same on?

Relatedly, does it seem like the choice of Firefox might be tied to which profile was loaded first?

Flags: needinfo?(zeid)

(In reply to Andrew Sutherland [:asuth] (he/him) from comment #3)

Can you clarify how you're running the 2 profiles? Specifically:

  • Are you running any of the profiles with --no-remote?

Not that I know of, see below.

  • Are the two Firefox instances separate binaries/app bundles/installs, or do they share the same on?

They are on the same install

Relatedly, does it seem like the choice of Firefox might be tied to which profile was loaded first?

It's possible, given the STR below, but I will have to probably do this in a fresh install/sandbox to be really sure.

I can try and reproduce this in a sandbox, but the way I am reproducing it right now is on the main install of my Firefox.

  • I have the default profile running, then
  • I navigate to about::profiles to launch the secondary profile by clicking on "Launch profile in new browser"
  • The new browser launches behind my current browser, so I switch windows by using the Dock
  • I go to https://web-push-book.gauntface.com/demos/notification-examples/ and click on "EXAMPLE NOTIFICATION"
  • I click on the notification popup
  • I am taken back to the original profile on whatever window it was on, rather than to the page I was actually on that triggered the notification

Hope this helps.

Flags: needinfo?(zeid)

Thank you for the additional details!

It seems like perhaps this is an implementation edge case in the OS X nsIAlertsService implementation at https://searchfox.org/mozilla-central/source/widget/cocoa/OSXNotificationCenter.mm which is in the Core:: Widget :: Cocoa component, moving to that component.

Severity: S2 → --
Component: DOM: Push Notifications → Widget: Cocoa
Priority: P2 → --
Severity: -- → S4
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.