Open macbrayne opened 3 years ago
Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏
This issue can occur because either of two reasons:
Could you start with narrowing down which of these two cases it seems to be?
I'm pretty sure it's not the second case because the issue even occurs on system startup. I can't fully rule out the first case however I couldn't find any applications listening on the port 5600:
Get-NetTCPConnection |where {($_.LocalPort -eq 5600)} |Foreach {(Get-Process -Id $_.OwningProcess)}
When the program starts up successfully:
Get-NetTCPConnection |where {($_.LocalPort -eq 5600)} |Foreach {(Get-Process -Id $_.OwningProcess)}
251 29 31328 42500 0,45 15244 1 aw-server
251 29 31328 42500 0,45 15244 1 aw-server
251 29 31328 42500 0,45 15244 1 aw-server
0 0 60 8 0 0 Idle
251 29 31328 42500 0,45 15244 1 aw-server
In the case of this issue occurring that command doesn't output anything, This should mean that this port isn't used.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I've mitigated the issue by stopping and starting winnat
every time it crashes and finally solved it by following the instructions on this GitHub issue (https://github.com/docker/for-win/issues/3171#issuecomment-554587817) and adding the port 5600 to the port exclusion range.
The reason for the crash seemed to be WSL / HyperV reserving a huge range of ports for VMs and applications accessing them getting a "Access denied" error.
To exclude the port required for ActivityWatch run netsh int ipv4 add excludedportrange protocol=tcp startport=5600 numberofports=1
The current range is checkable via netsh interface ipv4 show excludedportrange protocol=tcp
I don't remember whether I had to do anything regarding udp port ranges.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Maybe this fix could be documented?
Describe the bug
Randomly, the aw-server fails to launch and keeps crashing whether the module is restarted or the program is completely shutdown using the "Quit ActivityWatch" button in tray icon menu and restarted. This doesn't always happen: sometimes the program runs smoothly over the course of multiple restarts, other times it repeatedly crashes even after restarting the computer. The resulting error is always WinError 10013.
To Reproduce
I haven't tested enough to reliably reproduce this error.
Expected behavior
The program should start up correctly on every system start.
Documentation
Screenshot of the log folder: all 2kb files are erroring start-up attempts
Programs trying to send data to port 5600 during startup:
Trying to query programs listening on port 5600 yielded no results.
Additional context
aw-qt_2021-02-28T18-53-35.log