appium / WebDriverAgent

A WebDriver server for iOS and tvOS
Other
1.2k stars 377 forks source link

unable to access [device's IP]:8100/status when I make Mac and ios17 device connect to same wifi #789

Open HaoWShi opened 1 year ago

HaoWShi commented 1 year ago

Warning: develop env: Mac::2019 MacBook Pro, MacOS Sonoma 14.0 Xcode: 15.0 Iphone: Iphone14 Pro ,IOS17.0.3 Appium:2.1.3

Everything work fine When I make iPhone connect Mac via usb. But when I make iPhone connect Mac via network, the issue arises I config iPhone connect via network in Xcode, and make sure iPhone and Mac connect to same wifi. Then I build and test wda to iPhone success, the WDA run normal

截屏2023-10-18 10 34 50

But I can not access to de url

截屏2023-10-18 10 49 37

These issues are not tracked. Please create new issues in the main Appium repository: https://github.com/appium/appium/issues/new

KazuCocoa commented 1 year ago

Interesting, my iPad 17.1 x Xcode 15.1 beta had no issues. My env is still macOS 13, thus possibly the host env could be related. You could try out IPv6, turn mobile connection off etc

tburakdemir commented 9 months ago

Yes, I have this problem too. I got socket hangup error only GET /status endpoint. I get success with POST /session. On GET /status, i get hangup error with or without iproxy. I think it occured after macos sonomo updating.

KazuCocoa commented 9 months ago

Did ipv6 work then over the WiFi (not via port forward)?

tburakdemir commented 9 months ago

Start appium like this: appium --base-path /wd/hub --log-level debug --allow-cors -a ::1

But it still gives socket hangup error on GET /status

Also start only wda it still give this error. xcodebuild build-for-testing test-without-building -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=c16b08b10c9dbb4ef48c88f7127431c5d9ef69fd' When make request to GET /status above command gives this error message:

2024-01-02 16:18:35.753014+0300 WebDriverAgentRunner-Runner[809:121884] Built at Jan  2 2024 16:12:37
2024-01-02 16:18:35.771087+0300 WebDriverAgentRunner-Runner[809:121884] ServerURLHere->http://192.168.1.67:8100<-ServerURLHere
2024-01-02 16:18:35.771616+0300 WebDriverAgentRunner-Runner[809:122135] Using singleton test manager
2024-01-02 16:20:25.869884+0300 WebDriverAgentRunner-Runner[809:121884] -[__NSXPCInterfaceProxy_XCTMessagingChannel_RunnerToDaemon _XCT_exchangeProtocolVersion:reply:]: unrecognized selector sent to instance 0x2837b1e00
2024-01-02 16:20:25.871741+0300 WebDriverAgentRunner-Runner[809:121884] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_XCTMessagingChannel_RunnerToDaemon _XCT_exchangeProtocolVersion:reply:]: unrecognized selector sent to instance 0x2837b1e00'
*** First throw call stack:
(0x1d8bc140c 0x1d1ea1c10 0x1d8d22400 0x1d8bd68b8 0x1d8c388fc 0x10112f504 0x1df965780 0x1df935ddc 0x10112f414 0x10111a1a0 0x1010b8968 0x1010a44f8 0x1010db078 0x1010dbb68 0x1df965780 0x1df947b24 0x1df965780 0x1df946e10 0x1df946a88 0x1d8c499ac 0x1d8c2d648 0x1d8c31d20 0x1d2f840e8 0x1010a3340 0x100a08174 0x1d8c25f40 0x1d8bd71c8 0x100c81d58 0x100c81d10 0x100c81590 0x100c3dc0c 0x100c81370 0x100c81a60 0x100c81de4 0x100c737ac 0x100c4bb14 0x100c76838 0x100c73714 0x100c34c40 0x100c73288 0x100c74bdc 0x100c34c40 0x100c74688 0x100c57934 0x100c57834 0x100c74134 0x100c20adc 0x100c5a8dc 0x100c5a7a8 0x100c5a25c 0x100c57934 0x100c57834 0x100c5a1d8 0x100c5a480 0x100c20adc 0x100c5a8dc 0x100c5a7a8 0x100c5a25c 0x100c57934 0x100c57834 0x100c5a1d8 0x100c5a480 0x100c20adc 0x100c5a8dc 0x100c5a7a8 0x100c5a25c 0x100c57934 0x100c57834 0x100c5a1d8 0x100c5a480 0x100c20adc 0x100c22c2c 0x100c57934 0x100c57834 0x100c22af4 0x100c95d84 0x100c95f04 0x100c543dc 0x100c2d1c8 0x100c53e38 0x100c210b8 0x1006c1130 0x1006c10cc 0x1d8bf7f78 0x1d8c5a034 0x1d8c2d14c 0x1d8c31d20 0x20ffac998 0x1daec380c 0x1daec3484 0x1006c1390 0x1f63ec344)
libc++abi: terminating due to uncaught exception of type NSException
KazuCocoa commented 9 months ago

The attached error was not related to this issue's behavior. It was because your WDA was old for iOS 17/Xcode 15.

tburakdemir commented 9 months ago

than kyou for response.

I run the Wda in this path: /Users/burak/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj

image

my appium version 2.3.0 Xcuitest driver 4.27.0

I think these last versions. When i update xcuitest driver, it says `appium driver update xcuitest
✔ Checking if driver 'xcuitest' is updatable ✔ Checking if driver 'xcuitest' needs an update ⠋ Updating driver 'xcuitest' from 4.27.0 to 4.35.0⠋ Installing 'xcuitest' using NPM install sp✖ Installing 'xcuitest' using NPM install spec 'appium-xcuitest-driver@4.35.0' ✖ Updating driver 'xcuitest' from 4.27.0 to 4.35.0 ℹ Update report: ✖ - 'xcuitest' failed to update: Error: ✖ Encountered an error when installing package: npm command 'install --save-dev --no-progress --no-audit --prefer-offline --omit=peer --save-exact --global-style --no-package-lock appium-xcuitest-driver@4.35.0 --json' failed with code 1.

STDOUT: { "error": { "code": "ETARGET", "summary": "No matching version found for appium-xcuitest-driver@4.35.0.", "detail": "In most cases you or one of your dependencies are requesting\na package version that doesn't exist." } }

STDERR: npm WARN config global-style This option has been deprecated in favor of --install-strategy=shallow npm ERR! code ETARGET npm ERR! notarget No matching version found for appium-xcuitest-driver@4.35.0. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /Users/burak/.npm/_logs/2024-01-02T19_44_40_308Z-debug-0.log ➜ ~ `

KazuCocoa commented 9 months ago

it is your local npm caching related. https://github.com/appium/appium/pull/19571 npm cache clean --force is a workaround.

Let me hide past a few comments as not for this original issue

cbc123 commented 8 months ago

Warning: develop env: Mac::2019 MacBook Pro, MacOS Sonoma 14.0 Xcode: 15.0 Iphone: Iphone14 Pro ,IOS17.0.3 Appium:2.1.3

Everything work fine When I make iPhone connect Mac via usb. But when I make iPhone connect Mac via network, the issue arises I config iPhone connect via network in Xcode, and make sure iPhone and Mac connect to same wifi. Then I build and test wda to iPhone success, the WDA run normal 截屏2023-10-18 10 34 50

But I can not access to de url 截屏2023-10-18 10 49 37

These issues are not tracked. Please create new issues in the main Appium repository: https://github.com/appium/appium/issues/new

最后你怎么解决的。 我也是这个问题。 我现在想到的是降低版本

zhufuqiang-oss commented 7 months ago

how to connect a via network? it can not bt selected

image