andreasgrill / auto-selfcontrol

Small utility to schedule start and stop times of SelfControl
MIT License
305 stars 37 forks source link

Using your own bundle identifier as an NSUserDefaults suite name does not make sense #33

Open MiaoXiong2320 opened 5 years ago

MiaoXiong2320 commented 5 years ago

Actually I have done all the instructions but when it goes into the end, it turns out to be this line:

Using your own bundle identifier as an NSUserDefaults suite name does not make sense and will not work. Break on _NSUserDefaults_Log_Nonsensical_Suites to find this

I don't know how to solve this problem(☻-☻)

Hawaiii commented 5 years ago

I have the same problem.

adamzerner commented 5 years ago

I have a similar problem.

code/auto-selfcontrol-master » sudo /usr/bin/python auto-selfcontrol.py
> Start installation of Auto-SelfControl
> Removed previous installation files
> Installed

> Active schedule found for SelfControl!
> Start SelfControl (this could take a few minutes)

2018-11-19 10:36:08.907 org.eyebeam.SelfControl[16362:4345103] Using your own bundle identifier as an NSUserDefaults suite name does not make sense and will not work. Break on _NSUserDefaults_Log_Nonsensical_Suites to find this
2018-11-19 10:36:08.926 org.eyebeam.SelfControl[16362:4345111] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
/Library/LaunchDaemons/org.eyebeam.SelfControl.plist: service already loaded
2018-11-19 10:36:09.145 org.eyebeam.SelfControl[16362:4345103] INFO: Block successfully added.
0
> SelfControl was started.

code/auto-selfcontrol-master »

It says "SelfControl was started.", but it doesn't actually start.

I'm also having more general problems with SelfControl not starting when it should be. I've tried to pinpoint the steps that replicate the issue, but haven't been able to do so. My config.json is below. I am trying to have an internet window of 5:00pm to 5:30pm every day except Sunday, and have that window be 8:00am to 7:00pm on Sunday. Eg. Today is Monday. I opened my laptop a little bit before 10:30am, and SelfControl hadn't been started. But there have been other times when I open my laptop and it had been started.

{
    "username": "adamzerner",
    "selfcontrol-path": "/Applications/SelfControl.app",
    "host-blacklist": [
        "dsfsdfsd.com"
    ],
    "block-schedules": [{
            "weekday": 1,
            "start-hour": 0,
            "start-minute": 0,
            "end-hour": 17,
            "end-minute": 0,
            "block-as-whitelist": true
        },
        {
            "weekday": 1,
            "start-hour": 17,
            "start-minute": 30,
            "end-hour": 23,
            "end-minute": 59,
            "block-as-whitelist": true
        },
        {
            "weekday": 2,
            "start-hour": 0,
            "start-minute": 0,
            "end-hour": 17,
            "end-minute": 0,
            "block-as-whitelist": true
        },
        {
            "weekday": 2,
            "start-hour": 17,
            "start-minute": 30,
            "end-hour": 23,
            "end-minute": 59,
            "block-as-whitelist": true
        },
        {
            "weekday": 3,
            "start-hour": 0,
            "start-minute": 0,
            "end-hour": 17,
            "end-minute": 0,
            "block-as-whitelist": true
        },
        {
            "weekday": 3,
            "start-hour": 17,
            "start-minute": 30,
            "end-hour": 23,
            "end-minute": 59,
            "block-as-whitelist": true
        },
        {
            "weekday": 4,
            "start-hour": 0,
            "start-minute": 0,
            "end-hour": 17,
            "end-minute": 0,
            "block-as-whitelist": true
        },
        {
            "weekday": 4,
            "start-hour": 17,
            "start-minute": 30,
            "end-hour": 23,
            "end-minute": 59,
            "block-as-whitelist": true
        },
        {
            "weekday": 5,
            "start-hour": 0,
            "start-minute": 0,
            "end-hour": 17,
            "end-minute": 0,
            "block-as-whitelist": true
        },
        {
            "weekday": 5,
            "start-hour": 17,
            "start-minute": 30,
            "end-hour": 23,
            "end-minute": 59,
            "block-as-whitelist": true
        },
        {
            "weekday": 6,
            "start-hour": 0,
            "start-minute": 0,
            "end-hour": 17,
            "end-minute": 0,
            "block-as-whitelist": true
        },
        {
            "weekday": 6,
            "start-hour": 17,
            "start-minute": 30,
            "end-hour": 23,
            "end-minute": 59,
            "block-as-whitelist": true
        },
        {
            "weekday": 7,
            "start-hour": 0,
            "start-minute": 0,
            "end-hour": 8,
            "end-minute": 0,
            "block-as-whitelist": true
        },
        {
            "weekday": 7,
            "start-hour": 19,
            "start-minute": 0,
            "end-hour": 23,
            "end-minute": 59,
            "block-as-whitelist": true
        }
    ]
}