Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Valence doesn't work for connected iOS 9 devices #199

Closed
Chris2011 opened this issue Sep 28, 2015 · 55 comments
Closed

Valence doesn't work for connected iOS 9 devices #199

Chris2011 opened this issue Sep 28, 2015 · 55 comments

Comments

@Chris2011
Copy link

Hey folks, yesterday at the jsconf.eu in berlin, I saw a very nice talk about valence and the WebIDE inside firefox, so I wanted to test it with an iphone6 with ios9 and a windows 10 pc. I connected the phone with a cable to my laptop, I opened the WebIDE in firefox 41 and choose "safari, firefox and other webview on ios". It loads and after this, the smartphone icon is blue. After round about 5 seconds it jumps back to "Laufzeitumgebung auswählen". The Web-inspector is available on the iOS. Did I make anything wrong?

Cheers,

Chris

@jryans
Copy link
Contributor

jryans commented Sep 28, 2015

Let's check a few more things.

  • Did you have a tab open in Safari on the iPhone before trying to connect?
  • Is Settings -> Safari -> Advanced -> Web Inspector enabled?

@Chris2011
Copy link
Author

With available I meant enabled, sry for that. So yes the inspector is enabled. And yes I have an open site.

@past
Copy link
Contributor

past commented Sep 29, 2015

There must be some error messages in the Browser Cnsole (Ctrl-Shift-J) after this. Could you paste them here?

@Chris2011
Copy link
Author

Here it is:

08:13:32.448 valence:PowerShell -Command ps ios-webkit-debug-proxy: I ios-proxy.js:200
08:13:32.490 Connection status changed: connecting app-manager.js:162
08:13:32.512 Connection status changed: connected app-manager.js:162
08:13:33.665 valence:ios-webkit-debug-proxy.exe: connect ios-proxy.js:137
08:13:33.668 valence:ios-webkit-debug-proxy.exe: : No error

Could not set socket to non-blocking: No error

Unable to subscribe to device add/remove events

 ios-proxy.js:137
08:13:36.609  protocol.js:907
08:13:39.679  protocol.js:907
08:13:39.689 Connection status changed: disconnecting app-manager.js:162
08:13:39.697 Connection status changed: disconnected app-manager.js:162
08:13:39.702 unknownError Promise-backend.js:925

@jryans
Copy link
Contributor

jryans commented Oct 6, 2015

@past, is that an error you recall from working on the Windows setup?

@zspitzer
Copy link

I'm seeing exactly the same problem Win 7 x64 with an iPad and FF 41,
this was all working fine on Friday. I have also got the Developer edition installed
which wasn't working on Friday, whilst my normal FF version was, today neither
are working. I have tried rebooting both my desktop and iPad, but that didn't help

BTW as this is a developer tool, have you considered showing these logs in the WebIDE window?

@zspitzer
Copy link

I tried yet another reboot and WebIDE under FF 41 worked again

@past
Copy link
Contributor

past commented Oct 19, 2015

I have seen the "Could not set socket to non-blocking" messages in the distant past, but never figured out what caused them and they were always intermittent.

@jryans
Copy link
Contributor

jryans commented Oct 19, 2015

Okay, I am also seeing some intermittent behavior with an iOS 9 device here.

Looking at the recent commits such as in google/ios-webkit-debug-proxy@fec01df, we may need to update some libraries for this to work well with iOS 9, as I was not always able to connect to the device at all. Having said that, there is no reason given for why they needed libplist 1.12 suddenly or what issues it solves other than "for iOS9".

Even when I did connect, the tabs usually were not shown.

If I switch between tabs, I get messages like

Unknown app_id PID:7317
Invalid message _rpc_applicationSentListing:

which is the same as shown in google/ios-webkit-debug-proxy#116. At first glance, this suggests to me Apple may have changed to put each tab in a separate process in iOS 9 or something like this, which could require updates to the proxy code.

More investigation is needed here.

@jryans jryans changed the title WebIDE Valence doesn't work for connected iPhone device. Valence doesn't work for connected iOS 9 devices Oct 19, 2015
@zspitzer
Copy link

