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

Can't initialize plugin, ENOENT error #1

Closed
LioLynf opened this issue Oct 29, 2023 · 9 comments
Closed

Can't initialize plugin, ENOENT error #1

LioLynf opened this issue Oct 29, 2023 · 9 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@LioLynf
Copy link

LioLynf commented Oct 29, 2023

Hi !
Thanks for your plugin.
Installed in my instance, but Homebridge can't initialize it.
Here's the Homebridge console logs :

[10/29/2023, 10:58:48 AM] [Apple TV Enhanced] Launched child bridge with PID 8511
[10/29/2023, 10:58:48 AM] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[10/29/2023, 10:58:48 AM] [Apple TV Enhanced] Loaded homebridge-appletv-enhanced v0.2.1-beta.3 child bridge successfully
[10/29/2023, 10:58:48 AM] [Apple TV Enhanced] Finished initializing platform: Apple TV Enhanced
[10/29/2023, 10:58:48 AM] [Apple TV Enhanced] Python checkup: Starting python checkup.
[10/29/2023, 10:58:48 AM] Homebridge v1.6.1 (HAP v0.11.1) (Apple TV Enhanced) is running on port 54962.
Error: spawn /var/lib/homebridge/appletv-enhanced/.venv/bin/pip3 ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[10/29/2023, 10:58:48 AM] [Apple TV Enhanced] Child bridge process ended
[10/29/2023, 10:58:48 AM] [Apple TV Enhanced] Process Ended. Code: 1, Signal: null

Reinstalling and updating python and pip don't seems to help.
Any idea ?
Thanks a lot !

@maxileith
Copy link
Owner

maxileith commented Oct 29, 2023

Hi @LioLynf ,

I am happy to see that the plugin is already getting some downloads although it is pretty new. Keep in mind that this plugin is still in the beta phase. I still need to add system requirements to the README.

Could you activate debug logging and send the logs again? Which system are you running? Linux? Which distro?

You are most likely missing the venv Python module.

Debian distros: apt install python3-venv
More general: python3 -m pip install --user virtualenv

... I still need to automate that

Looking forward to your reply :)
Maxi

@LioLynf
Copy link
Author

LioLynf commented Oct 29, 2023

Was looking for a way to improve controll of the Apple Tv ! Found yours and screenshots looks cool :)

Running on Synology DS220+, oznu/homebridge Docker image

Tried to reinstall venv with your command : still ENOENT error.

/var/lib/homebridge/appletv-enhanced/.venv/bin only contain 'python' and 'python3' ?

Here's log !

Thank you !

s6-rc: info: service legacy-services successfully started
[10/29/2023, 1:55:35 PM] [HB Supervisor] Homebridge Storage Path: /var/lib/homebridge
[10/29/2023, 1:55:35 PM] [HB Supervisor] Homebridge Config Path: /var/lib/homebridge/config.json
[10/29/2023, 1:55:35 PM] [HB Supervisor] Logging to /var/lib/homebridge/homebridge.log
[10/29/2023, 1:55:35 PM] [HB Supervisor] OS: Linux 4.4.302+ x64
[10/29/2023, 1:55:35 PM] [HB Supervisor] Node.js v20.9.0 /opt/homebridge/bin/node
[10/29/2023, 1:55:35 PM] [HB Supervisor] Homebridge Path: /var/lib/homebridge/node_modules/homebridge/bin/homebridge
[10/29/2023, 1:55:35 PM] [HB Supervisor] UI Path: /opt/homebridge/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[10/29/2023, 1:55:36 PM] [Homebridge UI] Homebridge Config UI X v4.51.2 is listening on :: port 8581
[10/29/2023, 1:55:37 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[10/29/2023, 1:55:37 PM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 144
[10/29/2023, 1:55:37 PM] Loaded config.json with 2 accessories and 5 platforms.
[10/29/2023, 1:55:37 PM] Loaded 11 cached accessories from cachedAccessories.
[10/29/2023, 1:55:37 PM] ---
[10/29/2023, 1:55:37 PM] Loaded plugin: [email protected]
[10/29/2023, 1:55:37 PM] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Initializing AppleTVEnhanced platform...
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Initializing child bridge
[10/29/2023, 1:55:38 PM] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge EEB6) is running on port 51123.
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Launched child bridge with PID 156
[10/29/2023, 1:55:38 PM] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Loaded homebridge-appletv-enhanced v0.2.1-beta.3 child bridge successfully
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Finished initializing platform: Apple TV Enhanced
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Python checkup: Starting python checkup.
[10/29/2023, 1:55:38 PM] Homebridge v1.6.1 (HAP v0.11.1) (Apple TV Enhanced) is running on port 54962.
Error: spawn /var/lib/homebridge/appletv-enhanced/.venv/bin/pip3 ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Child bridge process ended
[10/29/2023, 1:55:38 PM] [Apple TV Enhanced] Process Ended. Code: 1, Signal: null
[10/29/2023, 1:55:43 PM] [Homebridge UI] Starting terminal session
[10/29/2023, 1:55:45 PM] [Apple TV Enhanced] Restarting Process...
[10/29/2023, 1:55:46 PM] [Apple TV Enhanced] Launched child bridge with PID 665
[10/29/2023, 1:55:46 PM] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[10/29/2023, 1:55:46 PM] [Apple TV Enhanced] Loaded homebridge-appletv-enhanced v0.2.1-beta.3 child bridge successfully
[10/29/2023, 1:55:46 PM] [Apple TV Enhanced] Finished initializing platform: Apple TV Enhanced
[10/29/2023, 1:55:46 PM] [Apple TV Enhanced] Python checkup: Starting python checkup.
[10/29/2023, 1:55:46 PM] Homebridge v1.6.1 (HAP v0.11.1) (Apple TV Enhanced) is running on port 54962.
Error: spawn /var/lib/homebridge/appletv-enhanced/.venv/bin/pip3 ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
[10/29/2023, 1:55:46 PM] [Apple TV Enhanced] Child bridge process ended
[10/29/2023, 1:55:46 PM] [Apple TV Enhanced] Process Ended. Code: 1, Signal: null

@Shukuyen
Copy link

Hey Maxi, thanks for the awesome looking plugin! I have the same issue on Raspberry Pi 4 with Homebridge running in a docker container. Installed python3-venv, but that didn't help.

Debug log:

[10/29/2023, 2:55:29 PM] Loaded plugin: [email protected]
[10/29/2023, 2:55:29 PM] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[ ... ]
[10/29/2023, 2:55:30 PM] [Apple TV Enhanced] Initializing AppleTVEnhanced platform...
[10/29/2023, 2:55:30 PM] [Apple TV Enhanced] Finished initializing platform: Apple TV Enhanced
[10/29/2023, 2:55:30 PM] [Apple TV Enhanced] Platform: Executed didFinishLaunching callback
[10/29/2023, 2:55:30 PM] [Apple TV Enhanced] Python checkup: Starting python checkup.
[10/29/2023, 2:55:30 PM] [Apple TV Enhanced] Python checkup: plugin dir exists.
[10/29/2023, 2:55:30 PM] [Apple TV Enhanced] Python checkup: Virtual environment already exists.
[ ... ]                    
[10/29/2023, 2:55:31 PM] Error: spawn /var/lib/homebridge/appletv-enhanced/.venv/bin/pip3 ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[10/29/2023, 2:55:31 PM] Got SIGTERM, shutting down Homebridge...

@maxileith
Copy link
Owner

maxileith commented Oct 29, 2023

@Shukuyen my logic to identify if the venv is already created is not that polished yet, probably the folder for the venv was already created but the venv was not initialzied, because the python3-venv module was missing when you initially started the plugin. Try rm /var/lib/homebridge/appletv-enhanced -R and restart the plugin.

This shouldn't be an issue with the next beta release v0.2.1-beta.4 anymore

@LioLynf same should apply for you.

@maxileith
Copy link
Owner

I just published v0.2.1-beta.4. Please install @LioLynf, @Shukuyen and try again. The logs should be clearer with this version.

@LioLynf
Copy link
Author

LioLynf commented Oct 29, 2023

Your update solved !
Python and environnement were automatically created by your plugin.
Pairing asked
Added to my Home
And working !
That's so cool to get all Apple TV's apps in the Home app !

Thanks a lot for your plugin ! That's awesome and meet my needs. :)

@LioLynf LioLynf closed this as completed Oct 29, 2023
@Shukuyen
Copy link

Can confirm, that solved the issue! Now I just have to figure out why the devices are not added to Apple home after pairing.

@LioLynf
Copy link
Author

LioLynf commented Oct 29, 2023 via email

@maxileith
Copy link
Owner

maxileith commented Oct 29, 2023

@Shukuyen Television devices need to be published as external accessories. So @LioLynf is right, you need to add it to Home seperatly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants