Mac app issues

  • administrators

    @pico, thank you for the DMG Canvas tip. That definitely seems like the way to go.

    The log is here: ~/.TRIGGERcmdData/debug.log

    I'd be interested if you see something in there when it fails to start during login.

  • administrators

    @Pico, I published a new version of the agent that uses a DMG installer. It works nice. I'm glad you encouraged me to do that.

    I ended up using this because it's free and it does the job:

    This is what it looks like:
    TRIGGERcmd Mac Agent

  • administrators

    @Pico, I published a new version just now that added a Login Item so it starts up automatically when you login.

  • @russ Awesome and awesome!

    Great that you found a free DMG maker, I'll have to check that one out myself!

    Sorry I've been busy and hadn't checked back on this thread sooner. I'll check out this new version tomorrow.

    Earlier, I did quickly check the log you pointed me to and didn't see anything relevant. Only stuff about messages received etc. Nothing about any failures or crashes. But I wanted to dig deeper before getting back and just haven't had time yet.

  • administrators

    @pico, about that, figured out how to reproduce the problem. If I download the agent from the Internet, then run it, the first time it runs, it hangs and I have to force-quit it.

    I actually implemented the LSUIElement change you suggested (which worked great btw), but I had to undo it because you can't force-quit an application if it doesn't have a dock icon. I had to kill the pid from a terminal shell.

    I'm still working on fixing that first launch after downloading from the internet issue.

    EDIT: I fixed the first launch issue. Thanks for all your suggestions @pico!

  • Just a flyby 2c: I think Mac users are in general familiar enough with command shell, ps and kill (you kind of have to be if you have a mac), so as a tradeoff, fixing the two big bugs is worth the inconvenience, particularly since force-killing TC isn't something I've ever needed to do.

  • administrators

    @dewi-morgan, these problems are fixed now in the latest version. Let me know if find out they're not fixed.

  • This is great! Sorry I didn't get back sooner, I didn't have email notifications turned on and I hadn't checked back on this post until today. But, I just turned on email notifications for new posts so I'll see this stuff sooner from now on :-)

    I just installed the latest version and it launched just fine on first run after download.

    I wanted to be sure everything worked properly for new users so I deleted the app and all the trigger command config files to see a true first run with the token prompt and all... It worked perfectly!

    I did find a new interesting bug though...

    When I quit the app with the "GUI Command Editor" window open, the window is closed but the app doesn't quit. All attempts to quit the app after that don't work as well.

    I had to Force Quit the app. As an aside, you can Force Quit headless apps through the GUI with the Activity Monitor app. In Activity Monitor you can select the app and then click the "Stop Sign with an X" icon in the toolbar and there is a button to Force Quit. Also, from the command line, you can use "killall TRIGGERcmdAgent" so that you don't have to fuss with finding the PID. But I find sometime I have to run "killall" multiple times to make it work.

    With more testing, this seems to also happen if I open the "GUI Command Editor" and then close it manually and then try to quit... the app still doesn't quit.

    I found that this doesn't appear to be an issue if the "Text Command Editor" window has been opened or if no windows have been opened. In those cases the app quits properly.

  • Just noticed that when I trashed the app and re-installed it, the app added itself to the Login Items multiple times.

  • administrators

    @pico, is it possible you have two Login items because you added one, and the app added another one? I tried and I wasn't able to re-produce the problem.

  • @russ I was just able to reproduce it again doing the following steps...

    1. Remove TRIGGERcmdAgent from Login Items

    2. Launch TRIGGERcmdAgent (which adds itself to the login items).

    3. Trash TRIGGERcmdAgent (but the references stays in Login Items).

    4. Reinstall TRIGGERcmdAgent from .dmg and launch it.

    In the end, I have two references to TRIGGERcmdAgent in my Login Items.

    Shouldn't it not matter how TRIGGERcmdAgent was originally added to the Login Items though? The app should just check whether or not it is already in there no matter what.

    Is there different code for adding itself to Login Items on first run vs other launches? Cuz the app doesn't keep adding itself to Login Items on every launch.

  • administrators

    @pico, I was able to reproduce it this time. I'll fix it soon. Thank you for telling me.

    I published a new version. I made it so it only adds a Login item the second time you run it. That should avoid the duplicate.

    The downside is now you don't get a Login item the first time you run it.

    For some reason the first time you run it after downloading, it can't determine whether there's already a Login item, so added one anyway. All I could think of was to disable adding one if it's the first time running after downloading.

Log in to reply

Looks like your connection to TRIGGERcmd Forum was lost, please wait while we try to reconnect.