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

iOS real device unable to see web views using newest versions of ios-webkit-debug-proxy, iOS, Xcode and Appium #229

Closed
srigney opened this issue Oct 16, 2017 · 23 comments

Comments

@srigney
Copy link

@srigney srigney commented Oct 16, 2017

The problem

I recently received a new Mac and now the iOS automation can no longer see web views on the iPhone.

Environment

  • ios-webkit-debug-proxy version: 1.8
  • Appium version (or git revision) that exhibits the issue: 1.7.1
  • Last Appium version that did not exhibit the issue (if applicable): 1.6.4
  • Desktop OS/version used to run Appium: iOS 10.12.6
  • Node.js version (unless using Appium.app|exe): 6.10.3
  • Mobile platform/version under test: 11.0
  • Real device or emulator/simulator: Real device
  • Appium CLI or Appium.app|exe: CLI

Details

Our iOS automation has been running fine for the past year. We recently received a new Mac laptop with newer versions of iOS and Xcode. So I also had to update our iPhone 6 to iOS 11. Once this was all done I am no longer able to see web views. I do have the iOS-webkit-debug-proxy running also.

The app is launched successfully but fails when no webviews are found.

Link to Appium logs

https://gist.github.com/srigney/4eb055ad5115b4e27a384a6a1cb01b69

Code To Reproduce Issue [ Good To Have ]

Caps:
DeviceName iPhone 6
PlatformName iOS
PlatformVersion 11.0
automationName XCUITest
REMOTE_URL http://localhost:4723/wd/hub
UDID 59c540e7e9c8d630c0f240bee7305cc82e70ace0
autoWebview True (I didn't used to have this set, but some of the discussions said to try this)

I'm also sending the xcodeOrgId and the xcodeSigningId

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

could you please do ios_webkit_debug_proxy -V?

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

Here you go...
mydrive$ ios_webkit_debug_proxy -V
ios_webkit_debug_proxy 1.8
Built with libimobiledevice v1.2.0, libplist v2.0.0

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

you need to rebuild utility with latest libimobiledevice, 1.2.1 in development ~2yrs now and contains changes needed for latest iOS versions, but still not marked for release 🙁

brew update
brew reinstall --HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy
@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

ok, I did all that and I'm still getting the same results.
mydrive$ ios_webkit_debug_proxy -V
ios_webkit_debug_proxy 1.8
Built with libimobiledevice v1.2.1, libplist v2.0.0

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

Are you sure apps build config is correct, there were a couple of similar issues like #190

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

Not sure since there is no detail about what app build config was causing the issue.

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

just in case, did you do Settings > Safari > Advanced > Web Inspector = ON step after iOS update on the device?

if you run ios_webkit_debug_proxy independently, can you see any web views on http://localhost:9221?

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

The Safari web inspector is on but when I go to http://localhost:9221 I get Safari can't connect to the server. If I go to localhost:27753 I get 'Inspectable pages for iPhone:'

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

But no pages listed?
PS. by independently I meant running ios_webkit_debug_proxy in terminal, without appium

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

what if you navigate to whatever site in Safari, does iwdp show any pages? If so I think it is app misconfiguration

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

No pages listed.
If I open a page in Safari I am able to see it by going to http://localhost:27753.

Can you give me any ideas of what app config can cause this?

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

More info, not sure if it matters. The app I am launching is built through Phone Gap and it has a .app extension (as opposed to ipa).

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

the issue could be related to provisioning profile, e.g. distribution profile doesn't allow debugging

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

The app is using a Developer signing certificate and it is being installed on the device via Appium. This step will fail if the app isn't signed with a dev cert.

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

does Safari app on desktop can see your apps UIWebViews?

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

Do you mean opening Safari browser on the laptop and navigating to the website or opening localhost in safari to see app on device?

@artygus
Copy link
Collaborator

@artygus artygus commented Oct 16, 2017

Safari browser -> Develop menu -> Your device -> any webviews?

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

I can see the device is connected but I don't see any webviews, not even when I open a webpage in safari on the device.

@srigney
Copy link
Author

@srigney srigney commented Oct 16, 2017

This might be a signing issue, I will update after I research more. The app is not showing up on the device under Settings/General/Device Management/Developer App, it is showing under the Enterprise App section. It still seems like it is signed correctly since Appium is able to install the app, but I am looking into it.

@DewanshuAwasthi
Copy link

@DewanshuAwasthi DewanshuAwasthi commented Oct 18, 2017

Hi are u able to solve the problem?
we are also facing the exact issue

@srigney
Copy link
Author

@srigney srigney commented Oct 18, 2017

No, the dev is still looking into the provisioning profile. I am also unable to access Native elements in the simulator, which has nothing to do with a provisioning profile.

@srigney
Copy link
Author

@srigney srigney commented Oct 23, 2017

This was a signing issue (provisioning profile) with the app, you can close.

@sumitgos
Copy link

@sumitgos sumitgos commented Nov 14, 2019

AutomationiMac:~ automation_svc$ ios_webkit_debug_proxy -c 3b5d0182e94c882e5f4bd220a513716a7b65494d:27753 -d
ss.add_fd(3)
ss.recv fd=3 len=1147
ss.add_server_fd(4)
ss.add_fd(6)
wi.send_packet[174]:
00 00 00 AA 62 70 6C 69 73 74 30 30 D2 01 03 02 04 5A 5F ....bplist00.....Z_
5F 73 65 6C 65 63 74 6F 72 5F 10 16 5F 72 70 63 5F 72 65 selector..rpc_re
70 6F 72 74 49 64 65 6E 74 69 66 69 65 72 3A 5A 5F 5F 61 portIdentifier:Z__a
72 67 75 6D 65 6E 74 D1 05 06 5F 10 1A 57 49 52 43 6F 6E rgument...
..WIRCon
6E 65 63 74 69 6F 6E 49 64 65 6E 74 69 66 69 65 72 4B 65 nectionIdentifierKe
79 5F 10 24 42 41 31 37 35 32 32 30 2D 42 37 45 32 2D 34 y_.$BA175220-B7E2-4
30 41 44 2D 39 45 38 36 2D 45 38 46 38 31 37 32 32 46 46 0AD-9E86-E8F81722FF
43 30 08 0D 18 31 3C 3F 5C 00 00 00 00 00 00 01 01 00 00 C0...1<?..........
00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 ...................
00 00 83 ...
ss.recv fd=3 len=773
ss.recv fd=6 len=0
ss.remove_fd(6)
Unable to connect to iPhone (3b5d0182e94c882e5f4bd220a513716a7b65494d)
Please verify that Settings > Safari > Advanced > Web Inspector = ON
ss.remove_server_fd(4)

any solution ?

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

Successfully merging a pull request may close this issue.

None yet
4 participants