Closed EyadElshaer closed 3 months ago
Yeah for me it only works if i manually run it in the terminal
Yeah for me it only works if i manually run it in the terminal
For me it doesn't work even if I run it in the terminal
Are you launching it from brew or path?
Are you launching it from brew or path?
How can I know ?
What do you type into the terminal to run it in terminal? Did you install with homebrew?
What do you type into the terminal to run it in terminal? Did you install with homebrew?
I downloaded homebrew and used the terminal to run it
That didn't really answer but I'm assuming you didnt do anything besides copying the install command. Type:
music-rpc.ts
into the terminal and it should run for you
What do you type into the terminal to run it in terminal? Did you install with homebrew?
I typed what was shown in the installation commands
I've tried installing manually and with brew in every way I could on multiple macs, tried upgrading deno, no luck whatsoever. Are we supposed to create an application in the discord dev portal? Or is it possibly and issue with the change in Discord username discriminators?
I've tried installing manually and with brew in every way I could on multiple macs, tried upgrading deno, no luck whatsoever.
Are we supposed to create an application in the discord dev portal? Or is it possibly and issue with the change in Discord username discriminators?
Have you tried launching the application manually the way I mentioned above. It works, I think the problem is the automatic script to have it launch on startup. Probably broken by macOS at some point.
@EyadElshaer If you installed it with Homebrew, check that the script is running fine on a manual run with music-rpc.ts
in the terminal as @NathanielH-snek suggested.
@allycatty The script should run as it is and works fine with the new username system.
If you encounter some issues with the launch agent, try the troubleshooting steps in https://github.com/NextFire/apple-music-discord-rpc/issues/51. If it is not working at all, please ensure that activity sharing is well enabled in your Discord client settings.
I'm running into the same problem. I went through the troubleshooting steps here and in #51 ...
manually running music-rpc.ts
from the terminal works and activity sharing is turned on in Discord.
brew services
output
Name Status User File
apple-music-discord-rpc error 19968 michael ~/Library/LaunchAgents/homebrew.mxcl.apple-music-discord-rpc.plist
brew services info apple-music-discord-rpc
outputbrew services info apple-music-discord-rpc
apple-music-discord-rpc (homebrew.mxcl.apple-music-discord-rpc)
Running: ✘
Loaded: ✔
Schedulable: ✘
brew services start apple-music-discord-rpc
outputbrew services start apple-music-discord-rpc
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/michael/Library/LaunchAgents/homebrew.mxcl.apple-music-discord-rpc.plist` exited with 5.
-rw-r--r-- 1 michael staff 953 Jun 13 11:59 homebrew.mxcl.apple-music-discord-rpc.plist
@mjcarvin Do you happen to use an Apple Silicon Mac?
No, Intel MBP - skylake from 2016.
I've updated the formula which previously had a linting issue https://github.com/NextFire/homebrew-tap/commit/093eb083a746c0e1ffae232f6ddb079341df7db2.
I am not sure that it will resolve this issue but can you brew update && brew reinstall nextfire/tap/apple-music-discord-rpc && brew services restart nextfire/tap/apple-music-discord-rpc
and check brew services info apple-music-discord-rpc
again?
I do run an AS mac and I'm having the same issue although I haven't spent a lot of time troubleshooting. I'll see if I can figure it out later.
I've updated the formula which previously had a linting issue https://github.com/NextFire/homebrew-tap/commit/093eb083a746c0e1ffae232f6ddb079341df7db2. I am not sure that it will resolve this issue but can you brew update && brew reinstall nextfire/tap/apple-music-discord-rpc && brew services restart nextfire/tap/apple-music-discord-rpc and check brew services info apple-music-discord-rpc again?
brew services info apple-music-discord-rpc
apple-music-discord-rpc (homebrew.mxcl.apple-music-discord-rpc)
Running: ✘
Loaded: ✔
Schedulable: ✘
brew services
Name Status User File
apple-music-discord-rpc error 19968 michael ~/Library/LaunchAgents/homebrew.mxcl.apple-music-discord-rpc.plist
sleepwatcher started michael ~/Library/LaunchAgents/homebrew.mxcl.sleepwatcher.plist
@mjcarvin Can you paste the content of the generated launch agent?
{
EnvironmentVariables = {
PATH = "/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin";
};
KeepAlive = YES;
Label = "homebrew.mxcl.apple-music-discord-rpc";
"LimitLoadToSessionType" = (
Aqua,
Background,
LoginWindow,
StandardIO,
System,
);
ProgramArguments = (
"/usr/local/opt/apple-music-discord-rpc/bin/music-rpc.ts",
);
RunAtLoad = YES;
StandardErrorPath = "/Users/michael/music-rpc.log";
WorkingDirectory = "/usr/local/var/apple-music-discord-rpc";
}
That PATH
looks really short compared to echo $PATH
/Users/michael/.gem/bin:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/michael/Development/flutter/bin:/usr/local/opt/:/Users/michael/Library/Android/sdk/platform-tools:/Users/michael/Library/Android/sdk/tools:/Users/michael/Library/Android/sdk/tools/bin:/Users/michael/Library/Android/sdk/emulator
Is it the raw content of your .plist? Should have been some XML.
The PATH
is fine if it contains at least osascript
and deno
(check with which
).
Then if both /usr/local/opt/apple-music-discord-rpc/bin/music-rpc.ts
and /usr/local/var/apple-music-discord-rpc
exist, I don't see any reason for it not working... :/
(The music-rpc.log
should have been located in /usr/local/var/apple-music-discord-rpc
, not in the home root, I'll fix that at least...)
That was the raw content. Here's the xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.apple-music-discord-rpc</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>Background</string>
<string>LoginWindow</string>
<string>StandardIO</string>
<string>System</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/apple-music-discord-rpc/bin/music-rpc.ts</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/Users/michael/music-rpc.log</string>
<key>WorkingDirectory</key>
<string>/usr/local/var/apple-music-discord-rpc</string>
</dict>
</plist>
which osascript
and which deno
return good paths, so that's fine.
music-rpc.ts is in /usr/local/opt/apple-music-discord-rpc/bin/
and running it manually from my home root works fine.
This is not right on my end
from the xml
<key>WorkingDirectory</key>
<string>/usr/local/var/apple-music-discord-rpc</string>
ls -la /usr/local/var
total 0
drwxrwxr-x 4 michael admin 128 May 20 14:22 .
drwxr-xr-x 14 root wheel 448 May 20 14:02 ..
drwxrwxr-x 4 michael admin 128 May 20 14:10 homebrew
drwxr-xr-x 3 michael admin 96 May 20 14:22 run
/usr/local/var/apple-music-discord-rpc
is automatically created when the service starts (re-checked on my side) so no problem here
I guess I'm out of answer, there may be a bug in homebrew/services
.
As a last resort can you try the shell scripts install method in the README? You may have better luck here...
/usr/local/var/apple-music-discord-rpc
is automatically created when the service starts (re-checked on my side) so no problem here
Huh. I don't see it in my /usr/local/var folder.
As a last resort can you try the shell scripts install method in the README? You may have better luck here...
I just did and it started right up when I ran the install script.
Thanks for making the time to help diagnose this. I really appreciate it.
Huh. I don't see it in my /usr/local/var folder.
Yeah somehow Homebrew couldn't even start its generated launch agent...
I just did and it started right up when I ran the install script.
Perfect!
Thanks for making the time to help diagnose this. I really appreciate it.
You're welcome! Thank you for your quick replies.
when I play any music on the Apple Music app on the MacBook it doesn't show up on discord I tried restarting the Mac but nothing helped