-compose does not work on Mac OS X when TB is already running
Categories
(Core :: Widget: Cocoa, defect, P3)
Tracking
()
People
(Reporter: hans.mustermann, Assigned: mozilla)
References
Details
(Keywords: platform-parity)
Attachments
(1 file, 23 obsolete files)
(deleted),
patch
|
spohl
:
review+
|
Details | Diff | Splinter Review |
Reporter | ||
Updated•16 years ago
|
Comment 1•16 years ago
|
||
Comment 2•16 years ago
|
||
Comment 4•16 years ago
|
||
Comment 6•14 years ago
|
||
Comment 8•13 years ago
|
||
Comment 9•13 years ago
|
||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Comment 12•11 years ago
|
||
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Comment 15•10 years ago
|
||
Comment 16•10 years ago
|
||
Comment 17•10 years ago
|
||
Comment 20•10 years ago
|
||
Comment 21•7 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 22•6 years ago
|
||
Comment 23•6 years ago
|
||
Comment 24•6 years ago
|
||
Assignee | ||
Comment 25•6 years ago
|
||
Comment 26•6 years ago
|
||
Assignee | ||
Comment 27•6 years ago
|
||
Comment 28•6 years ago
|
||
Assignee | ||
Comment 29•6 years ago
|
||
Comment 30•6 years ago
|
||
Comment 31•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 32•6 years ago
|
||
Assignee | ||
Comment 33•6 years ago
|
||
Assignee | ||
Comment 34•6 years ago
|
||
Comment 35•6 years ago
|
||
Assignee | ||
Comment 36•6 years ago
|
||
Assignee | ||
Comment 37•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 38•6 years ago
|
||
Comment 39•6 years ago
|
||
Assignee | ||
Comment 40•6 years ago
|
||
Comment 41•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 42•6 years ago
|
||
Comment 43•6 years ago
|
||
Assignee | ||
Comment 44•6 years ago
|
||
Comment 45•6 years ago
|
||
Assignee | ||
Comment 46•6 years ago
|
||
Comment 47•6 years ago
|
||
Assignee | ||
Comment 48•6 years ago
|
||
Comment 49•6 years ago
|
||
Comment 50•6 years ago
|
||
Comment 51•6 years ago
|
||
Comment 52•6 years ago
|
||
Assignee | ||
Comment 53•6 years ago
|
||
Assignee | ||
Comment 54•6 years ago
|
||
Comment 55•6 years ago
|
||
Comment 56•6 years ago
|
||
Comment 57•6 years ago
|
||
Assignee | ||
Comment 58•6 years ago
|
||
Comment 59•6 years ago
|
||
Assignee | ||
Comment 60•6 years ago
|
||
Comment 61•6 years ago
|
||
Comment 62•6 years ago
|
||
Assignee | ||
Comment 63•6 years ago
|
||
Comment 64•6 years ago
|
||
Assignee | ||
Comment 65•6 years ago
|
||
Comment 66•6 years ago
|
||
Comment 67•6 years ago
|
||
Comment 68•6 years ago
|
||
Comment 69•6 years ago
|
||
Comment 70•6 years ago
|
||
Comment 71•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 72•6 years ago
|
||
Comment 73•6 years ago
|
||
bugherder |
Comment 74•6 years ago
|
||
backout |
Updated•6 years ago
|
Comment 76•6 years ago
|
||
Comment 77•6 years ago
|
||
backout |
Comment 78•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 79•6 years ago
|
||
Stephen, I can see that the fix broke autoupdate mechanism, which seems to rely on two instances running simultaneously. Are these three the only regressions occurring or there were others?
I am wondering what other mechanisms may rely on multiple running instances that need to be tested/verified (perhaps, based on some specific command line arguments?)? As you can see from the patch, I am currently only respecting the -no-remote/-headless arguments - otherwise I am not allowing running two instances at the same time.
As an easy (not the best, but reliable) solution to these regressions above for macOS we may consider looking for a new command line argument, say "-force-remote", and allowing remote control only if this argument is found.
Comment 80•6 years ago
|
||
(In reply to Yuri from comment #79)
Stephen, I can see that the fix broke autoupdate mechanism, which seems to rely on two instances running simultaneously. Are these three the only regressions occurring or there were others?
Those were the only ones we became aware of. There may be others, so we will need to keep an eye out for new issues once this lands again.
I am wondering what other mechanisms may rely on multiple running instances that need to be tested/verified (perhaps, based on some specific command line arguments?)? As you can see from the patch, I am currently only respecting the -no-remote/-headless arguments - otherwise I am not allowing running two instances at the same time.
As an easy (not the best, but reliable) solution to these regressions above for macOS we may consider looking for a new command line argument, say "-force-remote", and allowing remote control only if this argument is found.
This may or may not be necessary. It would be good to collect the specific arguments that are being used in these instances and see if there is a way to make an exception for these as-is. If not, and additional argument would seem to make sense.
Note that for bug 1513335, we may actually want that behavior to match Windows and Linux, but we should focus the currently running instance of Firefox.
Updated•6 years ago
|
Assignee | ||
Comment 81•6 years ago
|
||
Hello Stephen,
The auto-update mechanism should be fixed. I am detecting the update-restart event by checking the MOZ_APP_RESTART=1 environment variable.
Note that for bug 1513335, we may actually want that behavior to match Windows and Linux, but we should focus the currently running instance of Firefox.
Updated the logic so that -no-remote argument (implicitly used by ./mach run) now defines behavior only for duplicate processes, not the original one(s).
I am not activating ignoring other apps though, since you mentioned earlier this would not the desired behaviour.
Please confirm, that this is not happening anymore.
Not sure if this was introduced by our fix.
Updated•6 years ago
|
Assignee | ||
Comment 82•6 years ago
|
||
Ping
Comment 83•6 years ago
|
||
This didn't fall off my radar, but I've been sidetracked with other work. Should be able to look at this shortly.
Comment 84•6 years ago
|
||
This removes some whitespace changes that snuck into your last patch. I will apply any review feedback to this patch to focus on the functional changes.
Comment 85•6 years ago
|
||
And here is a patch that actually applies. Building now to verify the functional changes.
Comment 86•6 years ago
|
||
Assignee | ||
Comment 87•6 years ago
|
||
Thanks for looking into this.
This now starts a separate instance again.
Can you let me know how exactly are you launching two instances? Using ./mach run, or by just clicking the icon in Dock? What arguments are being passed to each of the instances?
Comment 88•6 years ago
|
||
(In reply to Yuri from comment #87)
Thanks for looking into this.
This now starts a separate instance again.
Can you let me know how exactly are you launching two instances? Using ./mach run, or by just clicking the icon in Dock? What arguments are being passed to each of the instances?
I have followed the steps in bug 1513335:
(In reply to Markus Stange [:mstange] from comment #0)
Steps to reproduce:
- Have a "Firefox Nightly" app icon in your dock, but don't have it
running.- Launch a locally-compiled Firefox build from the command line. This
instance of Nightly appears as a new icon in your Dock and uses its own
Firefox profile.- Click the "Firefox Nightly" Dock icon.
The instance, launched in step 2 via ./mach run, is launched with the following command line arguments:
/Users/spohl/Documents/objdir-ff-release/dist/Nightly.app/Contents/MacOS/firefox -no-remote -foreground -profile /Users/spohl/Documents/objdir-ff-release/tmp/profile-default
Launching the instance in step 3 by clicking the Dock icon launches another instance with no command line arguments, as follows:
/Applications/Firefox Nightly.app/Contents/MacOS/firefox
Assignee | ||
Comment 89•6 years ago
|
||
Thanks Stephen. My other question would be – are you sure you have both instances (the one in Dock and the one you are running with ./mach run) built with the patch?
Note, that the /Applications/Firefox Nightly.app/Contents/MacOS/firefox must include the patch, the old version doesn't correctly handle IPC to re-activate the app and prevent it from starting.
I am having the same config and I verified that the second instance doesn't start - instead the original one gets activated once you click on a dock icon. Please confirm that you do - I will try to find out why this is happening.
Comment 90•6 years ago
|
||
(In reply to Yuri from comment #89)
I am having the same config and I verified that the second instance doesn't start - instead the original one gets activated once you click on a dock icon. Please confirm that you do - I will try to find out why this is happening.
You're correct, I'm seeing the same. Note that the running instance does not gain focus and is not brought to the foreground for me. We should make it so that we can still launch another instance, unless the instance is launched with the same profile.
Comment 91•6 years ago
|
||
(In reply to Stephen A Pohl [:spohl] from comment #90)
Note that the running instance does not gain focus and is not brought to the foreground for me.
I should clarify that each click on the Dock icon opens a new window in the existing, running instance that was launched from terminal via ./mach run.
Assignee | ||
Comment 92•6 years ago
|
||
Hi Stephen,
Note that the running instance does not gain focus and is not brought to the foreground for me
This is due to not activating ignoring other apps. We can activate the original app ignoring the currently focused app, though, if needed - then the original instance will be brought to foreground. Please confirm that this is what is actually wanted.
We should make it so that we can still launch another instance, unless the instance is launched with the same profile.
One can launch another instance by specifying --no-remote in the command line.
The patch does not deal with profiles currently (I think this must be done in another module - the one that actually displays the message "A copy of Firefox is already open. Only one copy of Firefox can be open at a time.").
I should clarify that each click on the Dock icon opens a new window in the existing, running instance that was launched from terminal via ./mach run.
I suppose this is the intended behavior?
Comment 93•6 years ago
|
||
(In reply to Yuri from comment #92)
Hi Stephen,
Note that the running instance does not gain focus and is not brought to the foreground for me
This is due to not activating ignoring other apps. We can activate the original app ignoring the currently focused app, though, if needed - then the original instance will be brought to foreground. Please confirm that this is what is actually wanted.
Yes, we need to either focus the existing instance and bring it to the foreground or we need to launch a new instance with the default profile (the current behavior is confusing, as described at the end of the description of bug 1513335).
We should make it so that we can still launch another instance, unless the instance is launched with the same profile.
One can launch another instance by specifying --no-remote in the command line.
The patch does not deal with profiles currently (I think this must be done in another module - the one that actually displays the message "A copy of Firefox is already open. Only one copy of Firefox can be open at a time.").
If a user has chosen to display the profile manager, the current behavior was to display the profile manager in the second instance to allow a user to select a different profile. With this patch, the Dock icon simply bounces and disappears and the existing instance has a new window opened, but isn't brought to the foreground. You can set the profile manager to display on startup by unchecking the right checkbox in the dialog that's displayed when launching firefox with the -p command line argument.
Assignee | ||
Comment 94•6 years ago
|
||
Added activation of the original instance when a duplicate is launched, slight change of code formatting as per Stephen's comments.
Comment 95•6 years ago
|
||
Thanks! I've updated the patch to remove some whitespace changes that have snuck in again. Let's land this and keep an eye out for any other potential fallout.
Comment 96•6 years ago
|
||
Comment 97•6 years ago
|
||
Backed out for xpcshell perma fails on toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js.
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=231708679&repo=mozilla-inbound&lineNumber=7759
19:53:16 INFO - TEST-START | toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js
19:55:17 WARNING - TEST-UNEXPECTED-FAIL | toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js | xpcshell return code: 0
19:55:17 INFO - TEST-INFO took 120380ms
19:55:17 INFO - >>>>>>>
19:55:17 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
19:55:17 INFO - "11:53:16:974 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 738] start - general test setup"
19:55:17 INFO - TEST-PASS | toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js | setupTestCommon - [setupTestCommon : 740] gTestID should be 'undefined' (setupTestCommon should only be called once) - "undefined" === "undefined"
19:55:17 INFO - (xpcshell/head.js) | test pending (2)
19:55:17 INFO - "11:53:16:976 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 811] Updates Directory (UpdRootD) Path: /Users/cltbld/Library/Caches/Mozilla/updates/Users/cltbld/tasks/task_1551727841/build/tests/xpcshell/tests/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess/dir"
19:55:17 INFO - "11:53:16:977 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 831] attempting to remove directory. Path: /Users/cltbld/Library/Caches/Mozilla/updates/Users/cltbld/tasks/task_1551727841/build/tests/xpcshell/tests/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess/dir"
19:55:17 INFO - "11:53:16:977 | TEST-INFO | shared.js | [removeDirRecursive : 526] attempting to remove directory. Path: /Users/cltbld/Library/Caches/Mozilla/updates/Users/cltbld/tasks/task_1551727841/build/tests/xpcshell/tests/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess/dir"
19:55:17 INFO - "11:53:16:978 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 843] finish - general test setup"
19:55:17 INFO - "11:53:16:978 | TEST-INFO | xpcshellUtilsAUS.js | [setupUpdaterTest : 2608] start - updater test setup"
19:55:17 INFO - "11:53:16:980 | TEST-INFO | xpcshellUtilsAUS.js | [SUT_TF_FE : 2624] start - setup test file: precomplete"
Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/a8f1f28ae9b0693826dd8fcfada19371b9fd9197
Comment hidden (Intermittent Failures Robot) |
Comment 99•6 years ago
|
||
The failing test can be executed as follows:
./mach test toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js
One thing I've noticed in the console output is that firefox is executed as follows:
firefox -no-remote -test-process-updates
Comment 100•6 years ago
|
||
Is Dave Townsend aware of the work that's happening here? His recent email to firefox-dev seems very relevant to the code that's being touched here. https://mail.mozilla.org/pipermail/firefox-dev/2019-March/006995.html
Comment 101•6 years ago
|
||
On first landing the fix for this bug caused major functional regressions and the updated patch was also backed out last week. As Markus noted in comment #100, this is also likely to impact the work on Dedicated Profiles that Dave is doing now and that is planned for 67. It seems that fixing this P3 this week is unnecessary risk during our soft code freeze period.
Yuri, I suggest that you reland your patch after the final merge when we have bumped our mozilla-central repo to 68. Thanks!
Comment 102•6 years ago
|
||
Oooh, adding remote support to OSX? Nice. Sorry I wasn't aware of this earlier.
It would be great if it were possible to integrate this code into the remote service that both linux and windows now use (https://searchfox.org/mozilla-central/source/toolkit/components/remote) rather than nsNativeAppSupport, predominantly because having all this stuff in the same place helps finding it and having it happen at the same time and have similar behaviour on all platforms is beneficial, having things happen in different order on startup is a source of platform specific bugs.
Happy to try to help out wherever I can!
Assignee | ||
Comment 103•6 years ago
|
||
Hi Stephen,
Thanks for your suggestions. Not being a mozilla developer, your hints help a lot.
The test should have passed because it passes -no-remote to every instance, however for some reason the call [NSRunningApplication runningApplicationsWithBundleIdentifier] either takes too long comparing to the timeout set in test, or just never returns for some odd reason.
I kind of resolved this by making this call only in case -no-remote has not been passed (this doesn't break remote logic in any way). The test now passes.
Regarding Pascal's suggestion, when would be the right date to land the patch? I understand, we can't try it out on Nightly until that date, correct?
Dave, do you think we could do this migration (nsNativeAppSupport -> remote component) as a separate effort? Unfortunately, Mac support of "remote" turns out to get some hacks inside, so I am worried it may take another month or so to get this stuff debugged and working.
Stephen, what do you think?
Comment 104•6 years ago
|
||
(In reply to Yuri from comment #103)
Dave, do you think we could do this migration (nsNativeAppSupport -> remote component) as a separate effort? Unfortunately, Mac support of "remote" turns out to get some hacks inside, so I am worried it may take another month or so to get this stuff debugged and working.
By all means, don't want to hold things up.
Assignee | ||
Comment 105•6 years ago
|
||
Ping :)
Comment 106•6 years ago
|
||
(In reply to Yuri from comment #105)
Ping :)
Firmly penciled in for tomorrow morning. Thanks for your patience.
Comment 107•6 years ago
|
||
Combined the patches. This looks good to me.
Comment 108•6 years ago
|
||
Comment 109•6 years ago
|
||
Assignee | ||
Comment 110•6 years ago
|
||
Thanks Stephen. Fingers crossed!
Comment 111•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 112•6 years ago
|
||
Hi Stephen, can I ask what are the next steps with the fix? Do we need to wait for it to get to nightly and then QA testing?
Assignee | ||
Comment 113•6 years ago
|
||
Updated as per Matthew's finding in https://bugzilla.mozilla.org/show_bug.cgi?id=1540821
Comment 114•6 years ago
|
||
Assignee | ||
Comment 115•6 years ago
|
||
Attached to 1540821. Please let me know if anything is incorrect.
Comment 116•6 years ago
|
||
(In reply to Yuri from comment #112)
Hi Stephen, can I ask what are the next steps with the fix? Do we need to wait for it to get to nightly and then QA testing?
Comment 111 shows that the patch landed in Nightly. It will show up in the next Nightly build, usually on the day following the landing. There is no automatic QA testing, unless it is specifically requested. We need to keep an eye out for bugs/regressions that get reported after the landing, such as has happened with bug 1540821. Thank you for fixing this so quickly. If there are no major regressions that require another backout of the patch, the fix will ride the train and ultimately land in release. You can get an idea of the timing by looking at the release calendar:
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 118•5 years ago
|
||
Why did this bug end up in a mainstream release when regression bug 1553767 was already reported 2 month ago?
Assignee | ||
Comment 119•5 years ago
|
||
Hi Dave, could you please let me know whether this patch has already landed in Thunderbird, and which release, if so? (not sure where this can be checked)
Thank you
Comment 120•5 years ago
|
||
Flags on this bug say "firefox68: fixed", so it is available (also) in thunderbird version 68 and above.
Assignee | ||
Comment 121•5 years ago
|
||
Thanks Magnus
Description
•