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

Failed to create pcap session #12

Open
jasehigh opened this issue Dec 31, 2016 · 3 comments
Open

Failed to create pcap session #12

jasehigh opened this issue Dec 31, 2016 · 3 comments

Comments

@jasehigh
Copy link

When I run homebridge with the homebridge-amazondash plugin, I get the following error on start-up:

[Error: pcap_findalldevs didn't find any devs]
Failed to create pcap session: couldn't find devices to listen on.
Try running with elevated privileges via 'sudo'
/usr/local/lib/node_modules/homebridge-amazondash/node_modules/node-dash-button/index.js:16
        throw new Error('Error: No devices to listen');
        ^
Error: Error: No devices to listen

I can resolve this by running homebridge with elevated privileges:

sudo homebridge

However, I do not know how to run with sudo (on my mac) and the ~/Library/LaunchAgents script as described here:
https://github.com/nfarina/homebridge/wiki/Install-Homebridge-on-OSX

Any advise on how to auto run home bridge with sudo or to run the homebridge-amazondash without the need for elevated privileges would be much appreciated.

In addition, when homebridge is running with homebridge-amazondash, I get the following messages logged:

node_pcap: EthernetFrame() - Don't know how to decode ethertype 30329

Is this an issue?

many thanks, for your assistance.

Jason.

@jasehigh
Copy link
Author

Moved the com.homebridge.server.plist file...
as described here...https://github.com/nfarina/homebridge/wiki/Install-Homebridge-on-OSX

From: /Users/username/Library/LaunchAgents
To: /Library/LaunchDaemons

I made the following changes to the plist file:

Added:

<key>UserName</key>
<string>root</string>

To run as root.

Changed program to run from:

/usr/local/bin/homebridge -I

To:

/usr/local/bin/homebridge -U /Users/username/.homebridge

To ensure the config.json file is picked up as before.

Instead of the following commands to load/unload homebridge:

launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist
launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist

Use the following commands:

sudo launchctl load -F /Library/LaunchDaemons/com.homebridge.server.plist
sudo launchctl unload -F /Library/LaunchDaemons/com.homebridge.server.plist

I still have the following message logged when homebridge is running with homebridge-amazondash:

node_pcap: EthernetFrame() - Don't know how to decode ethertype 30329

Is this an issue?

Jason.

@amitgandhinz
Copy link

Were you able to solve this issue? I am experience the same error when i press the dash button. The scene does not get triggered and i see the following in the home bridge logs

node_pcap: EthernetFrame() - Don't know how to decode ethertype 35085

@ooii
Copy link

ooii commented Dec 19, 2017

I'm having the same problem, still this message

Failed to create pcap session: couldn't find devices to listen on.
Try running with elevated privileges via 'sudo'
/Users/user/.homebridge/node_modules/node-dash-button/index.js:28
        throw new Error('Error: No devices to listen');

While I'm running the launchctl as root from launchDaemons repository.
If I start homebridge manually as root, it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants