Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Can't connect via Wifi to iOS10.x devices in China #288

Closed
sencho opened this issue Sep 18, 2016 · 72 comments
Closed

Can't connect via Wifi to iOS10.x devices in China #288

sencho opened this issue Sep 18, 2016 · 72 comments

Comments

@sencho
Copy link

sencho commented Sep 18, 2016

iOS10.0.1 iPhone 6s Device is not work,Xcode Run test is OK,but when i visit the inspector through the url is not work.but in iOS 9.3.5 Device is OK.

2016-09-18 18:23:04.222588 XCTRunner[1568:332260] [Accessibility] ****************** Loading GAX Client Bundle **************** 2016-09-18 18:23:04.311613 XCTRunner[1568:332260] Running tests... 2016-09-18 18:23:05.215474 XCTRunner[1568:332260] Continuing to run tests in the background with task ID 1 Test Suite 'All tests' started at 2016-09-18 18:23:06.075 Test Suite 'WebDriverAgentRunner.xctest' started at 2016-09-18 18:23:06.076 Test Suite 'UITestingUITests' started at 2016-09-18 18:23:06.076 Test Case '-[UITestingUITests testRunner]' started. t = 0.00s Start Test at 2016-09-18 18:23:06.078 t = 0.00s Set Up 2016-09-18 18:23:06.082197 XCTRunner[1568:332291] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1740e9b00> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only 2016-09-18 18:23:06.085160 XCTRunner[1568:332260] Built at Sep 18 2016 18:22:55 2016-09-18 18:23:06.113981 XCTRunner[1568:332260] ServerURLHere->http://192.168.0.115:8100<-ServerURLHere 2016-09-18 18:23:06.114477 XCTRunner[1568:332260] Listening on USB

@xudafeng
Copy link

the same

@marekcirkos
Copy link
Contributor

Doy you have any error?
Are you sure device is reachable on your wifi?

@sencho
Copy link
Author

sencho commented Sep 20, 2016

sure!both at the same wifi

@marekcirkos
Copy link
Contributor

I just checked iOS 10.x device and it works fine. Make sure you don't have any networking issues. Your router might be blocking connections etc.

@sencho
Copy link
Author

sencho commented Sep 21, 2016

I make sure networking is fine, because it works fine at iOS 9.3.5 iPhone 6 Plus,so i was confused why my iPhone 6s 10.0.1 was not fine,

@sencho
Copy link
Author

sencho commented Sep 21, 2016

The Runner could be build into iPhone ,but could not inspect through the url

@sencho
Copy link
Author

sencho commented Sep 21, 2016

i try to telnet iPhone's IP with port 8100,is not fine.

@marekcirkos
Copy link
Contributor

I am not sure how I can help you here. Can you try different device on different network?

@183181731
Copy link

XCode Version 8.0 (8A218a)
iPhone6S 10.0.1
same issue

@marekcirkos
Copy link
Contributor

@sencho did you try maybe using usb proxy to talk to device?

@marekcirkos
Copy link
Contributor

@drptbl Wait, this issue is about WDA not working on devices. Your query shows that it is definitely working. You just hit unhandled endpoint.

Mark that "/" is not handled as expected. You should try e.g. "/inspector" instead.

@drptbl
Copy link

drptbl commented Sep 27, 2016

@marekcirkos you're totally right. I'm sorry for bothering you.

@BigWavelet
Copy link

same issue:
Xcode Version 8.0 (8A218a)
IPhone 5s(10.0.2(14A456))
wda can be started, but can not connect to "xxx:8100/inspector".

@marekcirkos
Copy link
Contributor

@BigWavelet make sure you are on the same Wi-Fi network and that network does not block your connections.

@BigWavelet
Copy link

yes. i am sure they are on the same network. and i can ping the ip successfully

@marekcirkos
Copy link
Contributor

I am sorry, but I don't know how I can help you. I checked few times and devices work for us on iOS 10. Only thing I can come up with is your's network configuration may block certain ports or maybe device settings.

