Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Status 78 when running as MacOS launchctl service #2796

Open
3 tasks done
jordaniac89 opened this issue Jan 18, 2024 · 2 comments
Open
3 tasks done

[Bug]: Status 78 when running as MacOS launchctl service #2796

jordaniac89 opened this issue Jan 18, 2024 · 2 comments
Labels
bug triage New bug reports that need to be evaluated

Comments

@jordaniac89
Copy link

I confirm that:

  • I have searched the existing open AND closed issues to see if an issue already exists for the bug I've encountered
  • I'm using the latest version (your issue may have been fixed already)

Version

v0.50.2

Current Behavior

When trying to run navidrome as a launchctl service, I receive a status code of 78. I get a launch log of

2024-01-17 21:56:29.449940 <Error> Service could not initialize: posix_spawn(/Users/jordanmiles/Documents/navidrome/navidrome), error 0x1 - Operation not permitted 2024-01-17 21:56:29.449950 <Error> initialization failure: 22G120: xpcproxy + 22544 [1097][D177A08D-D99B-3FFD-94E9-90882559A169]: 0x1

When I run the command outside of launchctl, it runs fine.

Expected Behavior

navidrome starts up correctly when running as a service

Steps To Reproduce

I'm using the standard plist file from the documentation. I've confirmed that the executable and the log files have wide open permissions for rwx. As mentioned, when I run the navidrome command from the command line, it works fine.

plist file below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>navidrome</string>
        <key>ProgramArguments</key>
        <array>
            <string>/Users/jordanmiles/Documents/navidrome/navidrome</string>
            <string>-c</string>
            <string>/Users/jordanmiles/Documents/navidrome/navidrome.toml</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StandardOutPath</key>
        <string>/Users/jordanmiles/Documents/navidrome/navidrome.log</string>
        <key>StandardErrorPath</key>
        <string>/Users/jordanmiles/Documents/navidrome/navidrome.log</string>
    </dict>
</plist>

Environment

- OS: MacOS Ventura 13.6
- Browser:
- Client:

How Navidrome is installed?

Binary (from downloads page)

Configuration

LogLevel = 'DEBUG'
ScanSchedule = '@every 24h'
TranscodingCacheSize = '150MiB'
MusicFolder = '/Users/jordanmiles/Documents/music'
DataFolder = '/Users/jordanmiles/Documents/nd_data'

Relevant log output

2024-01-17 21:56:29.443828 <Notice> internal event: WILL_SPAWN, code = 0
2024-01-17 21:56:29.443851 <Notice> service state: spawn scheduled
2024-01-17 21:56:29.443853 <Notice> service state: spawning
2024-01-17 21:56:29.443869 <Notice> launching: one-shot
2024-01-17 21:56:29.444314 <Notice> xpcproxy spawned with pid 72633
2024-01-17 21:56:29.444333 <Notice> internal event: SPAWNED, code = 0
2024-01-17 21:56:29.444335 <Notice> service state: xpcproxy
2024-01-17 21:56:29.444364 <Notice> internal event: SOURCE_ATTACH, code = 0
2024-01-17 21:56:29.449940 <Error> Service could not initialize: posix_spawn(/Users/jordanmiles/Documents/navidrome/navidrome), error 0x1 - Operation not permitted
2024-01-17 21:56:29.449950 <Error> initialization failure: 22G120: xpcproxy + 22544 [1097][D177A08D-D99B-3FFD-94E9-90882559A169]: 0x1
2024-01-17 21:56:29.449952 <Notice> internal event: INIT, code = 1
2024-01-17 21:56:29.450291 <Notice> xpcproxy exited due to exit(78)
2024-01-17 21:56:29.450299 <Notice> exited due to exit(78)
2024-01-17 21:56:29.450301 <Notice> already handled failed init, ignoring
2024-01-17 21:56:29.450303 <Notice> service state: exited
2024-01-17 21:56:29.450314 <Notice> internal event: EXITED, code = 0
2024-01-17 21:56:29.450316 <Notice> service inactive: navidrome
2024-01-17 21:56:29.450319 <Notice> service state: not running

Anything else?

No response

Code of Conduct

  • I agree to follow Navidrome's Code of Conduct
@jordaniac89 jordaniac89 added bug triage New bug reports that need to be evaluated labels Jan 18, 2024
@jordaniac89
Copy link
Author

I've also given full disk access to the executable, launchctl, sh, bash, and zsh. Looking at it closer, it's probably an issue with MacOS itself and not navidrome, but let me know if anything stands out.

@ghost
Copy link

ghost commented May 18, 2024

I found this https://stackoverflow.com/questions/58442951/how-to-fix-operation-not-permitted-when-i-use-launchctl-in-macos-catalina But it sounds like you've already taken that into account. How about the Terminal? You didn't say that the Terminal has full disk access...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage New bug reports that need to be evaluated
Projects
None yet
Development

No branches or pull requests

1 participant