-
Notifications
You must be signed in to change notification settings - Fork 7
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
ENOENT error on startup #1
Comments
Did you install PyATV using sudo? |
Tried that already, while it runs I get a long error thrown that it can’t compile cryptography despite I installed Rust as recommended. |
Yeah I had that too. Can't remember exactly what fixed it but I thought it was installing rust... What is the exact error installing cryptography? |
So here is what I did:
Checking if Rust is installed: rustc --version -> rustc 1.67.1 (d5a82bbd2 2023-02-07)
Result attached in the text file |
I have the exact same error. Plugin throws ENOENT on startup. I run Homebridge on a raspberry pi 4. I used the built in terminal of Homebridge and installed all prerequisites including obtaining the credentials for the Apple TV. All worked perfectly. I added the IP address and credentials to the plugin. When I restarted Homebridge, I get the same ENOENT error. |
Same error here. I got pyatv installed and paired, so I got a credentials string. But on startup of Homebridge, the plugin just repeatedly throws the same error. I had to manually clean out my config.json to get it to stop. Oh, this is on a RaspberryPi running the official RPi Homebridge image. |
Here is exactly what Homebridge log shows on startup of this plugin. Seems it can’t find something: |
Note that it will repeatedly show the above error endlessly. |
It appears something is wrong with atvscript... can you guys try running atvscript manually? I don't think there is a version command but just to see if it is accessible from root |
Is everyone that is having this problem running it as a child bridge? |
Exact same error, whether in bridge mode or not. If it is not in bridge mode, Homebridge itself keeps restarting over and over again with the exact same error. If it is in bridge mode, then only that bridge restarts over and over again. |
Yes, I am able to run atvscript manually. |
If I SSH into the raspberry pi that is running Home Ridge, I can run atvscript. However, if I use the terminal from within home bridge, it cannot find atvscript and errors out. |
I think this is the issue. It seems like PyATV is installed locally in your ssh users directory rather than in root for all to access. Installing it using sudo should fix this |
I just tried the following: took a fresh SD Card with a core Bullseye OS on it. Updated everything, installed the required dependencies and python, no homebridge. Installed the Rust toolchain as sudo. Then tried to install pyatv again first with So question is, how do I give root access to the Rust compiler? |
Ok, I have a solution. For homebridge to access it, we need to install pyatv as sudo. But that means sudo needs access to the rust compiler. So here’s what I did:
|
To be honest, I don’t know if that’s the BEST way to get rust working for sudo. But it did work. |
who cares, you're a genius. At least the plugin is now starting up. I got it working in HomeKit somewhat too. Iust have some weird stuff going on in HomeKit. The switch for waking up the ATV is turning itself off shortly after using it. If I then turn it on again it stays on. Maybe some timeout problem, also I am already on the new HomeKit architecture. And the idle sensor is not triggered after waking up the Apple TV. |
can you show what your secure_path variable looks like? |
Here’s mine secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/pi/.cargo/bin" |
Just want to add onto this (thanks for the write up @joelwetzel !) for those of us that are new to some of these steps
And then the plug-in worked! |
Your solution worked! Thank you. |
FWIW, after having installing it without |
Got the same error. Running pyatv as container on a Synology NAS. Not sure how to solve this. |
Can anyone walk me through how to fix this on a macOS homebridge? |
Dear all, How do I update rust globally. dsimeone@homebridge:~ $ sudo rustc --version Can anybody help? |
Dear all, This is what I get: dsimeone@homebridge:~ $ sudo rustup update Whereis: It‘s enclosed in in sudo nano /etc/sudoers: I do Not get it. Thanks |
I followed @jianyu-li’s instruction but I’m still getting the error and the plugin crashes Homebridge repeatedly. |
Describe The Bug:
Plugin throws ENOENT on startup, seems it can't find atvscript which is installed under ~/.local/bin and e.g. can be called from the pi users SSH-login prompt.
To Reproduce:
Expected behavior:
Logs:
[19/02/2023, 06:52:04] [@hujohner/homebridge-appletv] Restarting Process...
[19/02/2023, 06:52:06] [@hujohner/homebridge-appletv] Launched child bridge with PID 16780
[19/02/2023, 06:52:06] Registering platform '@hujohner/homebridge-appletv.AppleTV'
[19/02/2023, 06:52:06] [@hujohner/homebridge-appletv] Loaded @hujohner/homebridge-appletv v1.1.0 child bridge successfully
[19/02/2023, 06:52:06] Loaded 1 cached accessories from cachedAccessories.0EBA39873C8C.
[19/02/2023, 06:52:06] [@hujohner/homebridge-appletv] Loading accessory from cache: ATV4K
[19/02/2023, 06:52:06] [@hujohner/homebridge-appletv] Restoring existing accessory from cache: ATV4K
[19/02/2023, 06:52:06] Homebridge v1.6.0 (HAP v0.11.0) (@hujohner/homebridge-appletv) is running on port 53459.
Error: spawn atvscript ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
[19/02/2023, 06:52:06] [@hujohner/homebridge-appletv] Child bridge process ended
[19/02/2023, 06:52:06] [@hujohner/homebridge-appletv] Process Ended. Code: 1, Signal: null
Plugin Config:
Screenshots:
Environment:
The text was updated successfully, but these errors were encountered: