2

When I have a physical device connected to my Mac and debugging a Xamarin Android project, any time after the first debug I always get a 'Failed to connect to process' error, the logs show this:

E/adbd (18585): failed to connect to socket 'tcp:8784': Connection refused

where the TCP port changes each time I retry to build. Now I can Factory Reset the phone and debug the project again and it works just fine for the first time and then any time after I get the same error. Each factory reset requires enabling developer mode, allowing USB debugging, and then signing into Google which is quite tedious.

IDE: Rider 2021.3.3 Xamarin Forms 5.0.0.2337 Physical device: LG V30 H932 Android 9

Is there something that needs to be done to be able to keep using the phone for debugging?

These are the final few lines of the build output:

02-05 20:18:08.019 I/NetworkController( 2712): onReceive: intent=Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 (has extras) } 02-05 20:18:08.020 I/LGWifiStatusTracker( 2712): Wifi connected = true, Wifi level = 1 02-05 20:18:08.020 I/NetworkController.WifiSignalController( 2712): mCurrentState.enabled = true, mCurrentState.connected = true, mCurrentState.detailedState = CONNECTED, mCurrentState.inetCondition = 1 02-05 20:18:08.020 I/NetworkController.WifiSignalController( 2712): Change in state to: connected=true,enabled=true,level=1,inetCondition=1,iconGroup=IconGroup(Default Wi-Fi Icons),activityIn=false,activityOut=false,rssi=-75,lteadvancedmode=0,ssid="Cube Monkey",isTransient=false,statusLabel=null,isGigaWiFi=false,isAttWifiCall=false,detailedState=CONNECTED 02-05 20:18:08.021 D/Mms:NetworkService( 5057): onReceive: android.net.wifi.RSSI_CHANGED 02-05 20:18:08.021 D/Mms:NetworkService( 5057): imsRegistrationAction:IMS_REGISTRATION 02-05 20:18:08.021 D/Mms:NetworkService( 5057): WIFI rssi = -75 02-05 20:18:08.027 W/LGIMS_J ( 2936): [Apn::handleMessage:451] [0] Apn :: no proc - apn=INTERNET, msg=3006, proc=NETWORK_CAPABILITIES_CHANGED 02-05 20:18:08.028 I/MSimUtils( 2712): getSubId : 2147483643 02-05 20:18:08.030 I/MSimUtils( 2712): getSubId : 2147483643 02-05 20:18:08.056 D/SDM ( 723): DisplayBase::BuildLayerStackStats: LayerStack layer_count: 5, app_layer_count: 4, gpu_target_index: 4, display type: 0 02-05 20:18:08.058 I/SDM ( 723): HWInfo::GetFirstDisplayInterfaceType: First display is internal display 02-05 20:18:08.067 E/adbd ( 3579): failed to connect to socket 'tcp:8788': Connection refused 02-05 20:18:08.419 W/ActivityManager( 2172): stopServiceToken startId 13 is last, but have 1 remaining args Failed to connect to process.02-05 20:18:08.299 I/chatty ( 3579): uid=2000(shell) /system/bin/adbd identical 4 lines 02-05 20:18:08.359 E/adbd ( 3579): failed to connect to socket 'tcp:8788': Connection refused 02-05 20:18:08.597 V/WifiServerServiceExt( 2172): checkPollTimer Cnt = 0 rssi = -74 threshold = -100

Reza
  • 5,314
  • 5
  • 21
  • 35

0 Answers0