outset icon indicating copy to clipboard operation
outset copied to clipboard

Outset not creating the com.github.outset.once.plist file in ~/Library/Preferences

Open cnelson644 opened this issue 3 years ago • 16 comments

I have a script that sets user docks initially for each user on a mac. I want it to only run once per user. So I place it in /usr/local/outset/login-once. I noticed recently that the scripts have been running every time the same user logins. After some research, it seems that outset has not been creating the com.github.outset.once.plist file in ~/Library/Preferences.

Could it be a permissions issue? I have the permissions set to root:wheel 755 but I also tried root:admin 755 and it didn't seem to create that once file.

I am running outset 3.0.1 on macOS Catalina 10.15.7. I have Python3 installed as well.

cnelson644 avatar Feb 02 '21 16:02 cnelson644

Did you figure out the issue? I'm running into the same. Even running the package manually will result in it not creating the plist.

prdgalex avatar Feb 08 '21 20:02 prdgalex

Adding a comment here in case you're not in the MacAdmins Slack #outset channel. I was able to figure this out, originally created my custom Outset package with the latest release 3.0.3 but was pushing the default Outset release 3.0.1. As soon as I uploaded the default release to 3.0.3 that plist appeared.

prdgalex avatar Feb 09 '21 00:02 prdgalex

@prdgalex Where did you find the 3.0.3 release? I only see the latest release as 3.0.1

cnelson644 avatar Feb 09 '21 14:02 cnelson644

Go to the latest releases page here: https://github.com/chilcote/outset/releases. Once there expand Assets and you'll see the outset-3.0.3.pkg.

prdgalex avatar Feb 09 '21 17:02 prdgalex

I suspect what's happening is either the script is crashing, or something is causing it to time out so that it never gets to the point where the plist would be populated. Anything of interest in the logs? I just tried on a fresh setup and can't replicate this.

chilcote avatar Feb 24 '21 07:02 chilcote

Thanks @prdgalex for that. I did get 3.0.3 installed. I am still not getting that plist created, so my script still runs every login. What logs are you speaking of? /var/log/outset.log doesn't have anything of interest. Is there another one some where?

cnelson644 avatar Feb 24 '21 20:02 cnelson644

https://github.com/chilcote/outset/wiki#logging

chilcote avatar Feb 24 '21 20:02 chilcote

The only thing that ~/Library/Logs/outset.log has in it is it says it processed the script. But still the PLIST did not get created in ~/Library/Preferences. Am I missing something?

cnelson644 avatar Feb 24 '21 20:02 cnelson644

My guess is that outset itself is exiting before it gets to this point https://github.com/chilcote/outset/blob/master/pkgroot/usr/local/outset/outset#L363-L365

Try editing that locally (/usr/local/outset/outset) and add a log line just above that, see if that gets logged.

logging.info("This log is supposed to happen")

chilcote avatar Feb 24 '21 20:02 chilcote

and maybe pass the value for d as well, to make sure it's not empty.

logging.info("This is what is supposed to be populated in the plist: %s", d)

chilcote avatar Feb 24 '21 21:02 chilcote

I'm sorry, I don't really know python very well. Just type logging.info("This is what is supposed to be populated in the plist: %s", d) right above that line of code in /usr/local/outset/outset?

cnelson644 avatar Feb 24 '21 21:02 cnelson644

Sorry, yeah, right here, and indented (spaces) the same as "if d:" https://github.com/chilcote/outset/blob/master/pkgroot/usr/local/outset/outset#L362

chilcote avatar Feb 24 '21 21:02 chilcote

So I wiped my test box and just installed python3 and outset 3.0.3. But I had to install python from the prompt when I logged in. After that, it worked as it should. Before I downloaded python from https://www.python.org/downloads/. Did I download the wrong one? What's the difference between that one from python and the one you download using terminal?

cnelson644 avatar Feb 26 '21 18:02 cnelson644

I'm not entirely sure what you mean by the "one you download using terminal," but I assume that means installing the Command Line Tools, I.e apple's python. It's possible that the python from python.org will have different behaviors I suppose.

chilcote avatar Feb 26 '21 20:02 chilcote

So what is the proper manner in which to get python on the machine, in your opinion? I have been downloading python from python.org and installing it before outset. I am over the macs in classrooms and labs for our organization and I need to be able to replicate this.

cnelson644 avatar Mar 01 '21 15:03 cnelson644

It seems to be working now. I must have done something weird when I was testing. I really appreciate your help @chilcote.

cnelson644 avatar Mar 02 '21 16:03 cnelson644