@183181731
Copy link

update my issue info, in my network, the pc ip is 192.168.241.195,my ios10 device ip is 172.18.156.69,but they are in the same network. I can ping the ip foreach.my ios9 device ip is 172.18.149.114,when my ios 9 device run wda, it work normal. 172.18.149.114:8100/inspector can be connect. but in ios10 device when I run wda,it can be run ,but 172.18.156.69:8100/inspector cant be connect....is there any different for wda run in different ip section in the same network to ios 10 device?

@sencho
Copy link
Author

sencho commented Oct 9, 2016

@marekcrkos I found a relationship with the iPhone model, the problem is licensed machine in China to support TD-LTE models, such as the A1700 6s,I have tried iPhone 6s/6s Plus/6 Plus all are iOS 10.0.x. please re-verify.

@sixleaves
Copy link

i have got this error....help me!

@sixleaves
Copy link

can i communicate with WD server use socket but http?now there is a bug in communicate between server with client.

@nspassov
Copy link

nspassov commented Oct 12, 2016

I am also having an issue with an iPhone 6 running iOS 10.0.1. Appium establishes connection, WDA app is launched but then minimized and then it just sits waiting. I do not see any errors in the Appium output. Device is accessible at port 8100 and gives this response:

{
  "value" : "Unhandled endpoint: \/ -- http:\/\/192.168.105.114:8100\/ with parameters {\n    wildcards =     (\n        \"\"\n    );\n}",
  "sessionId" : "0E957EBF-EC9D-45C6-8623-866526F203ED",
  "status" : 1
}

The latest output from Appium is:

[Xcode] ▸ Signing /Users/nspassov/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app

[Xcode] MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/f153065cd5137f39055aa0a5cefe30ee/80ced61726a241abf3f2309137db58360b9f7329/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/nspassov/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
    dst_ipa: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa

[Xcode] __MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist

[Xcode] writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist

Any ideas what might be going wrong?

@sixleaves
Copy link

