regner / albiondata-client

Distributed client for the Albion Data project.
https://albion-data.com/
MIT License
38 stars 17 forks source link

Permissions error when running on Mac OSX #125

Open regner opened 7 years ago

regner commented 7 years ago

time="2017-09-04T14:58:51-07:00" level=info msg="This is a third-party application and is in no way affiliated with Sandbox Interactive or Albion Online." 
time="2017-09-04T14:58:51-07:00" level=debug msg="Watching processes for Albion to start..." 
time="2017-09-04T14:59:43-07:00" level=info msg="Watching Albion process with PID \"30000\"..." 
time="2017-09-04T14:59:43-07:00" level=debug msg="Will listen to these devices: [en0 en1 en3 en2 en4 bridge0 p2p0 awdl0 utun0 en5]" 
time="2017-09-04T14:59:45-07:00" level=fatal msg="p2p0: You don't have permission to capture on that device ((cannot open BPF device) /dev/bpf0: Permission denied)" 
time="2017-09-04T14:59:45-07:00" level=fatal msg="en5: You don't have permission to capture on that device ((cannot open BPF device) /dev/bpf0: Permission denied)" ```
regner commented 7 years ago

Seems like a good excuse to switch to using the "any" interface that @pcdummy had mentioned,

oxisto commented 7 years ago

Somehow running in "online" mode is completely broken for me on Mac OS. I've been developing just with offline mode. It seems that a bunch of listeners get started but no packets are parsed at all.

INFO[2017-09-05T18:34:23+02:00] Starting the Albion Data Client...           
INFO[2017-09-05T18:34:23+02:00] This is a third-party application and is in no way affiliated with Sandbox Interactive or Albion Online. 
DEBU[2017-09-05T18:34:23+02:00] Watching processes for Albion to start...    
INFO[2017-09-05T18:34:23+02:00] Watching Albion process with PID "17109"...  
DEBU[2017-09-05T18:34:23+02:00] Will listen to these devices: [en0 en1 bridge0 p2p0 awdl0 utun0] 
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: en0:56627)...     
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: en1:56627)...     
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: en0:57249)...     
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: p2p0:56627)...    
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: awdl0:57249)...   
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: awdl0:56627)...   
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: en1:57249)...     
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: p2p0:57249)...    
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: utun0:56627)...   
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: bridge0:57249)... 
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: p2p0:64111)...    
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: utun0:57249)...   
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: en1:64111)...     
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: bridge0:64111)... 
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: awdl0:64111)...   
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: en0:64111)...     
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: utun0:64111)...   
DEBU[2017-09-05T18:34:23+02:00] Starting listener (online: bridge0:56627)... 
oxisto commented 7 years ago

Ok this is a weird issue. I cannot seem to capture live traffic if I build the OS X client myself. If i download the ones built by circle ci, live capturing works.

jochumdev commented 7 years ago

Here on Linux i have to run the albiondata-client with sudo, can you try that on your mac please?

regner commented 7 years ago

For me I have to run with sudo on Mac but I would get an actual permissions error if I didn't. He doesn't seem to, so that confuses me.

oxisto commented 7 years ago

Using sudo makes no difference on my machine, as it is configured in a way that it allows my normal user to capture traffic (there is an option in the Wireshark installer to do that) - it gives your user permissions to use the bpf devices - otherwise you need sudo.

I'll do some additional digging into this once i'm back from my vacation, what exactly the issue is here. It seems that all locally build (go build) builds of the client cannot capture live that (with or without sudo). All the builds from circle-ci can.

@Regner How are you building the client on osx? Maybe it's a really weird issue on my macbook air. I'll do some testing on my macbook pro once i'm back home