Bug 9932 - SC prompts with warning dialog when started, each and every time
: SC prompts with warning dialog when started, each and every time
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Mac Installer
: 7.3.0
: Macintosh Other
: P1 major (vote)
: 7.x
Assigned To: Spies Steven
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-07 16:40 UTC by James Richardson
Modified: 2009-09-08 09:24 UTC (History)
7 users (show)

See Also:
Category: ---


Attachments
Fail as a Service (104.71 KB, image/png)
2008-11-07 16:40 UTC, James Richardson
Details
Warning on start (30.23 KB, image/png)
2008-11-07 16:40 UTC, James Richardson
Details
Screen shot of SqueezeCenter.pref when SC installer is used (55.89 KB, image/png)
2008-11-18 11:25 UTC, Spies Steven
Details
Screen shot of SqueezeCenter.pref when Mac OS X installer is used (55.54 KB, image/png)
2008-11-18 11:26 UTC, Spies Steven
Details
replacement install.sh from the installer project for osx (1.85 KB, application/octet-stream)
2008-11-24 10:05 UTC, Dave Nanian
Details
Ugly Message Box (1.29 MB, image/png)
2008-11-25 07:51 UTC, James Richardson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Richardson 2008-11-07 16:40:02 UTC
Created attachment 4217 [details]
Fail as a Service

In SC 7.3 MAC.  now that we have changed to the System Install, every time SC is started the attached warning message comes up before SC will start.

This happens no mater what 'start up' option is selected.

with 7.2.1, the warning message would only come up the very first time SC was started immediately after the install.  And never when started as a service.
Comment 1 James Richardson 2008-11-07 16:40:25 UTC
Created attachment 4218 [details]
Warning on start
Comment 2 James Richardson 2008-11-11 14:26:19 UTC
We can not release SC on the Mac like this.  If you feel differently, please reassign the bug
Comment 3 Michael Herger 2008-11-12 06:31:28 UTC
I've never seen that message. What OSX version is this? Do you have some security app installed on your system?
Comment 4 Michael Herger 2008-11-12 06:39:21 UTC
Ok, this seems to be something Leopard introduced. I wonder why I never see it. It seems to come up if there's an issue with the permissions (you dowload, your wife wants to install).

From http://blog.emmanuelbernard.com/2008/03/mac-os-x-leopard-and-internet-downloads.html 

"Apparently, this is a small bug. If you download an application with one user account but do not open it with the same account, the security flag is never lift up. To work around that, log on your original account, open all you downloaded apps (27 for me, the dock was a nice christmas tree :) ), accept the security warning for all of them. Next time you open one of them, the security warning will not appear, pfffeu!"

Therefore I doubt this is a general problem - or support would have opened this bug long ago. Could you please check your files? Probably uninstall download and installed file, and try again as one and the same user?
Comment 5 James Richardson 2008-11-12 07:19:51 UTC
OSX 10.5.5

NO extra security apps

This does NOT happen with 7.2.1, only with the 'new' 7.3
Comment 6 Blackketter Dean 2008-11-12 08:54:17 UTC
Hey Dave, you got an idea what the best way to work around this would be?
Comment 7 James Richardson 2008-11-12 08:59:57 UTC
Michael: this system is a single user.  I.E. no other accounts are on the system.  I download and install under the same user.

NOTE: when the PrefPane is set to start SC 'When I log in' SC fails to start automatically.  I have to launch the PrefPane and manually start SC. (note the message pops up when I click the start server button)

when the PrefPane is set to 'When system boots' then SC starts and I do not get prompted with the pop up message.

when the PrefPane is set to 'Never' and I manually start SC, then I always get prompted with the pop up message
Comment 8 Rich Siegel 2008-11-12 09:26:03 UTC
If you run a "Repair Permissions" using Disk Utility, does that resolve the problem? I ask because it's possible that there's a database somewhere (Nanian's notion) that keeps track of which entities had quarantine data, and perhaps there's a failure trying to update that.
Comment 9 James Richardson 2008-11-12 12:36:53 UTC
Rich: did a verify and repair, same issue.  Note: this is not on the .dmg file or the installer.  This is when running SC from the PrefPane

I use FireFox to download, would that cause an issue?
Comment 10 Dave Nanian 2008-11-12 15:14:16 UTC
Firefox isn't an issue here. I didn't think repair permissions would help. I'd *actually* recommend an archive and install *if* this is only happening on the one system. We've seen this kind of thing with SuperDuper!, and A&I is the only thing I've seen that fixes it.
Comment 11 Blackketter Dean 2008-11-12 17:35:14 UTC
James, is this only happening on one system, or is this reproducible on any 10.5.5 system?
Comment 12 James Richardson 2008-11-13 08:43:18 UTC
Multiple systems.  Steven has the error as well, but I don't know if we have gotten reports from customers.
Comment 13 Dave Nanian 2008-11-13 08:47:01 UTC
Does an archive-and-install fix it?
Comment 14 Spies Steven 2008-11-13 08:56:57 UTC
This only seems to be an issue when the SC installer is downloaded on the same Mac OS X 10.5 system that it is installed on.  Seems to be that Mac OS X is not clearing the warning mechanism even though the user has approved it before.  Could this be a bug with Mac OS X?  Is there a way we can get around with the installer?
Comment 15 Dave Nanian 2008-11-13 09:00:21 UTC
Yes, that's what I've been saying: it's an OSX bug. But if you archive-and-install, it *should* fix the problem. (Emphasis on *should*.)
Comment 16 James Richardson 2008-11-17 09:54:30 UTC
I've tried the 'archive-n-install' thing, but in my case that did not work either.

I downloaded the .dmg
Archived it to a .ZIP
Moved it to an external device (USB drive)
removed the original .dmg from the MAC
rebooted the system
copied the .ZIP to the system
unarchived it
ran the .dmg
installed
started SC saw the issue.

Correct procedure? if not let me know what else I should have tested.
Comment 17 Dave Nanian 2008-11-17 10:07:09 UTC
I think you misunderstood what an archive-and-install is. You need to archive-and-install *Leopard* itself, using the install DVD.
Comment 18 Blackketter Dean 2008-11-17 17:15:51 UTC
(i.e. reinstall the OS with the Archive & Install option)
Comment 19 Spies Steven 2008-11-17 17:30:46 UTC
I have a brand new out of the box MacBook that shipped with Mac OS X 10.5 and I experience this issue on it with SqueezeCenter 7.3.  Even if reinstalling the OS with the Archive & Install option was to fix this issue I really don't see this as a practical solution for our users.

Is there any documentation we can use about this Mac OS X bug on the web?
Comment 20 Dave Nanian 2008-11-18 07:59:29 UTC
There's no way around this issue: it's part of the OSX security mechanism. The question is, why is it happening to some users and not all users?

I cannot reproduce it here, on a 10.5.5 system...
Comment 21 Spies Steven 2008-11-18 10:30:39 UTC
Using the mac installer to install SqueezeCenter.prefPane does not have this issue.  To use the mac installer just double click the SqueezeCenter.prefPane inside the Install Files folder on the SqueezeCenter install image.  The installer will ask if you wish to replace the current SqueezeCenter.prefPane if already installed or ask to install for current user or all users if it was not.  Installing using this method I will not even get the warning dialog at all.

This leads me to believe that something can be done to our installer to get around this issue.

Bug 9782 covers reworking the Mac installer but we really need a solution for the 7.3 release.

Comment 22 Spies Steven 2008-11-18 11:23:49 UTC
This might not mean anything but I did notice that the permissions on the SqueezeCenter.pref are different if the mac installer is used.  When the Mac installs SqueezeCenter.pref it gets a permission of system read & write.  When SC installs SqueezeCenter.pref it gets a permission of (unknown) read & write.  I will attach screen shots.
Comment 23 Spies Steven 2008-11-18 11:25:12 UTC
Created attachment 4293 [details]
Screen shot of SqueezeCenter.pref  when SC installer is used
Comment 24 Spies Steven 2008-11-18 11:26:29 UTC
Created attachment 4294 [details]
Screen shot of SqueezeCenter.pref  when Mac OS X installer is used
Comment 25 Dave Nanian 2008-11-18 11:57:55 UTC
OK. I've certainly verified that the ownership is different (that's expected, since the image is mounted without ownership on, and the preference pane is installed authenticated -- under Leopard, that means the owner is user 99 -- 'unknown').

But -- testing again here -- I'm not getting this to fail or prompt even the first time. I get the prompt when I run the *installer*, but then everything works exactly as expected.
Comment 26 James Richardson 2008-11-18 12:01:23 UTC
Dean/Michael: your thoughts on Steven's latest findings?
Comment 27 Spies Steven 2008-11-18 13:51:29 UTC
I just created a VMware Fusion image from scratch and see this issue on it as well.  This was using Mac OS X Server 10.5.5.  Hopefully being able to see the issue in VMware should help those that are not able to reproduce.
Comment 28 Dave Nanian 2008-11-18 13:58:22 UTC
Does this also happen when you download with Safari, and run the installer right from the download after Safari has auto-opened it?
Comment 29 Spies Steven 2008-11-18 14:06:21 UTC
> Does this also happen when you download with Safari, and run the installer
> right from the download after Safari has auto-opened it?
> 

If I understand the question completely the answer is yes, I will always be prompted to answer the dialog if I download and install on the same machine I run the SC installer.  I will not be prompted if I download the installer image on a different machine and then transfer the installer image or use the mac installer by double clicking the SqueezeCenter.prefPane.
Comment 30 Michael Herger 2008-11-18 23:12:32 UTC
Steven - would it help if I reverted the recent change step by step, building installers for every step (there are only two or three)? Might help us narrow down the issue to one particular change.
Comment 31 Spies Steven 2008-11-19 08:25:15 UTC
Michael, from what I can tell our installer has always had this issue with Mac OS X 10.5 when installing for all users but not when installing for the current user.  So I don't think it would help narrow the issue.

Would it help if I sent you a VMware Fusion image that shows the issue?
Comment 32 Blackketter Dean 2008-11-19 10:10:42 UTC
I spoke to Dave yesterday by phone and I think we should modify the installer and pref pane to default to install for this user and run at boot time.  Then it should work reliably, right?
Comment 33 Michael Herger 2008-11-20 04:48:23 UTC
change 23978 - change default installation behaviour to "current user" instead of "for all users". I don't know what this means for the user. So please test it :-).

Re-assigning to QA as I've never been able to reproduce the issue reported here. Please close if this bug if it's fixed. Thanks.
Comment 34 Dan Evans 2008-11-20 10:17:25 UTC
If we make "For this user only" the default, how will a customer change this to "All Users" if they want or need to?  I know that some percentage of our users desire to have SqueezeCenter available for all users. (even if it is a low percentage.)
Comment 35 Spies Steven 2008-11-21 11:07:33 UTC
Change 23978 only gets around the issue partially.  It kinda works for those users that are installing for the first time or are upgrading from an install that was for the current user only.  The user will unfortunately still get the warning dialog the first time the user starts SC from the control panel but not subsequent times.

If the user is upgrading from an install that was for all users will result in the warning dialog appearing every time the sever is started.  What is even more odd to me is that this happens even though the installer removed the prefrence pane that was originally installed in the system library and the new prefrence pane is only in the current users library.  The other odd thing is that the prefrence pane when installed as an update gets different permissions then when installed fresh. For example I was required to enter a password to remove the prefrence pane when installed as an update but not when installed fresh even though the prefrence pane was now installed for the current user only.

Another thing I am seeing now is that when installing fresh I get the installed successfully dialog but after I answer it the system preferences window closes and then nothing happens.  SqueezeCenter does appear to start but I am not taken to the web interface.  Different bug perhaps?

I also noticed that the default setting for Automatically start is still set to never.  I believe we wanted to change that to When I log in to match the behavior of the Windows installer.

I want to reiterate that installing the SqueezeCenter.prefPane by double clicking it in the finder avoids these issues both when I install for the current user or for all users.

I'm uncomfortable suggesting that the current state of our installer is good enough for 7.3 but can't think of anything at the moment that could be done to our current installer to make it better other then a complete rewrite.
Comment 36 Blackketter Dean 2008-11-21 18:30:44 UTC
Ok, I"m really confused.  Which of these issues are related to the new change (i.e. forcing "this user" and "start at boot") and which are related to 10.5.5 behavior?
Comment 37 Dave Nanian 2008-11-23 11:52:08 UTC
OK - I have a suggestion for you.

Keep the general logic of install/update/etc, and have the installer kill the existing prefPane. Eliminate the in-installer option of where to install.

Rather than copying the prefPane "manually" with NSFileManager, use [NSWorkspace openFile:] to "open" the preference pane file on the install image. This will invoke the default "installation" logic that testing has found works for both all and the current user.

This will prompt, do whatever magic the OS does to prevent the prompting, and achieve the installation you want, while avoiding the security subsystem that seems to be causing the underlying issue.
Comment 38 Blackketter Dean 2008-11-24 09:12:34 UTC
David: Can you provide a patch?
Comment 39 Dave Nanian 2008-11-24 10:03:03 UTC
I've attached a replacement install.sh that should accomplish the equivalent of what I suggested. Testers: please give this a try.
Comment 40 Dave Nanian 2008-11-24 10:05:40 UTC
Created attachment 4331 [details]
replacement install.sh from the installer project for osx

This should be used as a replacement for the existing one. It uses ditto's "noqtn" parameter to strip quarantine information from files when copying, and checks if it's under 10.[5678] (e.g. 10.5, 10.6, 10.7, 10.8). It won't do this under any other OSX versions, and noqtn is not available under 10.4 or 10.3.
Comment 41 Spies Steven 2008-11-24 17:04:42 UTC
Michael, can you check Dave's change in?  I will try it first thing in the morning.
Comment 42 Michael Herger 2008-11-25 01:35:19 UTC
Thanks Dave! Checked in as change 24067
Comment 43 Michael Herger 2008-11-25 01:36:19 UTC
Back to Steven for verification - thanks!
Comment 44 James Richardson 2008-11-25 07:51:15 UTC
Created attachment 4338 [details]
Ugly Message Box

SqueezeCenter-7.3-24069 now has this message pop up when the install is done.

Still prompts with the warning box at boot/login
Comment 45 Dave Nanian 2008-11-25 07:56:43 UTC
That's weird, because I didn't change anything that would do that. I just changed the one line that does the actual copy (replacing it with about four).

Please try the following. Remove the existing preference pane (stop it, don't turn off autologin, Ctrl+click in System Preferences). In Terminal, run the following:

sudo ditto -noqtn <source .prefPane> <destination PreferencePanes folder with following slash>

Do you get diagnostics? Warning when started?
Comment 46 Michael Herger 2008-11-25 08:15:34 UTC
oops... typo: use "-noqtn" instead of "--noqtn"

change 24080
Comment 47 Michael Herger 2008-11-25 08:16:26 UTC
I meant to say we need to use two dashes
Comment 48 Dave Nanian 2008-11-25 08:18:51 UTC
Ack, correct. Sorry about that: my fault.
Comment 49 Michael Herger 2008-11-25 08:23:14 UTC
np - I only tested on my 10.4 machine... :-/
Comment 50 Spies Steven 2008-11-25 09:50:58 UTC
I no longer see the warning dialog after install, yea!

However the web wizard is not launching nor is the prefrence pane opening after a clean install.  The server is started though.  I will open a separate bug and close this one for now.
Comment 51 James Richardson 2008-12-15 12:09:25 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 52 Chris Owens 2009-07-31 10:31:39 UTC
Reduce number of active targets for SC