there is a framework called GCDWebServer(https://github.com/swisspol/GCDWebServer), maybe can instead RoutingHTTPServer.with RoutingHTTPServer, i cannot access, but use GCDWebServer i can access.so i suggest using GCDWebServer instead of RoutingHTTPServer.

@marekcirkos
Copy link
Contributor

@nspassov This is unrelated issues, you definitely can reach device, but use bad endpoint. This is expected as we do not handle pain /. Try /inspector instead

@marekcirkos
Copy link
Contributor

@sixleaves You should give it a try, and let us know.

@nspassov
Copy link

@marekcirkos Yes, initially Appium establishes connection, but then it just stops and my test does not run.

@marekcirkos
Copy link
Contributor

@nspassov You should talk to Appium

@sixleaves
Copy link

i found there is a same error in CocoaAsyncSocket framework.but i don't no how to modify.and the error only happend when u use the iphone that licensed machine in China to support TD-LTE models..... @marekcirkos

@lvduoqiang
Copy link

i have the same problem....

@lvduoqiang
Copy link

i test it at iOS9+iphone6、6plus,it can work。
but it don't work at iOS10+iphone7.

@Royshcn
Copy link

Royshcn commented Nov 9, 2016

Any updates about this issue?

I tested 4 real devices.
Two 9.3.4 devices work fine.
10.1 devices still don't work. I use xcode to run the test and no error in the logs. But I can't connect the http://ip:8100/status

@codeskyblue
Copy link

use iproxy is ok with iOS 10

@marekcirkos
Copy link
Contributor

Is this all China iPhones? It is a bit interesting.

@AliNL
Copy link

AliNL commented Nov 10, 2016

Yes, only China iPhones have this problem. I tried iPhones from other countries, they work fine.

@Royshcn
Copy link

Royshcn commented Nov 10, 2016

@codeskyblue can u give me more details about using iproxy or a web link?
thanks.

@marekcirkos marekcirkos changed the title iOS10.0.1 iPhone 6s Device is not work Can't connect via Wifi to iOS10.x devices in China Nov 11, 2016
@marekcirkos
Copy link
Contributor

Added this issues to know issues https://github.com/facebook/WebDriverAgent/wiki/Common-Issues

@codeskyblue
Copy link

@Royshcn see my blog https://testerhome.com/topics/6331

@Royshcn
Copy link

Royshcn commented Nov 11, 2016

@codeskyblue Thanks for your information.

@marekcirkos
Copy link
Contributor

Closing in favour of Wiki - Known issue

@noshuai
Copy link

noshuai commented Apr 1, 2017

@marekcirkos In China iOS 10.x, apple has a new feature, "Apps Using WLAN & Cellular". If app not in this list, it cannot use WLAN. But webdriveragent is XCUITest, not an app. So WDA would not be allowed to use WLAN.

@marekcirkos
Copy link
Contributor

@noshuai Actually all XCUITests are wrapped in separate applications, so you should be able to add it to the list.

@sencho
Copy link
Author

sencho commented Apr 6, 2017

@noshuai relate #288

@lijiarui12
Copy link

@sencho Is solved? I have a same problem, and I don't know how to do?Can u help me ?

@sencho
Copy link
Author

sencho commented May 26, 2017

@lijiarui12 ,not yet,we through USB.

@lijiarui12
Copy link

@sencho ,Thanks for your help, but I have another question.
In my Xcode project about WebDriverAgent, there is no KissXML.framework and Peertalk.framework. I don't know why, how can I get the two framworks? If I no them, I will have the error as following:

2017-05-28 18:12:32.117 XCTRunner[5797:979556] Running tests... 2017-05-28 18:12:32.248 XCTRunner[5797:979556] The bundle “WebDriverAgentRunner” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. 2017-05-28 18:12:32.248 XCTRunner[5797:979556] (dlopen_preflight(/var/containers/Bundle/Application/44174EEE-318B-4E82-8782-597C2CC4330D/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner): Library not loaded: @rpath/KissXML.framework/KissXML Referenced from: /private/var/containers/Bundle/Application/44174EEE-318B-4E82-8782-597C2CC4330D/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/WebDriverAgentLib Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/44174EEE-318B-4E82-8782-597C2CC4330D/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/KissXML.framework/KissXML: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/44174EEE-318B-4E82-8782-597C2CC4330D/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/KissXML.framework/KissXML'
Can you help me?

@marekcirkos
Copy link
Contributor

You need to update WDA. master version does not use them anymore

@lijiarui12
Copy link

@marekcirkos yeah,u'r right.Thank u.

@milkcandylmt
Copy link

@marekcirkos Sorry my English is bad.I use usb proxy to talk to device,The url which talk to device is "localhost:8100",not "DeviceIP:8100".Maybe you can descript it in the page https://github.com/facebook/WebDriverAgent/wiki/USB-support

@lijiarui12
Copy link

@milkcandylmt You need set "capabilities.setCapability("usePrebuiltWDA", true);"in your Java Project. Then use usb proxy to talk to device.

@milkcandylmt
Copy link

@lijiarui12 OK,I'll try it.Thank u.

@Jitu1888
Copy link

Its not relevant to add my question. I think you guys can help me out.
I need to automate ios over wi-fi. Please help me out

@Jitu1888
Copy link

Jitu1888 commented Jul 11, 2017

if i connect lightning connector which has 2's lightening port.
one i can use for my device and one i can connect to sync with MAC. Will this work??????

That connector has the below specification.

@Jitu1888
Copy link

connector

@marekcirkos
Copy link
Contributor

I don't know. Maybe try?

imurchie referenced this issue in appium/WebDriverAgent Nov 16, 2017
Remove ios-webviewapp dep and use uicatalog
@jmei08
Copy link

jmei08 commented Mar 26, 2019

@marekcirkos @noshuai Is there any way to solve it? Our team have to automate over wifi.

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

No branches or pull requests