Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing when start screen mirror #72

Open
prabasdm opened this issue Dec 20, 2021 · 12 comments
Open

Crashing when start screen mirror #72

prabasdm opened this issue Dec 20, 2021 · 12 comments

Comments

@prabasdm
Copy link

I followed all the steps mentioned on ReadMe, I can see the device information in the localhost. When I click the device to see the Screen, the ios_remore_provider throughs the following error. Please help me to fix this issue, I have been struck for more than 3 days.

controlfloor:

Registering user routes
Registering provider routes
Registering device routes
Provider login user=first pass=c5b465c6745a63f3ccceb4b089de1785
provider login ok
provider user=first
devStatus request; variant=exists
udid=6736cefcf2caee7f99ea4aeb63ad3f76da88e898
Notified that device 6736cefcf2caee7f99ea4aeb63ad3f76da88e898 exists
Adding device:
udid:6736cefcf2caee7f99ea4aeb63ad3f76da88e898
name:unknown
clickWidth:414
clickHegiht:896
Device with udid 6736cefcf2caee7f99ea4aeb63ad3f76da88e898 already existed
provider user=first
got ws connection
provider user=first
devStatus request; variant=info
udid=6736cefcf2caee7f99ea4aeb63ad3f76da88e898
Device info for 6736cefcf2caee7f99ea4aeb63ad3f76da88e898:
{"ProductVersion":"12.5.5","UniqueDeviceID":"6736cefcf2caee7f99ea4aeb63ad3f76da88e898","DeviceName":"Prabakaran’s iPod touch","EthernetAddress":"a4:31:35:b3:f1:05","ModelNumber":"MKGX2","HardwareModel":"N102AP","ProductType":"iPod7,1","ArtworkDeviceProductDescription":"iPod7,1"
}
provider user=first
devStatus request; variant=cfaStopped
udid=6736cefcf2caee7f99ea4aeb63ad3f76da88e898
CFA stopped for 6736cefcf2caee7f99ea4aeb63ad3f76da88e898
provider user=first
devStatus request; variant=cfaStopped
udid=6736cefcf2caee7f99ea4aeb63ad3f76da88e898
CFA stopped for 6736cefcf2caee7f99ea4aeb63ad3f76da88e898
provider user=first
devStatus request; variant=cfaStopped
udid=6736cefcf2caee7f99ea4aeb63ad3f76da88e898
CFA stopped for 6736cefcf2caee7f99ea4aeb63ad3f76da88e898
provider user=first
devStatus request; variant=cfaStopped
udid=6736cefcf2caee7f99ea4aeb63ad3f76da88e898
CFA stopped for 6736cefcf2caee7f99ea4aeb63ad3f76da88e898
uauth
checking for ok
user fail
login ok; user=ok
Reserving device 6736cefcf2caee7f99ea4aeb63ad3f76da88e898 for ok
INFO[0031] Image stream connected rid=BzgbaiCMRA type=imgstream_start udid="***e898"
Response from browser: {"clientTime":"1640000523078","sentTime":"1640000523076"}
Client time:1640000523078
Round trip:2
server to client raw: 2
client back to server raw: 0
Client Offset:1
Server Offset:-1
sending startStream to provider
sending {id:0,type:"startStream",udid:"6736cefcf2caee7f99ea4aeb63ad3f76da88e898"}

provider user=first
connection to provider/imgStream udid=6736cefcf2caee7f99ea4aeb63ad3f76da88e898
Frame receive error: websocket: close 1006 (abnormal closure): unexpected EOF
sending {id:1105,type:"click",udid:"6736cefcf2caee7f99ea4aeb63ad3f76da88e898",x:313,y:377}

lost ws connection

ios_remote_provider:

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="***e898" values="map[clickHeight:[896] clickWidth:[414] height:[896] udid:[6736cefcf2caee7f99ea4aeb63ad3f76da88e898] width:[414]]"
INFO Device Present type=dev_present uuid="***e898"
INFO Device Info ModelNumber=MKGX2 ProductType="iPod7,1" ProductVersion=12.5.5 type=dev_info_basic uuid="***e898"
INFO Notifying CF of device info name="device info" type=cf_notify udid="***e898" values="map[info:[{"DeviceName":"Prabakaran’s iPod touch","EthernetAddress":"a4:31:35:b3:f1:05","ModelNumber":"MKGX2","HardwareModel":"N102AP","ProductType":"iPod7,1","ProductVersion":"12.5.5","UniqueDeviceID":"6736cefcf2caee7f99ea4aeb63ad3f76da88e898","ArtworkDeviceProductDescription":"iPod7,1"\n}] udid:[6736cefcf2caee7f99ea4aeb63ad3f76da88e898]]"
Starting bin/go-ios with [forward --udid 6736cefcf2caee7f99ea4aeb63ad3f76da88e898 8101 8101]
Starting bin/go-ios with [forward --udid 6736cefcf2caee7f99ea4aeb63ad3f76da88e898 8102 8102]
INFO Process start - tunnel_8102->8102 binary=bin/go-ios proc="tunnel_8102->8102" type=proc_start
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-12-20T17:02:18+05:30"}
tunnel start:{"level":"info","msg":"Start listening on port 8102 forwarding to port 8102 on device","time":"2021-12-20T17:02:18+05:30"}
Starting CFA via bin/go-ios with args runwda --bundleid com.dryark.CFAgent.xctrunner --testrunnerbundleid com.dryark.CFAgent.xctrunner --xctestconfig CFAgent.xctest --udid 6736cefcf2caee7f99ea4aeb63ad3f76da88e898
INFO Process start - cfa binary=bin/go-ios proc=cfa type=proc_start
WARN Process end - cfa proc=cfa type=proc_end
INFO Process start - cfa binary=bin/go-ios proc=cfa type=proc_start
INFO Notifying CF of CFA stop name="CFA stop" type=cf_notify udid="***e898" values="map[udid:[6736cefcf2caee7f99ea4aeb63ad3f76da88e898]]"
WARN Process end - cfa proc=cfa type=proc_end
INFO Notifying CF of CFA stop name="CFA stop" type=cf_notify udid="***e898" values="map[udid:[6736cefcf2caee7f99ea4aeb63ad3f76da88e898]]"
INFO Process start - cfa binary=bin/go-ios proc=cfa type=proc_start
WARN Process end - cfa proc=cfa type=proc_end
INFO Notifying CF of CFA stop name="CFA stop" type=cf_notify udid="***e898" values="map[udid:[6736cefcf2caee7f99ea4aeb63ad3f76da88e898]]"
INFO Process start - cfa binary=bin/go-ios proc=cfa type=proc_start
WARN Process end - cfa proc=cfa type=proc_end
INFO Notifying CF of CFA stop name="CFA stop" type=cf_notify udid="***e898" values="map[udid:[6736cefcf2caee7f99ea4aeb63ad3f76da88e898]]"
Got request to start video stream for 6736cefcf2caee7f99ea4aeb63ad3f76da88e898
self signed option
Connecting to CF imgStream
Connected CF imgStream
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x4300b13]

goroutine 98 [running]:
main.(*CFA).Screenshot(0xc000326280)
/Users/apple/df/ios_remote_provider/cfa.go:659 +0x73
main.(*Device).startVidStream(0xc00038c340)
/Users/apple/df/ios_remote_provider/device.go:589 +0x4c
main.(*ControlFloor).startVidStream(...)
/Users/apple/df/ios_remote_provider/controlfloor.go:164
main.(*ControlFloor).openWebsocket.func15()
/Users/apple/df/ios_remote_provider/controlfloor.go:424 +0x3c
created by main.(*ControlFloor).openWebsocket
/Users/apple/df/ios_remote_provider/controlfloor.go:424 +0x1995`

THANKS in advance.

@erykrutkowski
Copy link

Same issue here :(

@NguyenHoangDuy2406
Copy link

NguyenHoangDuy2406 commented Mar 8, 2022

Same issue until now!
Note: Is it the same with #74

@prabasdm
Copy link
Author

This actually working for me after install the CFAgent-Runner on my jailbroken iPhone.

@NguyenHoangDuy2406
Copy link

Yes, thanks @prabasdm.
For everyone met that issue, please open "ios_remote_provider/repos/CFAgent/CFAgent.xcodeproj" and build CFAgent-Runner by "Command + U"

@nanoscopic can close this issue

@erykrutkowski
Copy link

🤔 @NguyenHoangDuy2406 So I've opened "ios_remote_provider/repos/CFAgent/CFAgent.xcodeproj" but there is no CFAgent-Runner, maybe I didn't do something, but there is no such option :(
image (144)

@NguyenHoangDuy2406
Copy link

NguyenHoangDuy2406 commented Apr 12, 2022

Hi erykrutkowski

Please do the steps below:

  1. Open ios_remote_provider/repos/CFAgent/CFAgent.xcodeproj

  2. Choose target CFAgent for building
    Screen Shot 2022-04-12 at 15 26 38

  3. Press "Command + U"

  4. Wait
    Screen Shot 2022-04-12 at 15 29 14
    a second then you will see the icon "CFAgent Runner" on your device

  5. Start provider again, the error will be disappeared

@Immanuel-GWU
Copy link

Immanuel-GWU commented Apr 16, 2022

So the only way this issue should not occur is to jailbreak my iPhone. So can I go and jailbreak my device? @prabasdm

@NguyenHoangDuy2406
Copy link

@Immanuel-GWU
No need "jailbreak", I'm fixed it on normal iOS device(s). Just follow my above steps

@Immanuel-GWU
Copy link

Immanuel-GWU commented Apr 18, 2022

Hi @NguyenHoangDuy2406 I tried the same step as yours, but still when I perform multiple actions the control floor gets stuck,

This is the log that I see in control floor:
dev video stopped for udid: 00008101-001C58D10xxxxxx
INFO[0127] Deleting device reservation rid=BzgbaiCMRA type=reserve_delete udid="***001E"

Screenshot 2022-04-18 at 8 58 22 AM

@NguyenHoangDuy2406
Copy link

Hmm, it's working normal on my device(s). Could you give the device info and full log of ios remote provider, @Immanuel-GWU ?

@linhvv12
Copy link

@NguyenHoangDuy2406 , Hi Bạn Duy, bạn cho mình hỏi bạn đang chạy macos version nào và xcode version nào vậy ạ. mình đã có Cfagent-runner tren iphone rồi, nhung van bi báo lỗi panic: Runtime error.

@NguyenHoangDuy2406
Copy link

@linhvv12 MacOS Monterey - 12.0.1, XCode13.4 Bạn check lại trong quá trình setup xem có lỗi gì không? Bên mình thì hoạt động bình thường á ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants