scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Cancelling an overlapped future failed error in Scapy on Windows

Open Rrpd opened this issue 2 years ago • 3 comments

Brief description

Encountering the "Cancelling an overlapped future failed" error while using Scapy on Windows. The issue manifests during packet sniffing, and attempts to resolve it have included updating Scapy and investigating potential dependencies. Seeking assistance to identify and implement a solution for this error.

Scapy version

2.5

Python version

3.8

Operating system

Windows 11

Additional environment information

No response

How to reproduce

Environment Details:

  • Operating System: Windows 11
  • Python Version: 3.8
  • Scapy Version: 2.5.0

Steps to Reproduce:

  1. Open a Command Prompt.
  2. Run the command scapy.
  3. In the Scapy console, execute the sniff(count=2) command.
  4. Observe the error message 'Cancelling an overlapped future failed.'

Expected Behavior:

  • Scapy should execute the sniff command without errors.

Actual Behavior:

  • Error message 'Cancelling an overlapped future failed' is displayed.

Additional Context:

  • This issue occurs consistently.

Actual result

Cancelling an overlapped future failed future: <_OverlappedFuture pending overlapped=<pending, 0x5a10a20> cb=[BaseProactorEventLoop._loop_self_reading()]> Traceback (most recent call last): File "C:\Networks\Python3.8\lib\asyncio\windows_events.py", line 66, in _cancel_overlapped self._ov.cancel() OSError: [WinError 6] The handle is invalid

Expected result

Packet 1

Source: 192.168.1.2 Destination: 192.168.1.1 Protocol: TCP Payload: [Packet Data]

Packet 2

Source: 10.0.0.1 Destination: 10.0.0.2 Protocol: UDP Payload: [Packet Data]

Related resources

No response

Rrpd avatar Dec 11 '23 13:12 Rrpd

Could you provide the full error log? Thanks

gpotter2 avatar Jan 30 '24 10:01 gpotter2