ios_remote_provider icon indicating copy to clipboard operation
ios_remote_provider copied to clipboard

Help deploying / configuring CFA startup

Open AmandeepT opened this issue 3 years ago • 5 comments

Hi, I can see the phones now, but I can see the screen /video. Screen Shot 2021-10-01 at 7 46 09 pm

provider log:

./main run Registering user routes Registering provider routes Registering device routes Provider with username first already existed Updating password to 94918d3033dbd400812bd97f6de57a59 After update: 94918d3033dbd400812bd97f6de57a59 Provider login user=first pass=94918d3033dbd400812bd97f6de57a59 provider login ok provider user=first devStatus request; variant=exists udid=00008101-001904CC11A3003A Notified that device 00008101-001904CC11A3003A exists Adding device: udid:00008101-001904CC11A3003A name:unknown clickWidth:414 clickHegiht:896 Device with udid 00008101-001904CC11A3003A already existed provider user=first got ws connection provider user=first devStatus request; variant=info udid=00008101-001904CC11A3003A Device info for 00008101-001904CC11A3003A: {"ProductType":"iPhone13,2","InternationalMobileEquipmentIdentity":"357676154196899","UniqueDeviceID":"00008101-001904CC11A3003A","InternationalMobileSubscriberIdentity":"505013507483786","DeviceName":"Phone","EthernetAddress":"d8:de:3a:41:1a:ce","ModelNumber":"MGJE3","HardwareModel":"D53gAP","PhoneNumber":"+61 400 000 582","ProductVersion":"14.7.1","ArtworkDeviceProductDescription":"iPhone 12" } provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A uauth checking for ok user fail provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A login ok; user=ok Reserving device 00008101-001904CC11A3003A for ok INFO[0040] Image stream connected rid=zgbaiCMRAj type=imgstream_start udid="***003A" Response from browser: {"clientTime":"1633081746020","sentTime":"1633081746019"} Client time:1633081746020 Milliseconds to client:0 Client Offset:-1 sending startStream to provider sending {id:0,type:"startStream",udid:"00008101-001904CC11A3003A"}

provider user=first connection to provider/imgStream udid=00008101-001904CC11A3003A provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A provider user=first devStatus request; variant=wdaStopped udid=00008101-001904CC11A3003A WDA stopped for 00008101-001904CC11A3003A sending {id:2234,type:"home",udid:"00008101-001904CC11A3003A"}

received

iOS_remote_provider logs:

./main register WARN Could not read specified calculated path. Calculated options will not function. defaults_path=calculated.json error="stat calculated.json: no such file or directory" type=err_read_calculated Enter registration password: Using default registration password of doreg Registered and got password 94918d3033dbd400812bd97f6de57a59 User first existed so password was renewed d807294@CMM-C02DR2SHMD6N ios_remote_provider % ./main run
WARN Could not read specified calculated path. Calculated options will not function. defaults_path=calculated.json error="stat calculated.json: no such file or directory" type=err_read_calculated WARN Leftover go-ios - Sending SIGTERM args="[forward --udid 00008101-001904CC11A3003A 8101 8101]" pid=71355 proc=go-ios type=proc_cleanup WARN Leftover go-ios - Sending SIGTERM args="[server --port 8105]" pid=71358 proc=go-ios type=proc_cleanup INFO Logged in to control floor type=cf_login_success WARN ControlFloor connection is self signed type=cf_ws_selfsign INFO Connecting ControlFloor WebSocket link="wss://localhost:8080/provider/ws" type=cf_ws_connect INFO Notifying CF of device existence name="device existence" type=cf_notify udid="***003A" values="map[clickHeight:[896] clickWidth:[414] height:[896] udid:[00008101-001904CC11A3003A] width:[414]]" INFO Device Present type=dev_present uuid="***003A" INFO Device Info ModelNumber=MGJE3 ProductType="iPhone13,2" ProductVersion=14.7.1 type=dev_info_basic uuid="***003A" INFO Notifying CF of device info name="device info" type=cf_notify udid="***003A" values="map[info:[{"ProductType":"iPhone13,2","InternationalMobileEquipmentIdentity":"357676154196899","UniqueDeviceID":"00008101-001904CC11A3003A","InternationalMobileSubscriberIdentity":"505013507483786","DeviceName":"Phone","EthernetAddress":"d8:de:3a:41:1a:ce","ModelNumber":"MGJE3","HardwareModel":"D53gAP","PhoneNumber":"+61 400 000 582","ProductVersion":"14.7.1","ArtworkDeviceProductDescription":"iPhone 12"\n}] udid:[00008101-001904CC11A3003A]]" Starting bin/go-ios with [forward --udid 00008101-001904CC11A3003A 8101 8101] INFO Process start - tunnel_8101->8101 binary=bin/go-ios proc="tunnel_8101->8101" type=proc_start tunnel start:{"level":"info","msg":"Start listening on port 8101 forwarding to port 8101 on device","time":"2021-10-01T19:48:43+10:00"} Starting WDA via bin/go-ios with args runwda --bundleid com.appium.WebDriverAgentRunner.xctrunner --testrunnerbundleid com.appium.WebDriverAgentRunner.xctrunner --xctestconfig WebDriverAgentRunner.xctest --udid 00008101-001904CC11A3003A INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start INFO Process start - syslogMonitor binary=bin/go-ios proc=syslogMonitor type=proc_start udid=00008101-001904CC11A3003A INFO Process start - backupVideo binary=bin/go-ios port=8105 proc=backupVideo type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" Got request to start video stream for 00008101-001904CC11A3003A self signed option Connecting to CF imgStream Connected CF imgStream INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" INFO Process start - wda binary=bin/go-ios proc=wda type=proc_start WARN Process end - wda proc=wda type=proc_end INFO Notifying CF of WDA stop name="WDA stop" type=cf_notify udid="***003A" values="map[udid:[00008101-001904CC11A3003A]]" panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x42ffb1c]

