dkordik / nowplaying

Simple Node.js event emitter for iTunes/Spotify playing/paused events
12 stars 0 forks source link

OSX: no events are fired when node is running on startup as launchDeamond #1

Open 0i0 opened 7 years ago

0i0 commented 7 years ago

Hi there, great tool you have there. when im running it normally events are fired as described and everyone is happy. but when i set the node to run at start as a launch deamon no events are fired. i set up a little setup to recreate the scenario here you can run the load...sh script to setup the deamon reboot for it to take effect and than watch the output on /tmp/node-nowplaying-startup-test.out the set up is running with --inspect so you can look in devtools and see events aren't being triggered any help would be much appriciated

dkordik commented 7 years ago

Hey there- Thanks! I won't be at a computer for a few days, but on the surface it sounds like some sort of user boundary issue. When you run it on launch, I'm thinking it's not running as the same user you run iTunes/Spotify from, so you can't see Distributed Notification events sent by your normal user.

0i0 commented 7 years ago

Hooray for the quick reply. I updated the deamon to run as the user adding

    <key>UserName</key>
    <string>user</string>

to the plist but still no luck any other ideas? also updated the test scenario