Posting this in case it saves someone else hours of troubleshooting.
I was trying to pair my Aqara U200 to an Aqara Matter Controller/Hub. Pairing would start normally, but it would always get stuck at Step 3 – “The device is connecting to the network…”
I tried resetting the lock/hubs, checking the Thread network, making sure the hubs were on the same network, etc. Nothing worked.
The problem turned out to be AdGuard VPN running on my phone.
I disabled AdGuard/VPN, tried pairing again, and it connected immediately.
So if your Aqara Matter/Thread device is discovered successfully but gets stuck while connecting to the network, try:
Turn off any VPN, AdGuard, DNS filtering or similar network-filtering app on your phone before pairing.
Hopefully this saves someone the headache I went through.
Source: r/Aqara · by /u/dhiren_jb