mitmproxy / mitmproxy/mitmproxy
"UDP packet destinations do not match" error when using whatsapp app on mac with mitmproxy --mode local
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 45.1k
- Forks
- 4.7k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 16
Description
Problem Description
"UDP packet destinations do not match" error when using whatsapp app on mac with mitmproxy --mode local
Steps to reproduce the behavior:
- run mitmdump --mode local (on mac)
- use the whatsapp desktop app
- try to answer an incoming voice call and it will get stuck on connecting
Logs below:
mitmdump --mode local
[12:46:02.375] Local redirector started.
[12:46:02.471][192.168.1.44:0] client connect
[12:46:02.471][192.168.1.44:0] client connect
[12:46:02.473][192.168.1.44:0] server connect 192.168.1.1:53
[12:46:02.473][192.168.1.44:0] server connect 192.168.1.1:53
192.168.1.44:0: DNS QUERY (HTTPS) ocsp.digicert.com
<< ocsp.edge.digicert.com, cac-ocsp.digicert.com.edgekey.net, e3913.cd.akamaiedge.net
192.168.1.44:0: DNS QUERY (A) ocsp.digicert.com
<< ocsp.edge.digicert.com, cac-ocsp.digicert.com.edgekey.net, e3913.cd.akamaiedge.net, 104.75.232.13
[12:46:09.278] Connection task failure: failed to handle UDP stream
Caused by:
UDP packet destinations do not match: 57.144.121.54:3478 -> 31.13.86.48:3478
[12:46:09.278][192.168.1.44:52186] client connect
[12:46:09.279][192.168.1.44:52186] client disconnect
[12:46:10.354][192.168.1.44:49825] client connect
[12:46:10.355][192.168.1.44:15419] client connect
[12:46:10.356][192.168.1.44:49825] server connect 192.168.1.1:53
[12:46:10.357][192.168.1.44:15419] server connect 192.168.1.1:53
192.168.1.44:49825: DNS QUERY (A) http-inputs-notion.splunkcloud.com
<< notion-0-68ad571cf79e9e82.elb.us-east-1.amazonaws.com, 44.215.234.239, 34.228.45.57, 18.214.252.60
192.168.1.44:15419: DNS QUERY (HTTPS) http-inputs-notion.splunkcloud.com
<< notion-0-68ad571cf79e9e82.elb.us-east-1.amazonaws.com
[12:46:10.361][127.0.0.1:0] client connect
[12:46:10.506][127.0.0.1:0] server connect 44.215.234.239:443
127.0.0.1:0: OPTIONS https://44.215.234.239/services/collector/raw HTTP/2.0
<< HTTP/2.0 200 OK 0b
127.0.0.1:0: POST https://44.215.234.239/services/collector/raw HTTP/2.0
<< HTTP/2.0 200 OK 27b
[12:46:11.585] Connection task failure: failed to handle UDP stream
Caused by:
UDP packet destinations do not match: 57.144.121.54:3478 -> 31.13.86.48:3478
[12:46:11.586][192.168.1.44:65339] client connect
[12:46:11.586][192.168.1.44:65339] client disconnect
[12:46:13.872] Connection task failure: failed to handle UDP stream
Caused by:
UDP packet destinations do not match: 57.144.121.54:3478 -> 31.13.86.48:3478
[12:46:13.873][192.168.1.44:56581] client connect
[12:46:13.873][192.168.1.44:56581] client disconnect
[12:46:13.935][192.168.1.44:15233] client connect
[12:46:13.935][192.168.1.44:33514] client connect
[12:46:13.937][192.168.1.44:33514] server connect 192.168.1.1:53
[12:46:13.938][192.168.1.44:15233] server connect 192.168.1.1:53
192.168.1.44:33514: DNS QUERY (A) slack.com
<< 3.68.124.168, 3.68.124.95, 18.159.197.225, 52.29.238.212, 3.68.170.153, 3.68.175.98
192.168.1.44:15233: DNS QUERY (HTTPS) slack.com
<< NOERROR
[12:46:16.165][192.168.1.44:57308] client connect
[12:46:16.165] Connection task failure: failed to handle UDP stream
Caused by:
UDP packet destinations do not match: 57.144.121.54:3478 -> 31.13.86.48:3478
[12:46:16.166][192.168.1.44:57308] client disconnect
127.0.0.1:0: OPTIONS https://44.215.234.239/services/collector/raw HTTP/2.0
<< HTTP/2.0 200 OK 0b
127.0.0.1:0: POST https://44.215.234.239/services/collector/raw HTTP/2.0
<< HTTP/2.0 200 OK 27b
[12:46:17.816][192.168.1.44:37125] client connect
[12:46:17.816][192.168.1.44:24727] client connect
[12:46:17.818][192.168.1.44:37125] server connect 192.168.1.1:53
[12:46:17.819][192.168.1.44:24727] server connect 192.168.1.1:53
192.168.1.44:37125: DNS QUERY (A) b.clarity.ms
<< vmss-clarity-ingest-eus2.eastus2.cloudapp.azure.com, 4.153.129.168
192.168.1.44:24727: DNS QUERY (HTTPS) b.clarity.ms
<< vmss-clarity-ingest-eus2.eastus2.cloudapp.azure.com
[12:46:17.871][127.0.0.1:0] client connect
[12:46:17.996][127.0.0.1:0] server connect 4.153.129.168:443
127.0.0.1:0: POST https://4.153.129.168/collect
<< 204 No Content 0b
[12:46:18.453][192.168.1.44:63899] client connect
[12:46:18.454] Connection task failure: failed to handle UDP stream
Caused by:
UDP packet destinations do not match: 57.144.121.54:3478 -> 31.13.86.48:3478
System Information
Mitmproxy: 12.1.2
Python: 3.12.11
OpenSSL: OpenSSL 3.4.1 11 Feb 2025
Platform: macOS-15.7-arm64-arm-64bit
Checklist
- This bug affects the latest mitmproxy release.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with mitmdump --mode local on macOS while answering a WhatsApp voice call, then trace the local-mode UDP handling associated with the logged destination mismatch. Done means the call no longer gets stuck on connecting and the reported UDP error is resolved or clearly diagnosed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100