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

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

@Chris2011 Chris2011 commented Sep 28, 2015

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 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

@Chris2011 Chris2011 commented Sep 29, 2015

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 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

@Chris2011 Chris2011 commented Sep 29, 2015

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 jryans commented Oct 6, 2015

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

@zspitzer
Copy link

@zspitzer zspitzer commented Oct 19, 2015

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

@zspitzer zspitzer commented Oct 19, 2015

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

@past
Copy link
Contributor

@past 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 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

@zspitzer zspitzer commented Oct 19, 2015

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

@jryans
Copy link
Contributor

@jryans 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

@zspitzer zspitzer commented Oct 19, 2015

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

@zspitzer zspitzer commented Oct 25, 2015

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

@zspitzer zspitzer commented Nov 19, 2015

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 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 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

@JoshWillik JoshWillik commented Dec 4, 2015

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 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

@JoshuaKGoldberg JoshuaKGoldberg commented Feb 2, 2016

:( 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 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.

@ghost
Copy link

@ghost ghost 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 zspitzer commented Mar 8, 2016

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

@jryans
Copy link
Contributor

@jryans jryans commented Mar 8, 2016

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

@ghost
Copy link

@ghost ghost 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

@Chris2011 Chris2011 commented Apr 8, 2016

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

@ghost
Copy link

@ghost ghost commented Apr 8, 2016

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

@mherchel
Copy link

@mherchel mherchel commented Apr 14, 2016

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

@zspitzer zspitzer commented Apr 14, 2016

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

@zspitzer zspitzer commented Apr 14, 2016

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

@jryans
Copy link
Contributor

@jryans 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 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 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

@jimblandy jimblandy commented Jul 25, 2016

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

@Chris2011 Chris2011 commented Jul 27, 2016

In which version will it be available?

@jimblandy
Copy link
Contributor

@jimblandy jimblandy commented Jul 28, 2016

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

@jimblandy jimblandy commented Jul 28, 2016

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

@jimblandy jimblandy closed this Jul 28, 2016
@jryans
Copy link
Contributor

@jryans 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

@glantucan glantucan commented Aug 29, 2016

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 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 r2b2s commented Sep 1, 2016

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

@r2b2s
Copy link

@r2b2s r2b2s commented Sep 1, 2016

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

@Chris2011
Copy link
Author

@Chris2011 Chris2011 commented Sep 27, 2016

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 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

@mherchel mherchel commented Nov 15, 2016

@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 :(

@ghost
Copy link

@ghost ghost commented Nov 15, 2016

@SyntaxWarrior Thank you very much, it works !

@davidjb
Copy link

@davidjb 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 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

@marcysutton marcysutton commented Mar 16, 2017

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 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

@marcysutton marcysutton commented Mar 16, 2017

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 artygus commented Mar 16, 2017

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

@marcysutton
Copy link

@marcysutton marcysutton commented Mar 16, 2017

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 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

@Chris2011 Chris2011 commented Oct 8, 2019

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

@Chris2011 Chris2011 closed this Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.