Sorry, I failed to mention I experienced the same problem using 8.4.1

@jryans
Copy link
Contributor

jryans commented Oct 19, 2015

@zspitzer Are you able to connect to the device (blue phone symbol shown), but then see no tabs listed, or does the connection step fail for you as well?

Do you have the same Browser Console logs as @Chris2011 pasted above?

@zspitzer
Copy link

I get exactly the same logs, it connects briefly, I see the blue symbol, then it goes back to Select runtime (more feedback would be nice). This problem is intermittent, but I am experiencing it now, happy to do any testing to help :)

@zspitzer
Copy link

with net logging enabled in the browser console, I'm seeing a XHR to
http://localhost:9230/json which isn't getting a response

@zspitzer
Copy link

one other thing, it doesn't work thru a USB hub, remove the USB hub (same use port) and it works fine

@ric81
Copy link

ric81 commented Nov 19, 2015

Are there any more updates on this issues. I am also seeing some intermittent behavior with an iOS 9 device. Same behavior as Jsryans explained in his post. Any fix for this ?

valence:PowerShell -Command ps ios-webkit-debug-proxy: W ios-proxy.js:200
Connection status changed: connecting app-manager.js:162
Connection status changed: connected app-manager.js:162
valence:ios-webkit-debug-proxy.exe: connect ios-proxy.js:137
valence:ios-webkit-debug-proxy.exe: : No error

Could not set socket to non-blocking: No error

ios-proxy.js:137
valence:ios-webkit-debug-proxy.exe: Unable to subscribe to device add/remove events

ios-proxy.js:137
protocol.js:907
Connection status changed: disconnecting app-manager.js:162
Connection status changed: disconnected app-manager.js:162
unknownError Promise-backend.js:937
valence:PowerShell -Command ps ios-webkit-debug-proxy: W ios-proxy.js:200
Connection status changed: connecting app-manager.js:162
Connection status changed: connected app-manager.js:162
valence:ios-webkit-debug-proxy.exe: connect ios-proxy.js:137
valence:ios-webkit-debug-proxy.exe: : No error

Could not set socket to non-blocking: No error

ios-proxy.js:137
valence:ios-webkit-debug-proxy.exe: Unable to subscribe to device add/remove events

ios-proxy.js:137
protocol.js:907
Connection status changed: disconnecting app-manager.js:162
Connection status changed: disconnected app-manager.js:162
unknownError Promise-backend.js:937

@jryans
Copy link
Contributor

jryans commented Nov 19, 2015

Right now I think we just need someone to dive in and spot what's going wrong. It's hard to do with iOS, though, since we're reverse engineering undocumented things in some cases.

I'm hopeful this can happen soonish.

@JoshWillik
Copy link

I'm also having trouble connecting to an IOS 9.1 device on Windows 7. Here is a screenshot of the browser console.

screenshot

@jpetto
Copy link

jpetto commented Dec 30, 2015

Including more console data in hopes of finding a fix.

  • OS X 10.11.2
  • iOS 9.2
  • Dev Edition 45.0a2 (2015-12-30)

No tabs are ever shown in WebIDE. FWIW, iOS simulator seems to work fine.

screen shot 2015-12-30 at 11 15 07 am

@JoshuaKGoldberg
Copy link

:( was this ever resolved? Getting the same errors now, with iOS 9.2 & Firefox 46.0a2 & Valence 0.3.4 & ADB Helper 0.8.6.

The device is recognized in iTunes, has been web dev unlocked, and tabs in both Firefox and Safari. No go in WebIDE.

Edit: Switched for an iPad running iOS 8.1 and it worked.

image

image

@jryans
Copy link
Contributor

jryans commented Feb 3, 2016

This is still unsolved for iOS 9.x AFAIK. I believe it requires reverse engineering some changes to the undocumented protocol iOS devices use, which could take a lot of time. I am not sure when we'll be able to focus on this, but definitely we do want to fix it.

@effetb
Copy link

effetb commented Mar 8, 2016

Hi,
I'm using windows 10 pro, firefox developper edition (46.0a2 (2016-03-06)) and valence 0.3.5 but I can't connect to my ipad mini or iphone 6s, both are on ios 9.2.1.
Here is the screenshot of the browser console :
capture

Can you please help me ?
It works ok on my macbook with same versions.

Regards

@zspitzer
Copy link

zspitzer commented Mar 8, 2016

@effetb did your iOS device ask you to trust your computer?

@jryans
Copy link
Contributor

jryans commented Mar 8, 2016

@effetb Do you have iTunes installed on Windows? Some support libraries from iTunes are needed on Windows.

@effetb
Copy link

effetb commented Mar 9, 2016

@zspitzer it didn't asked this time, but it already did in the past, I can access my device in windows explorer
@jryans yes I have iTunes installed, I tried to reinstall last version but no luck, the apple mobile device service is running

@Chris2011
Copy link
Author

Any news here? Still happen with an iPad with 9.3...

@effetb
Copy link

effetb commented Apr 8, 2016

Not working with 9.3.1 on my iphone 6s or my 9.3.1 Ipad

@mherchel
Copy link

Same issue with me

  • Iphone 6 running IOS 9.3
  • OS 10.11

I tried an earlier version of FF (38), but that doesn't seem to make a difference.

@zspitzer
Copy link

I have a new desktop running Win 10 pro X64, I can see Safari tabs on my iPad running 9.3.1, but I can't see access my WebViews under Firefox 3.0 or Chrome 49, is this something to do with both of those browser wrappers switching to WKWebView?

@zspitzer
Copy link

that sucks, the WebIDE UI needs updating to reflect this?

@jryans
Copy link
Contributor

jryans commented Apr 14, 2016

that sucks, the WebIDE UI needs updating to reflect this?

Mmm, perhaps, but let's discuss this in a separate issue or bug. The current name is more about the technical possibility of connecting to web views, even if it means only apps built locally. As in, people developing the Firefox for iOS app itself, say. Anyway, I see how it's not very clear at the moment.

@mherchel
Copy link

mherchel commented Jul 5, 2016

@jryans is there any info that you need, or anything that I can do to help you debug?

@jryans
Copy link
Contributor

jryans commented Jul 5, 2016

@jryans is there any info that you need, or anything that I can do to help you debug?

I think at this point someone needs to dive in and find the root cause. I would suspect it's an issue in the upstream libraries we used to connect to iOS on Windows. It may already be fixed in a existing release and we may need to update the version we use.

@jimblandy
Copy link
Contributor

I've merged #221. Can someone with a Windows box give the new master a spin and see if it's any better?

@Chris2011
Copy link
Author

In which version will it be available?

@jimblandy
Copy link
Contributor

We want to update the iOS proxy for the other operating systems as well, and then we'll push a new version of the add-on. Firefox should pick that up automatically; it's not tied to FF releases.

@jimblandy
Copy link
Contributor

Filed issue #222 to update the other proxies and push a new version of the add-on.

@jryans
Copy link
Contributor

jryans commented Jul 28, 2016

@jimblandy, I don't think we want to close this issue yet? It's probably best to wait until we have a version available for testing, and then get some of the people here to check it out first. It could be that we haven't fixed the problem.

@jryans jryans reopened this Jul 28, 2016
@glantucan
Copy link

Hi, this is not working yet for Valence version 0.3.5 version. At least not for me on Firefox 48.02.
I'm trying to debug a web for Safari on iOS 9.3.5

@r2b2s
Copy link

r2b2s commented Sep 1, 2016

Hi, i'm on same things. Valence 0.3.5 FF 48.02 and iOS 9.3.5 and it's not working. I've just update my iOS and i've just tride WebIDE last few days (before this update) and it's worked...
valence will be updated ? Thank

@r2b2s
Copy link

r2b2s commented Sep 1, 2016

I've just restart my iOS and it's worked like a charm...;)

@r2b2s
Copy link

r2b2s commented Sep 1, 2016

:( sorry not exactly i've lost again tabs list and no way...?

@Chris2011
Copy link
Author

Still the same problem with 49.0.1 and an iPad with 9.3.3, but no error inside the console. And my device will not shown in the WebIDE. Only: Can't see your device? But Web information (Web Inspector) is enabled on the iPad and the device is connected to my computer and I can navigate through it via file explorer.

@SyntaxWarrior
Copy link

SyntaxWarrior commented Nov 15, 2016

I got this to work just fine on a updated iOS device with Windows 10. Wrote a guide for what I did here:
http://syntaxwarriors.com/p/17/Debug-Safari-on-iOS-using-Windows-10-and-Firefox

TLDR, use Chrome Desktop in WebIDE and not the Safari button

@mherchel
Copy link

@SyntaxWarrior Nice. I tried selecting "Chrome Desktop" when using Mac, and it didn't work.

I'm also confirming it doesn't work with IOS10 :(

@effetb
Copy link

effetb commented Nov 15, 2016

@SyntaxWarrior Thank you very much, it works !

@davidjb
Copy link

davidjb commented Dec 21, 2016

With FF 51.0a2 in Ubuntu 16.10 and iOS 9.0.2, I'm seeing this:

valence:ios_webkit_debug_proxy: Could not connect to lockdownd. Exiting.: Operation now in progress
Unable to attach [device ID] inspector ios-proxy.js:137
Connection status changed: connecting  app-manager.js:159
Connection status changed: connected  app-manager.js:159
  protocol.js:906
  protocol.js:906
Connection status changed: disconnecting  app-manager.js:159
Connection status changed: disconnected

Seems the same error as google/ios-webkit-debug-proxy#142 or google/ios-webkit-debug-proxy#38.

@artygus
Copy link
Contributor

artygus commented Jan 12, 2017

to make ios-webkit-debug-proxy work with iOS 10, you need to build libimobiedevice from master, because 1.2.1 is not marked for release just yet (for windows there's a prebuilt version available, but only x64 binaries as @SyntaxWarrior pointed out in his tutorial)

@marcysutton
Copy link

Confirming I'm having an issue with Valence and iOS 10.1.1. I've connected to WebIDE before, but now I'm getting a permissions error even after hitting "Trust". Does anyone know of a way to trigger that permissions dialog again to make sure I hit the right button? :)

Here's the relevant part of my stack trace:

Connection status changed: connecting  app-manager.js:159
Connection status changed: connected  app-manager.js:159
  protocol.js:908
valence:ios_webkit_debug_proxy: Could not connect to lockdownd. Exiting.: Permission denied
Unable to attach 8a2a6439e5ce00dc2f67a3c191335518eb874941 inspector
  ios-proxy.js:137
  protocol.js:908
Connection status changed: disconnecting  app-manager.js:159
Connection status changed: disconnected

@artygus
Copy link
Contributor

artygus commented Mar 16, 2017

@marcysutton you probably need to update libimobiledevice to master version or you could have wrong permissions on /var/db/lockdown folder. Similar discussion google/ios-webkit-debug-proxy#160

@marcysutton
Copy link

Thanks for the quick reply. How do I do that as a consumer of WebIDE in Firefox? I'm not building anything manually with Valence or ios-webkit-debug-proxy.

@artygus
Copy link
Contributor

artygus commented Mar 16, 2017

@marcysutton oh I see, valence has prebuilt binaries shipped. What platform do you use?

@marcysutton
Copy link

I'm on Mac OS 10.11.6 (El Capitan), I tested it with Firefox 50 and Nightly. I was able to retrigger the permissions prompt by restarting my device, but I had the same result after hitting "Trust". Permission de-nied.

@artygus
Copy link
Contributor

artygus commented Mar 16, 2017

@marcysutton it's a poor error handling in ios-webkit-debug-proxy that confuses you, error comes from libimobiledevice call to usbmuxd service and permission denied happens on socket call

brew update
brew install --HEAD libimobiledevice ios-webkit-debug-proxy

then navigate to < valence-path >/tools/mac64 and cleanup directory, then symlink /usr/local/bin/ios_webkit_debug_proxy to that folder, it should help

@Chris2011
Copy link
Author

Unfortunately this great project seems dead now. Anyway, thx for the work :)

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