Cannot connect to 127.0.0.1:58526 (Port shown under the Developer Mode of WSA)

Haowen He 21 Reputation points
2022-03-27T11:11:01.113+00:00

As shown in the title, I can't connect to 127.0.0.1:58526 via adb.
187272-image.png
(cannot connect to 127.0.0.1:58526: No connection could be made because the target machine actively refused it. (10061))
I checked the netstat and the result showed that Port 58526 is not listening! ( And of course my Developer Mode is ON)
187110-image.png
BTW, I can connect to WSA by the given IP in the WSA Setting panel( e.g.:172.22..).

How can I fix this? Thanks!

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,748 questions
0 comments No comments
{count} votes

9 answers

Sort by: Most helpful
  1. Slion 41 Reputation points
    2022-09-12T15:57:49.527+00:00

    Go to WSA settings Developer tab. Click on Manage developer settings which opens the Android developer options. Find USB debugging. turn it on if it was not already. If it is already on, turn it off before turning it back on. Go back to your Windows command prompt adb connect should work again.

    6 people found this answer helpful.

  2. kris 16 Reputation points
    2022-08-20T20:14:09.78+00:00

    Hey, so I've been able to find a solution to the issue.

    First, open a PowerShell window and run

    ipconfig

    You'll get a list containing lots of IP Addresses divided into categories. Look for a header with a Default tag.

    233184-ipconfig.png

    Now copy the IPv4 Address that's written there.

    Connect to the WSA using the following code:

    adb connect <Your IPv4 Address>:58526

    You'll get a prompt from WSA requesting you to allow debugging. Press Accept and you're done!

    Source:
    https://learn.microsoft.com/en-us/windows/android/wsa/

    3 people found this answer helpful.

  3. Andrew Leader-MSFT 211 Reputation points Microsoft Employee
    2022-04-11T18:08:14.223+00:00

    Hi, have you tried the following...

    1. Reboot your PC
    2. Launch a WSA app (like Amazon Appstore)
    3. Attempt connecting again

    When you see the "target machine actively refused it" 10061 error, you'll often just have to reboot your PC and then relaunch WSA and try again.

    1 person found this answer helpful.
    0 comments No comments

  4. Lee Solway 1 Reputation point
    2022-08-03T10:50:38.167+00:00

    Any progress on this issue? I am seeing the same problem, even after a reboot.


  5. AshutoshCl 1 Reputation point
    2022-09-29T12:32:01.957+00:00

    @kris @Slion your workaround not working. Any other way to connect through adb