goroutine 57 [running]: main.(*WDA).home(0xc0000d8630) /Users/d807294/Desktop/WDV/ios_remote_provider/wda.go:340 +0x3c main.(*Device).home(...) /Users/d807294/Desktop/WDV/ios_remote_provider/device.go:570 main.(*ControlFloor).openWebsocket.func5() /Users/d807294/Desktop/WDV/ios_remote_provider/controlfloor.go:298 +0x5f created by main.(*ControlFloor).openWebsocket /Users/d807294/Desktop/WDV/ios_remote_provider/controlfloor.go:295 +0xb3e d807294@CMM-C02DR2SHMD6N ios_remote_provider %

AmandeepT avatar Oct 04 '21 22:10 AmandeepT

WDA is not successfully starting on your device.

Run this command ( shown in the log ) to determine what the problem is: ./bin/go-ios runwda --bundleid com.appium.WebDriverAgentRunner.xctrunner --testrunnerbundleid com.appium.WebDriverAgentRunner.xctrunner --xctestconfig WebDriverAgentRunner.xctest --udid 00008101-001904CC11A3003A

nanoscopic avatar Oct 27 '21 05:10 nanoscopic

@nanoscopic I got this error message when running your command line. I have no idea to fix this.

{"bundleid":"com.appium.WebDriverAgentRunner.xctrunner","level":"info","msg":"Running wda","testbundleid":"com.appium.WebDriverAgentRunner.xctrunner","time":"2021-11-02T16:25:53+09:00","xctestconfig":"WebDriverAgentRunner.xctest"}
{"error":"Did not find AppInfo for 'com.appium.WebDriverAgentRunner.xctrunner' on device. Is it installed?","level":"fatal","msg":"Failed running WDA","time":"2021-11-02T16:25:53+09:00"}

make cfa cmd also succeded.

** TEST BUILD SUCCEEDED **


The following commands produced analyzer issues:
	Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/ujsonin/ujsonin.c normal armv7 (in target 'CFAgentLib' from project 'CFAgent')
	Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/ujsonin/ujsonin.c normal arm64 (in target 'CFAgentLib' from project 'CFAgent')
	Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/WebDriverAgentLib/Routing/NNGServer.m normal armv7 (in target 'CFAgentLib' from project 'CFAgent')
	Analyze /Users/hc499/Documents/LongWorkSpace/Dockyard/research/ios_remote_provider/repos/CFAgent/WebDriverAgentLib/Routing/NNGServer.m normal arm64 (in target 'CFAgentLib' from project 'CFAgent')
(4 commands with analyzer issues)

But, there is no WebDriverAgent installed on my phone. I could not understand the reason why.

zcmgyu avatar Nov 02 '21 07:11 zcmgyu

What version of the repo are you using?

The latest version does not run WDA by default at all. Setting wdaMethod is required to have WDA launched for you.

Otherwise now only CFAgent is run.

Have you deployed/installed CFA to your device? You need to do that first.

nanoscopic avatar Nov 12 '21 07:11 nanoscopic

@nanoscopic Sorry, I will continue on this topic.

https://github.com/nanoscopic/ios_remote_provider/issues/67#issuecomment-966940470

zcmgyu avatar Nov 12 '21 09:11 zcmgyu

wdaMethod

What it will be?

jagdish24 avatar Dec 23 '21 09:12 jagdish24