dryark / ios_remote_provider

Other
49 stars 33 forks source link

Socket dial error #50

Closed koltevinod1 closed 2 years ago

koltevinod1 commented 3 years ago

Hi, i got error while running "./main run" in ios_remote_provider, as i have build all the things as per your document. my logs is as follows

./main run WARN[0000] Leftover iosif - Sending SIGTERM pid=7904 proc=iosif type=proc_cleanup WARN[0000] Leftover iosif - Sending SIGTERM pid=7907 proc=iosif type=proc_cleanup WARN[0000] Leftover iosif - Sending SIGTERM pid=7908 proc=iosif type=proc_cleanup WARN[0000] Leftover tidevice - Sending SIGTERM pid=7909 proc=tidevice type=proc_cleanup WARN[0000] Leftover tidevice - Sending SIGTERM pid=7910 proc=tidevice type=proc_cleanup INFO[0001] Process start - device_trigger binary=bin/iosif proc=device_trigger type=proc_start Location from redirect of controlfloor login:'http://localhost:8080/provider/' Logged in to control floor link for dialer = ws://localhost:8080/provider/ws Creating IIFDev with udid=c23e25428ae5789261c22c3ffd80e60bae4234eb udid: c23e25428ae5789261c22c3ffd80e60bae4234eb Notified control floor of 'device existence'; uuid=*34eb udid for info: c23e25428ae5789261c22c3ffd80e60bae4234eb json:{ DeviceName:"iPhone" , EthernetAddress:"f0:79:60:58::**" , ModelNumber:"MP822" , HardwareModel:"N69uAP" , ProductType:"iPhone8,4" , ProductVersion:"14.7.1" , UniqueDeviceID:"c23e25428ae5789261c22c3ffd80e60bae4234eb" , InternationalMobileEquipmentIdentity:"359203072331918" , }

mapped result:map[DeviceName:iPhone EthernetAddress:f0:79:60:58:: HardwareModel:N69uAP InternationalMobileEquipmentIdentity:359203072331918 ModelNumber:MP822 ProductType:iPhone8,4 ProductVersion:14.7.1 UniqueDeviceID:c23e25428ae5789261c22c3ffd80e60bae4234eb] INFO[0001] Device Info info="map[DeviceName:iPhone EthernetAddress:f0:79:60:58:: HardwareModel:N69uAP InternationalMobileEquipmentIdentity:359203072331918 ModelNumber:MP822 ProductType:iPhone8,4 ProductVersion:14.7.1 UniqueDeviceID:c23e25428ae5789261c22c3ffd80e60bae4234eb]" type=devInfo uuid="34eb" Notified control floor of 'device info'; uuid=34eb Starting bin/iosif with [tunnel -id c23e25428ae5789261c22c3ffd80e60bae4234eb 8106:8100 8105:8150 8101:8101] port = 8104 id = c23e25428ae5789261c22c3ffd80e60bae4234eb id = c23e25428ae5789261c22c3ffd80e60bae4234eb INFO[0001] Process start - syslogMonitor binary=bin/iosif id=c23e25428ae5789261c22c3ffd80e60bae4234eb proc=syslogMonitor type=proc_start INFO[0001] Process start - backupVideo binary=bin/iosif id=c23e25428ae5789261c22c3ffd80e60bae4234eb port=8104 proc=backupVideo type=proc_start INFO[0001] Process start - tunnel_8106->8100_8105->8150_8101->8101 binary=bin/iosif proc="tunnel_8106->8100_8105->8150_8101->8101" type=proc_start tunnel:Tunnel from 8106 to 8100 tunnel:bound to port 8106 tunnel:Tunnel from 8105 to 8150 tunnel:bound to port 8105 tunnel:Tunnel from 8101 to 8101 tunnel:bound to port 8101 tunnel:Ready INFO[0001] Process start - wda binary=/opt/homebrew/lib/python3.9/site-packages/../../../bin/tidevice proc=wda type=proc_start INFO[0003] [WDA] successfully started port=8106 proc=wda type=wda_start uuid="34eb" INFO[0003] [WDA] successfully started mjpegPort=8105 port=8106 type=wda_start udid="34eb" Starting NNG INFO[0003] in a mangoos socket .........
INFO[0003] Socket dial error err="read tcp 127.0.0.1:50350->127.0.0.1:8101: read: connection reset by peer" spec="tcp://127.0.0.1:8101" type=err_socket_dial NNG Started Notified control floor of 'wda start'; uuid=***34eb panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x78 pc=0x102d194c4]

goroutine 14 [running]: main.(*WDA).get_session(0x1400011c790, 0x14000420169, 0x1400041a500) /Users/*/Control_Floor_Setup/ios_remote_provider/wda.go:245 +0x44 main.(WDA).ensureSession(0x1400011c790) /Users//Control_Floor_Setup/ios_remote_provider/wda.go:224 +0x28 main.(*Device).startEventLoop.func1(0x1400025a580) /Users/*/Control_Floor_Setup/ios_remote_provider/device.go:172 +0x804 created by main.(Device).startEventLoop /Users//Control_Floor_Setup/ios_remote_provider/device.go:161 +0x3c

please give me a solution. Thank you in advance....

chewbacca70 commented 3 years ago

can you post your config.json file. Do you have configured to use tidevice, maybe? You should disable using tidevice actually as long as new WDA has issues to use tidevice.

nanoscopic commented 3 years ago

8101 is the NNG socket for updated WebDriverAgent. Have you deployed the version of WDA that this repo clones, or are you using a normal upstream WDA? If the latter you will have this issue.

nanoscopic commented 2 years ago

WebDriverAgent fork project has been renamed to CFAgent to make it clear that the custom version is needed and it is not the same as upstread WDA.

Deploy CFAgent to your phone and the above will work fine. Closing.