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 · 22 comments

Comments

Projects
None yet
3 participants
@srigney
Copy link

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

This comment has been minimized.

Copy link
Collaborator

artygus commented Oct 16, 2017

could you please do ios_webkit_debug_proxy -V?

@srigney

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

artygus commented Oct 16, 2017

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

@srigney

This comment has been minimized.

Copy link

srigney commented Oct 16, 2017

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

@artygus

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

artygus commented Oct 16, 2017

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

@artygus

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

artygus commented Oct 16, 2017

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

@srigney

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

artygus commented Oct 16, 2017

does Safari app on desktop can see your apps UIWebViews?

@srigney

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

artygus commented Oct 16, 2017

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

@srigney

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

DewanshuAwasthi commented Oct 18, 2017

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

@srigney

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

srigney commented Oct 23, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment