Safari Web inspector keeps disconnectingTrying to debug a web site on iPad, but the device doesn't appear under Develop menu in Safari on my MacSafari Developer Tools: How to Preserve Console Log Upon Navigation?Why Safari shows “No Inspectable Applications” during remote debugging with iOS 6 device?iPad is not showing in Develop menu on OSX SafariDisable safari web-inspectorSafari Web Inspector not working with iOS SimulatoriPhone not appearing in Develop menu in SafariSafari Web Inspector network throttlingInspect an app from ipad using Safari Web InspectorWeb Inspector on Mac is empty when connected to iPad
Is it acceptable to use working hours to read general interest books?
Why do games have consumables?
Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?
All ASCII characters with a given bit count
Retract an already submitted recommendation letter (written for an undergrad student)
Complex numbers z=-3-4i polar form
What is the term for a person whose job is to place products on shelves in stores?
What is this word supposed to be?
`microtype`: Set Minimum Width of a Space
How to find if a column is referenced in a computed column?
What is purpose of DB Browser(dbbrowser.aspx) under admin tool?
Why do distances seem to matter in the Foundation world?
Why did C use the -> operator instead of reusing the . operator?
How to pronounce 'c++' in Spanish
Older movie/show about humans on derelict alien warship which refuels by passing through a star
How do I reattach a shelf to the wall when it ripped out of the wall?
How do I produce this symbol: Ϟ in pdfLaTeX?
Co-worker works way more than he should
How important is it that $TERM is correct?
What is the best way to deal with NPC-NPC combat?
How to have a sharp product image?
Can I criticise the more senior developers around me for not writing clean code?
Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?
As an international instructor, should I openly talk about my accent?
Safari Web inspector keeps disconnecting
Trying to debug a web site on iPad, but the device doesn't appear under Develop menu in Safari on my MacSafari Developer Tools: How to Preserve Console Log Upon Navigation?Why Safari shows “No Inspectable Applications” during remote debugging with iOS 6 device?iPad is not showing in Develop menu on OSX SafariDisable safari web-inspectorSafari Web Inspector not working with iOS SimulatoriPhone not appearing in Develop menu in SafariSafari Web Inspector network throttlingInspect an app from ipad using Safari Web InspectorWeb Inspector on Mac is empty when connected to iPad
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I've Safari 8.0.6 with iOS 8.3 on my iPad, while debugging through Web Inspector on my Mac (10.10.3), the connection keeps on disconnecting (I don't see the device name under Develop menu upon disconnection) but can resume if I quit safari followed by a relaunch then I'm able to refresh and inspect remotely again.
debugging safari yosemite safari-web-inspector
|
show 2 more comments
I've Safari 8.0.6 with iOS 8.3 on my iPad, while debugging through Web Inspector on my Mac (10.10.3), the connection keeps on disconnecting (I don't see the device name under Develop menu upon disconnection) but can resume if I quit safari followed by a relaunch then I'm able to refresh and inspect remotely again.
debugging safari yosemite safari-web-inspector
1
This seems to be a very common problem. Some people have suggested changing the cable, I have not had any luck with that though. When this happens to me I just unplug and replug the cable in the iPad, it is a bit quicker and slightly less annoying than restarting Safari.
– enifeder
Jul 9 '15 at 4:18
1
@enifeder thanks for the comment, and yes changing cable didn't help me either, I was wondering earlier if there's some javascript error that breaks the connection
– user2727195
Jul 9 '15 at 17:43
3
Happens to everyone constantly. It's a Safari bug.
– Kirill E.
Sep 8 '15 at 16:49
3
It appears this issue has been resolved with the release of Safari 9.0. I was experiencing the issue repeatedly yesterday but after installing Safari 9.0 today I haven't seen Safari disconnect while debugging my cordova app
– jandersen
Oct 1 '15 at 15:45
2
I am experiencing this with Safari 10.0...
– shi11i
Feb 1 '17 at 16:21
|
show 2 more comments
I've Safari 8.0.6 with iOS 8.3 on my iPad, while debugging through Web Inspector on my Mac (10.10.3), the connection keeps on disconnecting (I don't see the device name under Develop menu upon disconnection) but can resume if I quit safari followed by a relaunch then I'm able to refresh and inspect remotely again.
debugging safari yosemite safari-web-inspector
I've Safari 8.0.6 with iOS 8.3 on my iPad, while debugging through Web Inspector on my Mac (10.10.3), the connection keeps on disconnecting (I don't see the device name under Develop menu upon disconnection) but can resume if I quit safari followed by a relaunch then I'm able to refresh and inspect remotely again.
debugging safari yosemite safari-web-inspector
debugging safari yosemite safari-web-inspector
edited Jul 7 '18 at 16:25
Shashank Agrawal
15.1k74169
15.1k74169
asked Jul 6 '15 at 17:23
user2727195user2727195
2,29964376
2,29964376
1
This seems to be a very common problem. Some people have suggested changing the cable, I have not had any luck with that though. When this happens to me I just unplug and replug the cable in the iPad, it is a bit quicker and slightly less annoying than restarting Safari.
– enifeder
Jul 9 '15 at 4:18
1
@enifeder thanks for the comment, and yes changing cable didn't help me either, I was wondering earlier if there's some javascript error that breaks the connection
– user2727195
Jul 9 '15 at 17:43
3
Happens to everyone constantly. It's a Safari bug.
– Kirill E.
Sep 8 '15 at 16:49
3
It appears this issue has been resolved with the release of Safari 9.0. I was experiencing the issue repeatedly yesterday but after installing Safari 9.0 today I haven't seen Safari disconnect while debugging my cordova app
– jandersen
Oct 1 '15 at 15:45
2
I am experiencing this with Safari 10.0...
– shi11i
Feb 1 '17 at 16:21
|
show 2 more comments
1
This seems to be a very common problem. Some people have suggested changing the cable, I have not had any luck with that though. When this happens to me I just unplug and replug the cable in the iPad, it is a bit quicker and slightly less annoying than restarting Safari.
– enifeder
Jul 9 '15 at 4:18
1
@enifeder thanks for the comment, and yes changing cable didn't help me either, I was wondering earlier if there's some javascript error that breaks the connection
– user2727195
Jul 9 '15 at 17:43
3
Happens to everyone constantly. It's a Safari bug.
– Kirill E.
Sep 8 '15 at 16:49
3
It appears this issue has been resolved with the release of Safari 9.0. I was experiencing the issue repeatedly yesterday but after installing Safari 9.0 today I haven't seen Safari disconnect while debugging my cordova app
– jandersen
Oct 1 '15 at 15:45
2
I am experiencing this with Safari 10.0...
– shi11i
Feb 1 '17 at 16:21
1
1
This seems to be a very common problem. Some people have suggested changing the cable, I have not had any luck with that though. When this happens to me I just unplug and replug the cable in the iPad, it is a bit quicker and slightly less annoying than restarting Safari.
– enifeder
Jul 9 '15 at 4:18
This seems to be a very common problem. Some people have suggested changing the cable, I have not had any luck with that though. When this happens to me I just unplug and replug the cable in the iPad, it is a bit quicker and slightly less annoying than restarting Safari.
– enifeder
Jul 9 '15 at 4:18
1
1
@enifeder thanks for the comment, and yes changing cable didn't help me either, I was wondering earlier if there's some javascript error that breaks the connection
– user2727195
Jul 9 '15 at 17:43
@enifeder thanks for the comment, and yes changing cable didn't help me either, I was wondering earlier if there's some javascript error that breaks the connection
– user2727195
Jul 9 '15 at 17:43
3
3
Happens to everyone constantly. It's a Safari bug.
– Kirill E.
Sep 8 '15 at 16:49
Happens to everyone constantly. It's a Safari bug.
– Kirill E.
Sep 8 '15 at 16:49
3
3
It appears this issue has been resolved with the release of Safari 9.0. I was experiencing the issue repeatedly yesterday but after installing Safari 9.0 today I haven't seen Safari disconnect while debugging my cordova app
– jandersen
Oct 1 '15 at 15:45
It appears this issue has been resolved with the release of Safari 9.0. I was experiencing the issue repeatedly yesterday but after installing Safari 9.0 today I haven't seen Safari disconnect while debugging my cordova app
– jandersen
Oct 1 '15 at 15:45
2
2
I am experiencing this with Safari 10.0...
– shi11i
Feb 1 '17 at 16:21
I am experiencing this with Safari 10.0...
– shi11i
Feb 1 '17 at 16:21
|
show 2 more comments
9 Answers
9
active
oldest
votes
There are a few things to try:
1. Test on the Xcode Simulator:
Open the iPhone simulator in Xcode and debug there with Safari Web Inspector.
Sidenote: Maybe you need to download the Safari Technology Preview
2. Reset your location and privacy settings on your device.
Settings > General > Reset > Reset Location & Privacy
3. Debugging on a real device
With this configuration it seems to work right now.
iPhone X, iOS Version 12.1.3
macOS Mojave Version 10.14.2 (18C54)
Safari Version 12.0.2 (14606.3.4)
For other devices / versions, please read further down (Maybe you can decrease your build size).
EDIT: 2018.09.20
@Chet found out, the Web Inspector keeps disconnecting for too large JS files and map files
https://stackoverflow.com/a/52338231/4641479
Issue on Github:
https://github.com/google/ios-webkit-debug-proxy/issues/275
https://github.com/google/ios-webkit-debug-proxy/issues/274
I could confirm this on a real device with a production build (1.8 MB + 2.4 MB files), the Safari Web Inspector stays always connected.

Since for the development build it is not:

Before my web inspector very rarely worked and often just stopped working - but was still open. After the safari update the web inspector opens and closes immediately. If you encounter such problems..
This will work:
Step 1. Get the latest Safari Browser
Safari: 11.1 (12605.1.33.1.2)
https://developer.apple.com/safari/download
macOS Sierra and OS X El Capitan (I assume macOS high Sierra is also supported)
Maybe you need to download the Safari Technology Preview
Step 2. Reset your location and privacy settings
On your device go to:
Settings > General > Reset > Reset Location & Privacy
Source: https://forums.developer.apple.com/thread/87181
Step 3. Connect your device
Open Safari on OS X
If you had connected your iPhone device with an usb cable, disconnect it first.
Now plug it in.
On OS X Safari go to:
Develop > Device name > Apply for development
Now on your phone there is a permission question. Choose trust and now you can choose the open tab on your devices safari and debug.
Happy debug!
Now the web inspector stays connected.
5
I thank you so much really!! Step 2. worked for me like charm <3
– Mohammad Kawsara
May 5 '18 at 21:27
1
Worked for the first time but after that same problem again.
– Shashank Agrawal
Jul 7 '18 at 16:06
stackoverflow.com/a/51224913/694609 Emptying Cache fixed this problem for me!
– Luke
Dec 4 '18 at 17:30
There is no "Developers" menu item for OSX Safari
– AlxVallejo
Mar 12 at 16:29
@AlxVallejo Go to Preferences -> Click on the Advanced Tab -> Down thereShow Develop Menu in Menu Bar(If you meant my misspelling, you could've just corrected it, translation mistake - my safari browser is not english) Here are pictures: osxdaily.com/2011/11/03/enable-the-develop-menu-in-safari
– Stefan Rein
Mar 13 at 5:46
|
show 1 more comment
Most of the answers listed here worked for me for a while but after a few hours they also stopped working and my Safari web console again keeps disconnecting as it opens.
Other few options that worked for me:
Option 1 - Empty Cache From Safari
Safari on MacOS -> Develop -> Empty Cache
Option 2 - Clear Trusted Computers
On iOS Device -> Settings -> Developer -> Clear Trusted Computers then reconnect the USB cable and then try to debug again
Option 3 - Make the debugger fool (as of 14th Jan 2019)
This solution is working for a long time now. Since this is an issue related to connection between iOS & Mac so I opened my Console app and just kept my iPhone selected. (This is somehow kept my iOS device connected to my Mac)
Then opening the Developer's console on Safari worked fine for me without disconnecting.
1
it's strange, but empty cache solved it in my case
– ruucm
Aug 23 '18 at 1:18
1
Emptying the cache fixed it for me too.
– Luke
Dec 4 '18 at 17:26
1
The third option seems the most reliably for me so far.
– OJ7
Jan 31 at 17:16
3rd one is guaranteed. Console is available on your macOS, use spotlight.
– sandaru.ny
Mar 8 at 13:09
add a comment |
Sounds strange but it may be happening due to the battery being full triggering a disconnect: https://forums.developer.apple.com/thread/92290
The disconnection seems to occur when the battery of the Iphone is full. (So for the moment we turn the flash and the camera on to kill the battery while inspecting ...)
This is likely why you came to this SO post. The answer above helped me.
– Zac
Jun 26 '18 at 20:39
add a comment |
This is only necessary for physical devices. Physical devices can be forcefully disconnected by Safari if the device's battery is full. ("Full battery? Well then, let's just disconnect you as you don't need to charge anymore -- and there goes your debugging session too...")
You will want to select Connect via Network in Develop > [device], and then attach your debugger to the page you want to debug. If you do not have the Develop menu in Safari, go to Safari > Preferences > Advanced and select Show Develop menu in menu bar.

If this doesn't work, you may try upgrading your OS/Safari through the App Store first.
If things are still breaking, disconnect your iOS device. Go into your iOS device into Settings > Safari > Web Inspector and turn it off and then back on. Force quit out of Safari. Re-plug in your iOS device and start up Safari again and re-attach your iOS device through Safari > Develop menu.
via Network worked for me. On Safari v11.1.2 iOS 11.4.1. It was crashing immediately without the network option. Thanks!
– Dmitri R117
Aug 19 '18 at 23:04
add a comment |
This plagued me for a long time with very inconsistent behaviour, here are a few things I have found that help, I also wrote a blog post on this here.
Update both mac safari and ios - I have found after having the latest of both versions it started working for me, there could be debugging incompatibilities between Safari's.
Check that web inspector in ios is enabled - It has been known that this setting can be switched off after an upgrade, check in settings > safari > advanced > web inspector.
Check the port you are connected to - I have had mine plugged into a cheap hub / via apple keyboard/monitor hub and found that going directly into the mac works much better.
Are you using a good quality cable? - I have found that better quality / official cables that aren't worn out have better reliability when in debug.
Other notable observations - other people have commented that making sure cookies are enabled in safari, enabling private mode and trying whilst Xcode is open have affected the reliability of this, although I haven't seen this myself it may help others to try.
add a comment |
I can't say I have a solution, but a step in the right direction.
I tried using ios-webkit-debug-proxy so I can use the Chrome Dev Tools instead of Safari Dev Tools.
Note, in order to get it to work, I can to upgrade my iOS to the latest 11.4.1 and MacOS 10.13.65, then reinstall the latest versions:
brew update
brew install ios-webkit-debug-proxy
brew reinstall --HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy
ios_webkit_debug_proxy
After running ios_webkit_debug_proxy, I was able to try to connect through chrome://inspect and it disconnected immediately again:
Listing devices on :9221
Connected :9222 to Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053
Disconnected :9222 from Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
However, we have a clue! Invalid packet header. Sounds like a lower level bug somewhere. Not sure where to submit this but to though...
Sit down to track this error down with the Console App and had also some new insights, I will update my post above
– Stefan Rein
Sep 19 '18 at 7:43
1
I was able to create a reproduction for ios-webkit-debug-proxy and it seems relevant to this issue because the reproduction was consistent with the Safari Web Inspector issue. It appears to be an issue with the javascript source size when unminified with sourcemaps.
– Chet
Sep 19 '18 at 17:27
You're right! Thank you! With a production build with the AOT compiler of angular, with a size of 1.8 MB for a main.js and a 2.4 MB vendor.js with no sourcemap files, it works all the time, with Xcode connected and without. I would still like to debug my development build, though.
– Stefan Rein
Sep 20 '18 at 7:27
1
Yeah, me too. I have 39MB unminified js file I'm dealing with 😂
– Chet
Sep 20 '18 at 7:31
I can confirm that removing the sourcemaps fixed this for me.
– JW.
Jan 14 at 20:12
add a comment |
The most recent Safari Technology preview appears to have solved it for me.
https://developer.apple.com/safari/technology-preview/
1
Starting fromSafari Technology Release 42 (Safari 11.1, WebKit 12605.1.10)seems that the problem is resolved
– LuckyStarr
Oct 25 '17 at 10:55
2
Didn't change anything :(
– Hugo H
Feb 13 '18 at 18:34
2
Now the inspector opens.. and in a second (sometimes more or less) it now closes, instead of being open and just nothing happens like before. Still it is closing right now and can not figure out why. Safari Desktop Version 11.1 (12605.1.33.1.2) => Sierra
– Stefan Rein
Mar 28 '18 at 15:21
1
I'm having the same problem. Safari Technology Preview didn't helped
– Shashank Agrawal
Jul 7 '18 at 16:01
1
Still have this problem with Safari Technology Release Release 70 (Safari 12.1, WebKit 14607.1.13) so I don't think this answer is valid!
– Luke
Dec 4 '18 at 17:25
|
show 1 more comment
Closing XCode first helped for me.
add a comment |
The magic solution worked for me:
1) Reboot your MAC
2) Reboot your Iphone
3) It works
add a comment |
protected by Community♦ Jul 6 '18 at 3:04
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are a few things to try:
1. Test on the Xcode Simulator:
Open the iPhone simulator in Xcode and debug there with Safari Web Inspector.
Sidenote: Maybe you need to download the Safari Technology Preview
2. Reset your location and privacy settings on your device.
Settings > General > Reset > Reset Location & Privacy
3. Debugging on a real device
With this configuration it seems to work right now.
iPhone X, iOS Version 12.1.3
macOS Mojave Version 10.14.2 (18C54)
Safari Version 12.0.2 (14606.3.4)
For other devices / versions, please read further down (Maybe you can decrease your build size).
EDIT: 2018.09.20
@Chet found out, the Web Inspector keeps disconnecting for too large JS files and map files
https://stackoverflow.com/a/52338231/4641479
Issue on Github:
https://github.com/google/ios-webkit-debug-proxy/issues/275
https://github.com/google/ios-webkit-debug-proxy/issues/274
I could confirm this on a real device with a production build (1.8 MB + 2.4 MB files), the Safari Web Inspector stays always connected.

Since for the development build it is not:

Before my web inspector very rarely worked and often just stopped working - but was still open. After the safari update the web inspector opens and closes immediately. If you encounter such problems..
This will work:
Step 1. Get the latest Safari Browser
Safari: 11.1 (12605.1.33.1.2)
https://developer.apple.com/safari/download
macOS Sierra and OS X El Capitan (I assume macOS high Sierra is also supported)
Maybe you need to download the Safari Technology Preview
Step 2. Reset your location and privacy settings
On your device go to:
Settings > General > Reset > Reset Location & Privacy
Source: https://forums.developer.apple.com/thread/87181
Step 3. Connect your device
Open Safari on OS X
If you had connected your iPhone device with an usb cable, disconnect it first.
Now plug it in.
On OS X Safari go to:
Develop > Device name > Apply for development
Now on your phone there is a permission question. Choose trust and now you can choose the open tab on your devices safari and debug.
Happy debug!
Now the web inspector stays connected.
5
I thank you so much really!! Step 2. worked for me like charm <3
– Mohammad Kawsara
May 5 '18 at 21:27
1
Worked for the first time but after that same problem again.
– Shashank Agrawal
Jul 7 '18 at 16:06
stackoverflow.com/a/51224913/694609 Emptying Cache fixed this problem for me!
– Luke
Dec 4 '18 at 17:30
There is no "Developers" menu item for OSX Safari
– AlxVallejo
Mar 12 at 16:29
@AlxVallejo Go to Preferences -> Click on the Advanced Tab -> Down thereShow Develop Menu in Menu Bar(If you meant my misspelling, you could've just corrected it, translation mistake - my safari browser is not english) Here are pictures: osxdaily.com/2011/11/03/enable-the-develop-menu-in-safari
– Stefan Rein
Mar 13 at 5:46
|
show 1 more comment
There are a few things to try:
1. Test on the Xcode Simulator:
Open the iPhone simulator in Xcode and debug there with Safari Web Inspector.
Sidenote: Maybe you need to download the Safari Technology Preview
2. Reset your location and privacy settings on your device.
Settings > General > Reset > Reset Location & Privacy
3. Debugging on a real device
With this configuration it seems to work right now.
iPhone X, iOS Version 12.1.3
macOS Mojave Version 10.14.2 (18C54)
Safari Version 12.0.2 (14606.3.4)
For other devices / versions, please read further down (Maybe you can decrease your build size).
EDIT: 2018.09.20
@Chet found out, the Web Inspector keeps disconnecting for too large JS files and map files
https://stackoverflow.com/a/52338231/4641479
Issue on Github:
https://github.com/google/ios-webkit-debug-proxy/issues/275
https://github.com/google/ios-webkit-debug-proxy/issues/274
I could confirm this on a real device with a production build (1.8 MB + 2.4 MB files), the Safari Web Inspector stays always connected.

Since for the development build it is not:

Before my web inspector very rarely worked and often just stopped working - but was still open. After the safari update the web inspector opens and closes immediately. If you encounter such problems..
This will work:
Step 1. Get the latest Safari Browser
Safari: 11.1 (12605.1.33.1.2)
https://developer.apple.com/safari/download
macOS Sierra and OS X El Capitan (I assume macOS high Sierra is also supported)
Maybe you need to download the Safari Technology Preview
Step 2. Reset your location and privacy settings
On your device go to:
Settings > General > Reset > Reset Location & Privacy
Source: https://forums.developer.apple.com/thread/87181
Step 3. Connect your device
Open Safari on OS X
If you had connected your iPhone device with an usb cable, disconnect it first.
Now plug it in.
On OS X Safari go to:
Develop > Device name > Apply for development
Now on your phone there is a permission question. Choose trust and now you can choose the open tab on your devices safari and debug.
Happy debug!
Now the web inspector stays connected.
5
I thank you so much really!! Step 2. worked for me like charm <3
– Mohammad Kawsara
May 5 '18 at 21:27
1
Worked for the first time but after that same problem again.
– Shashank Agrawal
Jul 7 '18 at 16:06
stackoverflow.com/a/51224913/694609 Emptying Cache fixed this problem for me!
– Luke
Dec 4 '18 at 17:30
There is no "Developers" menu item for OSX Safari
– AlxVallejo
Mar 12 at 16:29
@AlxVallejo Go to Preferences -> Click on the Advanced Tab -> Down thereShow Develop Menu in Menu Bar(If you meant my misspelling, you could've just corrected it, translation mistake - my safari browser is not english) Here are pictures: osxdaily.com/2011/11/03/enable-the-develop-menu-in-safari
– Stefan Rein
Mar 13 at 5:46
|
show 1 more comment
There are a few things to try:
1. Test on the Xcode Simulator:
Open the iPhone simulator in Xcode and debug there with Safari Web Inspector.
Sidenote: Maybe you need to download the Safari Technology Preview
2. Reset your location and privacy settings on your device.
Settings > General > Reset > Reset Location & Privacy
3. Debugging on a real device
With this configuration it seems to work right now.
iPhone X, iOS Version 12.1.3
macOS Mojave Version 10.14.2 (18C54)
Safari Version 12.0.2 (14606.3.4)
For other devices / versions, please read further down (Maybe you can decrease your build size).
EDIT: 2018.09.20
@Chet found out, the Web Inspector keeps disconnecting for too large JS files and map files
https://stackoverflow.com/a/52338231/4641479
Issue on Github:
https://github.com/google/ios-webkit-debug-proxy/issues/275
https://github.com/google/ios-webkit-debug-proxy/issues/274
I could confirm this on a real device with a production build (1.8 MB + 2.4 MB files), the Safari Web Inspector stays always connected.

Since for the development build it is not:

Before my web inspector very rarely worked and often just stopped working - but was still open. After the safari update the web inspector opens and closes immediately. If you encounter such problems..
This will work:
Step 1. Get the latest Safari Browser
Safari: 11.1 (12605.1.33.1.2)
https://developer.apple.com/safari/download
macOS Sierra and OS X El Capitan (I assume macOS high Sierra is also supported)
Maybe you need to download the Safari Technology Preview
Step 2. Reset your location and privacy settings
On your device go to:
Settings > General > Reset > Reset Location & Privacy
Source: https://forums.developer.apple.com/thread/87181
Step 3. Connect your device
Open Safari on OS X
If you had connected your iPhone device with an usb cable, disconnect it first.
Now plug it in.
On OS X Safari go to:
Develop > Device name > Apply for development
Now on your phone there is a permission question. Choose trust and now you can choose the open tab on your devices safari and debug.
Happy debug!
Now the web inspector stays connected.
There are a few things to try:
1. Test on the Xcode Simulator:
Open the iPhone simulator in Xcode and debug there with Safari Web Inspector.
Sidenote: Maybe you need to download the Safari Technology Preview
2. Reset your location and privacy settings on your device.
Settings > General > Reset > Reset Location & Privacy
3. Debugging on a real device
With this configuration it seems to work right now.
iPhone X, iOS Version 12.1.3
macOS Mojave Version 10.14.2 (18C54)
Safari Version 12.0.2 (14606.3.4)
For other devices / versions, please read further down (Maybe you can decrease your build size).
EDIT: 2018.09.20
@Chet found out, the Web Inspector keeps disconnecting for too large JS files and map files
https://stackoverflow.com/a/52338231/4641479
Issue on Github:
https://github.com/google/ios-webkit-debug-proxy/issues/275
https://github.com/google/ios-webkit-debug-proxy/issues/274
I could confirm this on a real device with a production build (1.8 MB + 2.4 MB files), the Safari Web Inspector stays always connected.

Since for the development build it is not:

Before my web inspector very rarely worked and often just stopped working - but was still open. After the safari update the web inspector opens and closes immediately. If you encounter such problems..
This will work:
Step 1. Get the latest Safari Browser
Safari: 11.1 (12605.1.33.1.2)
https://developer.apple.com/safari/download
macOS Sierra and OS X El Capitan (I assume macOS high Sierra is also supported)
Maybe you need to download the Safari Technology Preview
Step 2. Reset your location and privacy settings
On your device go to:
Settings > General > Reset > Reset Location & Privacy
Source: https://forums.developer.apple.com/thread/87181
Step 3. Connect your device
Open Safari on OS X
If you had connected your iPhone device with an usb cable, disconnect it first.
Now plug it in.
On OS X Safari go to:
Develop > Device name > Apply for development
Now on your phone there is a permission question. Choose trust and now you can choose the open tab on your devices safari and debug.
Happy debug!
Now the web inspector stays connected.
edited Apr 15 at 7:52
answered Mar 28 '18 at 15:49
Stefan ReinStefan Rein
2,60622423
2,60622423
5
I thank you so much really!! Step 2. worked for me like charm <3
– Mohammad Kawsara
May 5 '18 at 21:27
1
Worked for the first time but after that same problem again.
– Shashank Agrawal
Jul 7 '18 at 16:06
stackoverflow.com/a/51224913/694609 Emptying Cache fixed this problem for me!
– Luke
Dec 4 '18 at 17:30
There is no "Developers" menu item for OSX Safari
– AlxVallejo
Mar 12 at 16:29
@AlxVallejo Go to Preferences -> Click on the Advanced Tab -> Down thereShow Develop Menu in Menu Bar(If you meant my misspelling, you could've just corrected it, translation mistake - my safari browser is not english) Here are pictures: osxdaily.com/2011/11/03/enable-the-develop-menu-in-safari
– Stefan Rein
Mar 13 at 5:46
|
show 1 more comment
5
I thank you so much really!! Step 2. worked for me like charm <3
– Mohammad Kawsara
May 5 '18 at 21:27
1
Worked for the first time but after that same problem again.
– Shashank Agrawal
Jul 7 '18 at 16:06
stackoverflow.com/a/51224913/694609 Emptying Cache fixed this problem for me!
– Luke
Dec 4 '18 at 17:30
There is no "Developers" menu item for OSX Safari
– AlxVallejo
Mar 12 at 16:29
@AlxVallejo Go to Preferences -> Click on the Advanced Tab -> Down thereShow Develop Menu in Menu Bar(If you meant my misspelling, you could've just corrected it, translation mistake - my safari browser is not english) Here are pictures: osxdaily.com/2011/11/03/enable-the-develop-menu-in-safari
– Stefan Rein
Mar 13 at 5:46
5
5
I thank you so much really!! Step 2. worked for me like charm <3
– Mohammad Kawsara
May 5 '18 at 21:27
I thank you so much really!! Step 2. worked for me like charm <3
– Mohammad Kawsara
May 5 '18 at 21:27
1
1
Worked for the first time but after that same problem again.
– Shashank Agrawal
Jul 7 '18 at 16:06
Worked for the first time but after that same problem again.
– Shashank Agrawal
Jul 7 '18 at 16:06
stackoverflow.com/a/51224913/694609 Emptying Cache fixed this problem for me!
– Luke
Dec 4 '18 at 17:30
stackoverflow.com/a/51224913/694609 Emptying Cache fixed this problem for me!
– Luke
Dec 4 '18 at 17:30
There is no "Developers" menu item for OSX Safari
– AlxVallejo
Mar 12 at 16:29
There is no "Developers" menu item for OSX Safari
– AlxVallejo
Mar 12 at 16:29
@AlxVallejo Go to Preferences -> Click on the Advanced Tab -> Down there
Show Develop Menu in Menu Bar (If you meant my misspelling, you could've just corrected it, translation mistake - my safari browser is not english) Here are pictures: osxdaily.com/2011/11/03/enable-the-develop-menu-in-safari– Stefan Rein
Mar 13 at 5:46
@AlxVallejo Go to Preferences -> Click on the Advanced Tab -> Down there
Show Develop Menu in Menu Bar (If you meant my misspelling, you could've just corrected it, translation mistake - my safari browser is not english) Here are pictures: osxdaily.com/2011/11/03/enable-the-develop-menu-in-safari– Stefan Rein
Mar 13 at 5:46
|
show 1 more comment
Most of the answers listed here worked for me for a while but after a few hours they also stopped working and my Safari web console again keeps disconnecting as it opens.
Other few options that worked for me:
Option 1 - Empty Cache From Safari
Safari on MacOS -> Develop -> Empty Cache
Option 2 - Clear Trusted Computers
On iOS Device -> Settings -> Developer -> Clear Trusted Computers then reconnect the USB cable and then try to debug again
Option 3 - Make the debugger fool (as of 14th Jan 2019)
This solution is working for a long time now. Since this is an issue related to connection between iOS & Mac so I opened my Console app and just kept my iPhone selected. (This is somehow kept my iOS device connected to my Mac)
Then opening the Developer's console on Safari worked fine for me without disconnecting.
1
it's strange, but empty cache solved it in my case
– ruucm
Aug 23 '18 at 1:18
1
Emptying the cache fixed it for me too.
– Luke
Dec 4 '18 at 17:26
1
The third option seems the most reliably for me so far.
– OJ7
Jan 31 at 17:16
3rd one is guaranteed. Console is available on your macOS, use spotlight.
– sandaru.ny
Mar 8 at 13:09
add a comment |
Most of the answers listed here worked for me for a while but after a few hours they also stopped working and my Safari web console again keeps disconnecting as it opens.
Other few options that worked for me:
Option 1 - Empty Cache From Safari
Safari on MacOS -> Develop -> Empty Cache
Option 2 - Clear Trusted Computers
On iOS Device -> Settings -> Developer -> Clear Trusted Computers then reconnect the USB cable and then try to debug again
Option 3 - Make the debugger fool (as of 14th Jan 2019)
This solution is working for a long time now. Since this is an issue related to connection between iOS & Mac so I opened my Console app and just kept my iPhone selected. (This is somehow kept my iOS device connected to my Mac)
Then opening the Developer's console on Safari worked fine for me without disconnecting.
1
it's strange, but empty cache solved it in my case
– ruucm
Aug 23 '18 at 1:18
1
Emptying the cache fixed it for me too.
– Luke
Dec 4 '18 at 17:26
1
The third option seems the most reliably for me so far.
– OJ7
Jan 31 at 17:16
3rd one is guaranteed. Console is available on your macOS, use spotlight.
– sandaru.ny
Mar 8 at 13:09
add a comment |
Most of the answers listed here worked for me for a while but after a few hours they also stopped working and my Safari web console again keeps disconnecting as it opens.
Other few options that worked for me:
Option 1 - Empty Cache From Safari
Safari on MacOS -> Develop -> Empty Cache
Option 2 - Clear Trusted Computers
On iOS Device -> Settings -> Developer -> Clear Trusted Computers then reconnect the USB cable and then try to debug again
Option 3 - Make the debugger fool (as of 14th Jan 2019)
This solution is working for a long time now. Since this is an issue related to connection between iOS & Mac so I opened my Console app and just kept my iPhone selected. (This is somehow kept my iOS device connected to my Mac)
Then opening the Developer's console on Safari worked fine for me without disconnecting.
Most of the answers listed here worked for me for a while but after a few hours they also stopped working and my Safari web console again keeps disconnecting as it opens.
Other few options that worked for me:
Option 1 - Empty Cache From Safari
Safari on MacOS -> Develop -> Empty Cache
Option 2 - Clear Trusted Computers
On iOS Device -> Settings -> Developer -> Clear Trusted Computers then reconnect the USB cable and then try to debug again
Option 3 - Make the debugger fool (as of 14th Jan 2019)
This solution is working for a long time now. Since this is an issue related to connection between iOS & Mac so I opened my Console app and just kept my iPhone selected. (This is somehow kept my iOS device connected to my Mac)
Then opening the Developer's console on Safari worked fine for me without disconnecting.
edited Mar 9 at 7:15
answered Jul 7 '18 at 16:20
Shashank AgrawalShashank Agrawal
15.1k74169
15.1k74169
1
it's strange, but empty cache solved it in my case
– ruucm
Aug 23 '18 at 1:18
1
Emptying the cache fixed it for me too.
– Luke
Dec 4 '18 at 17:26
1
The third option seems the most reliably for me so far.
– OJ7
Jan 31 at 17:16
3rd one is guaranteed. Console is available on your macOS, use spotlight.
– sandaru.ny
Mar 8 at 13:09
add a comment |
1
it's strange, but empty cache solved it in my case
– ruucm
Aug 23 '18 at 1:18
1
Emptying the cache fixed it for me too.
– Luke
Dec 4 '18 at 17:26
1
The third option seems the most reliably for me so far.
– OJ7
Jan 31 at 17:16
3rd one is guaranteed. Console is available on your macOS, use spotlight.
– sandaru.ny
Mar 8 at 13:09
1
1
it's strange, but empty cache solved it in my case
– ruucm
Aug 23 '18 at 1:18
it's strange, but empty cache solved it in my case
– ruucm
Aug 23 '18 at 1:18
1
1
Emptying the cache fixed it for me too.
– Luke
Dec 4 '18 at 17:26
Emptying the cache fixed it for me too.
– Luke
Dec 4 '18 at 17:26
1
1
The third option seems the most reliably for me so far.
– OJ7
Jan 31 at 17:16
The third option seems the most reliably for me so far.
– OJ7
Jan 31 at 17:16
3rd one is guaranteed. Console is available on your macOS, use spotlight.
– sandaru.ny
Mar 8 at 13:09
3rd one is guaranteed. Console is available on your macOS, use spotlight.
– sandaru.ny
Mar 8 at 13:09
add a comment |
Sounds strange but it may be happening due to the battery being full triggering a disconnect: https://forums.developer.apple.com/thread/92290
The disconnection seems to occur when the battery of the Iphone is full. (So for the moment we turn the flash and the camera on to kill the battery while inspecting ...)
This is likely why you came to this SO post. The answer above helped me.
– Zac
Jun 26 '18 at 20:39
add a comment |
Sounds strange but it may be happening due to the battery being full triggering a disconnect: https://forums.developer.apple.com/thread/92290
The disconnection seems to occur when the battery of the Iphone is full. (So for the moment we turn the flash and the camera on to kill the battery while inspecting ...)
This is likely why you came to this SO post. The answer above helped me.
– Zac
Jun 26 '18 at 20:39
add a comment |
Sounds strange but it may be happening due to the battery being full triggering a disconnect: https://forums.developer.apple.com/thread/92290
The disconnection seems to occur when the battery of the Iphone is full. (So for the moment we turn the flash and the camera on to kill the battery while inspecting ...)
Sounds strange but it may be happening due to the battery being full triggering a disconnect: https://forums.developer.apple.com/thread/92290
The disconnection seems to occur when the battery of the Iphone is full. (So for the moment we turn the flash and the camera on to kill the battery while inspecting ...)
answered Apr 18 '18 at 10:06
David WheatonDavid Wheaton
50658
50658
This is likely why you came to this SO post. The answer above helped me.
– Zac
Jun 26 '18 at 20:39
add a comment |
This is likely why you came to this SO post. The answer above helped me.
– Zac
Jun 26 '18 at 20:39
This is likely why you came to this SO post. The answer above helped me.
– Zac
Jun 26 '18 at 20:39
This is likely why you came to this SO post. The answer above helped me.
– Zac
Jun 26 '18 at 20:39
add a comment |
This is only necessary for physical devices. Physical devices can be forcefully disconnected by Safari if the device's battery is full. ("Full battery? Well then, let's just disconnect you as you don't need to charge anymore -- and there goes your debugging session too...")
You will want to select Connect via Network in Develop > [device], and then attach your debugger to the page you want to debug. If you do not have the Develop menu in Safari, go to Safari > Preferences > Advanced and select Show Develop menu in menu bar.

If this doesn't work, you may try upgrading your OS/Safari through the App Store first.
If things are still breaking, disconnect your iOS device. Go into your iOS device into Settings > Safari > Web Inspector and turn it off and then back on. Force quit out of Safari. Re-plug in your iOS device and start up Safari again and re-attach your iOS device through Safari > Develop menu.
via Network worked for me. On Safari v11.1.2 iOS 11.4.1. It was crashing immediately without the network option. Thanks!
– Dmitri R117
Aug 19 '18 at 23:04
add a comment |
This is only necessary for physical devices. Physical devices can be forcefully disconnected by Safari if the device's battery is full. ("Full battery? Well then, let's just disconnect you as you don't need to charge anymore -- and there goes your debugging session too...")
You will want to select Connect via Network in Develop > [device], and then attach your debugger to the page you want to debug. If you do not have the Develop menu in Safari, go to Safari > Preferences > Advanced and select Show Develop menu in menu bar.

If this doesn't work, you may try upgrading your OS/Safari through the App Store first.
If things are still breaking, disconnect your iOS device. Go into your iOS device into Settings > Safari > Web Inspector and turn it off and then back on. Force quit out of Safari. Re-plug in your iOS device and start up Safari again and re-attach your iOS device through Safari > Develop menu.
via Network worked for me. On Safari v11.1.2 iOS 11.4.1. It was crashing immediately without the network option. Thanks!
– Dmitri R117
Aug 19 '18 at 23:04
add a comment |
This is only necessary for physical devices. Physical devices can be forcefully disconnected by Safari if the device's battery is full. ("Full battery? Well then, let's just disconnect you as you don't need to charge anymore -- and there goes your debugging session too...")
You will want to select Connect via Network in Develop > [device], and then attach your debugger to the page you want to debug. If you do not have the Develop menu in Safari, go to Safari > Preferences > Advanced and select Show Develop menu in menu bar.

If this doesn't work, you may try upgrading your OS/Safari through the App Store first.
If things are still breaking, disconnect your iOS device. Go into your iOS device into Settings > Safari > Web Inspector and turn it off and then back on. Force quit out of Safari. Re-plug in your iOS device and start up Safari again and re-attach your iOS device through Safari > Develop menu.
This is only necessary for physical devices. Physical devices can be forcefully disconnected by Safari if the device's battery is full. ("Full battery? Well then, let's just disconnect you as you don't need to charge anymore -- and there goes your debugging session too...")
You will want to select Connect via Network in Develop > [device], and then attach your debugger to the page you want to debug. If you do not have the Develop menu in Safari, go to Safari > Preferences > Advanced and select Show Develop menu in menu bar.

If this doesn't work, you may try upgrading your OS/Safari through the App Store first.
If things are still breaking, disconnect your iOS device. Go into your iOS device into Settings > Safari > Web Inspector and turn it off and then back on. Force quit out of Safari. Re-plug in your iOS device and start up Safari again and re-attach your iOS device through Safari > Develop menu.
edited Jul 9 '18 at 5:08
answered Jun 26 '18 at 21:20
ZacZac
1,37752053
1,37752053
via Network worked for me. On Safari v11.1.2 iOS 11.4.1. It was crashing immediately without the network option. Thanks!
– Dmitri R117
Aug 19 '18 at 23:04
add a comment |
via Network worked for me. On Safari v11.1.2 iOS 11.4.1. It was crashing immediately without the network option. Thanks!
– Dmitri R117
Aug 19 '18 at 23:04
via Network worked for me. On Safari v11.1.2 iOS 11.4.1. It was crashing immediately without the network option. Thanks!
– Dmitri R117
Aug 19 '18 at 23:04
via Network worked for me. On Safari v11.1.2 iOS 11.4.1. It was crashing immediately without the network option. Thanks!
– Dmitri R117
Aug 19 '18 at 23:04
add a comment |
This plagued me for a long time with very inconsistent behaviour, here are a few things I have found that help, I also wrote a blog post on this here.
Update both mac safari and ios - I have found after having the latest of both versions it started working for me, there could be debugging incompatibilities between Safari's.
Check that web inspector in ios is enabled - It has been known that this setting can be switched off after an upgrade, check in settings > safari > advanced > web inspector.
Check the port you are connected to - I have had mine plugged into a cheap hub / via apple keyboard/monitor hub and found that going directly into the mac works much better.
Are you using a good quality cable? - I have found that better quality / official cables that aren't worn out have better reliability when in debug.
Other notable observations - other people have commented that making sure cookies are enabled in safari, enabling private mode and trying whilst Xcode is open have affected the reliability of this, although I haven't seen this myself it may help others to try.
add a comment |
This plagued me for a long time with very inconsistent behaviour, here are a few things I have found that help, I also wrote a blog post on this here.
Update both mac safari and ios - I have found after having the latest of both versions it started working for me, there could be debugging incompatibilities between Safari's.
Check that web inspector in ios is enabled - It has been known that this setting can be switched off after an upgrade, check in settings > safari > advanced > web inspector.
Check the port you are connected to - I have had mine plugged into a cheap hub / via apple keyboard/monitor hub and found that going directly into the mac works much better.
Are you using a good quality cable? - I have found that better quality / official cables that aren't worn out have better reliability when in debug.
Other notable observations - other people have commented that making sure cookies are enabled in safari, enabling private mode and trying whilst Xcode is open have affected the reliability of this, although I haven't seen this myself it may help others to try.
add a comment |
This plagued me for a long time with very inconsistent behaviour, here are a few things I have found that help, I also wrote a blog post on this here.
Update both mac safari and ios - I have found after having the latest of both versions it started working for me, there could be debugging incompatibilities between Safari's.
Check that web inspector in ios is enabled - It has been known that this setting can be switched off after an upgrade, check in settings > safari > advanced > web inspector.
Check the port you are connected to - I have had mine plugged into a cheap hub / via apple keyboard/monitor hub and found that going directly into the mac works much better.
Are you using a good quality cable? - I have found that better quality / official cables that aren't worn out have better reliability when in debug.
Other notable observations - other people have commented that making sure cookies are enabled in safari, enabling private mode and trying whilst Xcode is open have affected the reliability of this, although I haven't seen this myself it may help others to try.
This plagued me for a long time with very inconsistent behaviour, here are a few things I have found that help, I also wrote a blog post on this here.
Update both mac safari and ios - I have found after having the latest of both versions it started working for me, there could be debugging incompatibilities between Safari's.
Check that web inspector in ios is enabled - It has been known that this setting can be switched off after an upgrade, check in settings > safari > advanced > web inspector.
Check the port you are connected to - I have had mine plugged into a cheap hub / via apple keyboard/monitor hub and found that going directly into the mac works much better.
Are you using a good quality cable? - I have found that better quality / official cables that aren't worn out have better reliability when in debug.
Other notable observations - other people have commented that making sure cookies are enabled in safari, enabling private mode and trying whilst Xcode is open have affected the reliability of this, although I haven't seen this myself it may help others to try.
edited Jul 23 '18 at 13:13
answered Feb 9 '18 at 10:13
lindstrom1989lindstrom1989
616
616
add a comment |
add a comment |
I can't say I have a solution, but a step in the right direction.
I tried using ios-webkit-debug-proxy so I can use the Chrome Dev Tools instead of Safari Dev Tools.
Note, in order to get it to work, I can to upgrade my iOS to the latest 11.4.1 and MacOS 10.13.65, then reinstall the latest versions:
brew update
brew install ios-webkit-debug-proxy
brew reinstall --HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy
ios_webkit_debug_proxy
After running ios_webkit_debug_proxy, I was able to try to connect through chrome://inspect and it disconnected immediately again:
Listing devices on :9221
Connected :9222 to Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053
Disconnected :9222 from Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
However, we have a clue! Invalid packet header. Sounds like a lower level bug somewhere. Not sure where to submit this but to though...
Sit down to track this error down with the Console App and had also some new insights, I will update my post above
– Stefan Rein
Sep 19 '18 at 7:43
1
I was able to create a reproduction for ios-webkit-debug-proxy and it seems relevant to this issue because the reproduction was consistent with the Safari Web Inspector issue. It appears to be an issue with the javascript source size when unminified with sourcemaps.
– Chet
Sep 19 '18 at 17:27
You're right! Thank you! With a production build with the AOT compiler of angular, with a size of 1.8 MB for a main.js and a 2.4 MB vendor.js with no sourcemap files, it works all the time, with Xcode connected and without. I would still like to debug my development build, though.
– Stefan Rein
Sep 20 '18 at 7:27
1
Yeah, me too. I have 39MB unminified js file I'm dealing with 😂
– Chet
Sep 20 '18 at 7:31
I can confirm that removing the sourcemaps fixed this for me.
– JW.
Jan 14 at 20:12
add a comment |
I can't say I have a solution, but a step in the right direction.
I tried using ios-webkit-debug-proxy so I can use the Chrome Dev Tools instead of Safari Dev Tools.
Note, in order to get it to work, I can to upgrade my iOS to the latest 11.4.1 and MacOS 10.13.65, then reinstall the latest versions:
brew update
brew install ios-webkit-debug-proxy
brew reinstall --HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy
ios_webkit_debug_proxy
After running ios_webkit_debug_proxy, I was able to try to connect through chrome://inspect and it disconnected immediately again:
Listing devices on :9221
Connected :9222 to Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053
Disconnected :9222 from Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
However, we have a clue! Invalid packet header. Sounds like a lower level bug somewhere. Not sure where to submit this but to though...
Sit down to track this error down with the Console App and had also some new insights, I will update my post above
– Stefan Rein
Sep 19 '18 at 7:43
1
I was able to create a reproduction for ios-webkit-debug-proxy and it seems relevant to this issue because the reproduction was consistent with the Safari Web Inspector issue. It appears to be an issue with the javascript source size when unminified with sourcemaps.
– Chet
Sep 19 '18 at 17:27
You're right! Thank you! With a production build with the AOT compiler of angular, with a size of 1.8 MB for a main.js and a 2.4 MB vendor.js with no sourcemap files, it works all the time, with Xcode connected and without. I would still like to debug my development build, though.
– Stefan Rein
Sep 20 '18 at 7:27
1
Yeah, me too. I have 39MB unminified js file I'm dealing with 😂
– Chet
Sep 20 '18 at 7:31
I can confirm that removing the sourcemaps fixed this for me.
– JW.
Jan 14 at 20:12
add a comment |
I can't say I have a solution, but a step in the right direction.
I tried using ios-webkit-debug-proxy so I can use the Chrome Dev Tools instead of Safari Dev Tools.
Note, in order to get it to work, I can to upgrade my iOS to the latest 11.4.1 and MacOS 10.13.65, then reinstall the latest versions:
brew update
brew install ios-webkit-debug-proxy
brew reinstall --HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy
ios_webkit_debug_proxy
After running ios_webkit_debug_proxy, I was able to try to connect through chrome://inspect and it disconnected immediately again:
Listing devices on :9221
Connected :9222 to Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053
Disconnected :9222 from Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
However, we have a clue! Invalid packet header. Sounds like a lower level bug somewhere. Not sure where to submit this but to though...
I can't say I have a solution, but a step in the right direction.
I tried using ios-webkit-debug-proxy so I can use the Chrome Dev Tools instead of Safari Dev Tools.
Note, in order to get it to work, I can to upgrade my iOS to the latest 11.4.1 and MacOS 10.13.65, then reinstall the latest versions:
brew update
brew install ios-webkit-debug-proxy
brew reinstall --HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy
ios_webkit_debug_proxy
After running ios_webkit_debug_proxy, I was able to try to connect through chrome://inspect and it disconnected immediately again:
Listing devices on :9221
Connected :9222 to Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053
Disconnected :9222 from Chet's Phone (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
However, we have a clue! Invalid packet header. Sounds like a lower level bug somewhere. Not sure where to submit this but to though...
answered Sep 14 '18 at 19:32
ChetChet
6,23794483
6,23794483
Sit down to track this error down with the Console App and had also some new insights, I will update my post above
– Stefan Rein
Sep 19 '18 at 7:43
1
I was able to create a reproduction for ios-webkit-debug-proxy and it seems relevant to this issue because the reproduction was consistent with the Safari Web Inspector issue. It appears to be an issue with the javascript source size when unminified with sourcemaps.
– Chet
Sep 19 '18 at 17:27
You're right! Thank you! With a production build with the AOT compiler of angular, with a size of 1.8 MB for a main.js and a 2.4 MB vendor.js with no sourcemap files, it works all the time, with Xcode connected and without. I would still like to debug my development build, though.
– Stefan Rein
Sep 20 '18 at 7:27
1
Yeah, me too. I have 39MB unminified js file I'm dealing with 😂
– Chet
Sep 20 '18 at 7:31
I can confirm that removing the sourcemaps fixed this for me.
– JW.
Jan 14 at 20:12
add a comment |
Sit down to track this error down with the Console App and had also some new insights, I will update my post above
– Stefan Rein
Sep 19 '18 at 7:43
1
I was able to create a reproduction for ios-webkit-debug-proxy and it seems relevant to this issue because the reproduction was consistent with the Safari Web Inspector issue. It appears to be an issue with the javascript source size when unminified with sourcemaps.
– Chet
Sep 19 '18 at 17:27
You're right! Thank you! With a production build with the AOT compiler of angular, with a size of 1.8 MB for a main.js and a 2.4 MB vendor.js with no sourcemap files, it works all the time, with Xcode connected and without. I would still like to debug my development build, though.
– Stefan Rein
Sep 20 '18 at 7:27
1
Yeah, me too. I have 39MB unminified js file I'm dealing with 😂
– Chet
Sep 20 '18 at 7:31
I can confirm that removing the sourcemaps fixed this for me.
– JW.
Jan 14 at 20:12
Sit down to track this error down with the Console App and had also some new insights, I will update my post above
– Stefan Rein
Sep 19 '18 at 7:43
Sit down to track this error down with the Console App and had also some new insights, I will update my post above
– Stefan Rein
Sep 19 '18 at 7:43
1
1
I was able to create a reproduction for ios-webkit-debug-proxy and it seems relevant to this issue because the reproduction was consistent with the Safari Web Inspector issue. It appears to be an issue with the javascript source size when unminified with sourcemaps.
– Chet
Sep 19 '18 at 17:27
I was able to create a reproduction for ios-webkit-debug-proxy and it seems relevant to this issue because the reproduction was consistent with the Safari Web Inspector issue. It appears to be an issue with the javascript source size when unminified with sourcemaps.
– Chet
Sep 19 '18 at 17:27
You're right! Thank you! With a production build with the AOT compiler of angular, with a size of 1.8 MB for a main.js and a 2.4 MB vendor.js with no sourcemap files, it works all the time, with Xcode connected and without. I would still like to debug my development build, though.
– Stefan Rein
Sep 20 '18 at 7:27
You're right! Thank you! With a production build with the AOT compiler of angular, with a size of 1.8 MB for a main.js and a 2.4 MB vendor.js with no sourcemap files, it works all the time, with Xcode connected and without. I would still like to debug my development build, though.
– Stefan Rein
Sep 20 '18 at 7:27
1
1
Yeah, me too. I have 39MB unminified js file I'm dealing with 😂
– Chet
Sep 20 '18 at 7:31
Yeah, me too. I have 39MB unminified js file I'm dealing with 😂
– Chet
Sep 20 '18 at 7:31
I can confirm that removing the sourcemaps fixed this for me.
– JW.
Jan 14 at 20:12
I can confirm that removing the sourcemaps fixed this for me.
– JW.
Jan 14 at 20:12
add a comment |
The most recent Safari Technology preview appears to have solved it for me.
https://developer.apple.com/safari/technology-preview/
1
Starting fromSafari Technology Release 42 (Safari 11.1, WebKit 12605.1.10)seems that the problem is resolved
– LuckyStarr
Oct 25 '17 at 10:55
2
Didn't change anything :(
– Hugo H
Feb 13 '18 at 18:34
2
Now the inspector opens.. and in a second (sometimes more or less) it now closes, instead of being open and just nothing happens like before. Still it is closing right now and can not figure out why. Safari Desktop Version 11.1 (12605.1.33.1.2) => Sierra
– Stefan Rein
Mar 28 '18 at 15:21
1
I'm having the same problem. Safari Technology Preview didn't helped
– Shashank Agrawal
Jul 7 '18 at 16:01
1
Still have this problem with Safari Technology Release Release 70 (Safari 12.1, WebKit 14607.1.13) so I don't think this answer is valid!
– Luke
Dec 4 '18 at 17:25
|
show 1 more comment
The most recent Safari Technology preview appears to have solved it for me.
https://developer.apple.com/safari/technology-preview/
1
Starting fromSafari Technology Release 42 (Safari 11.1, WebKit 12605.1.10)seems that the problem is resolved
– LuckyStarr
Oct 25 '17 at 10:55
2
Didn't change anything :(
– Hugo H
Feb 13 '18 at 18:34
2
Now the inspector opens.. and in a second (sometimes more or less) it now closes, instead of being open and just nothing happens like before. Still it is closing right now and can not figure out why. Safari Desktop Version 11.1 (12605.1.33.1.2) => Sierra
– Stefan Rein
Mar 28 '18 at 15:21
1
I'm having the same problem. Safari Technology Preview didn't helped
– Shashank Agrawal
Jul 7 '18 at 16:01
1
Still have this problem with Safari Technology Release Release 70 (Safari 12.1, WebKit 14607.1.13) so I don't think this answer is valid!
– Luke
Dec 4 '18 at 17:25
|
show 1 more comment
The most recent Safari Technology preview appears to have solved it for me.
https://developer.apple.com/safari/technology-preview/
The most recent Safari Technology preview appears to have solved it for me.
https://developer.apple.com/safari/technology-preview/
answered Jul 7 '17 at 18:26
Miles AldenMiles Alden
1,38411020
1,38411020
1
Starting fromSafari Technology Release 42 (Safari 11.1, WebKit 12605.1.10)seems that the problem is resolved
– LuckyStarr
Oct 25 '17 at 10:55
2
Didn't change anything :(
– Hugo H
Feb 13 '18 at 18:34
2
Now the inspector opens.. and in a second (sometimes more or less) it now closes, instead of being open and just nothing happens like before. Still it is closing right now and can not figure out why. Safari Desktop Version 11.1 (12605.1.33.1.2) => Sierra
– Stefan Rein
Mar 28 '18 at 15:21
1
I'm having the same problem. Safari Technology Preview didn't helped
– Shashank Agrawal
Jul 7 '18 at 16:01
1
Still have this problem with Safari Technology Release Release 70 (Safari 12.1, WebKit 14607.1.13) so I don't think this answer is valid!
– Luke
Dec 4 '18 at 17:25
|
show 1 more comment
1
Starting fromSafari Technology Release 42 (Safari 11.1, WebKit 12605.1.10)seems that the problem is resolved
– LuckyStarr
Oct 25 '17 at 10:55
2
Didn't change anything :(
– Hugo H
Feb 13 '18 at 18:34
2
Now the inspector opens.. and in a second (sometimes more or less) it now closes, instead of being open and just nothing happens like before. Still it is closing right now and can not figure out why. Safari Desktop Version 11.1 (12605.1.33.1.2) => Sierra
– Stefan Rein
Mar 28 '18 at 15:21
1
I'm having the same problem. Safari Technology Preview didn't helped
– Shashank Agrawal
Jul 7 '18 at 16:01
1
Still have this problem with Safari Technology Release Release 70 (Safari 12.1, WebKit 14607.1.13) so I don't think this answer is valid!
– Luke
Dec 4 '18 at 17:25
1
1
Starting from
Safari Technology Release 42 (Safari 11.1, WebKit 12605.1.10) seems that the problem is resolved– LuckyStarr
Oct 25 '17 at 10:55
Starting from
Safari Technology Release 42 (Safari 11.1, WebKit 12605.1.10) seems that the problem is resolved– LuckyStarr
Oct 25 '17 at 10:55
2
2
Didn't change anything :(
– Hugo H
Feb 13 '18 at 18:34
Didn't change anything :(
– Hugo H
Feb 13 '18 at 18:34
2
2
Now the inspector opens.. and in a second (sometimes more or less) it now closes, instead of being open and just nothing happens like before. Still it is closing right now and can not figure out why. Safari Desktop Version 11.1 (12605.1.33.1.2) => Sierra
– Stefan Rein
Mar 28 '18 at 15:21
Now the inspector opens.. and in a second (sometimes more or less) it now closes, instead of being open and just nothing happens like before. Still it is closing right now and can not figure out why. Safari Desktop Version 11.1 (12605.1.33.1.2) => Sierra
– Stefan Rein
Mar 28 '18 at 15:21
1
1
I'm having the same problem. Safari Technology Preview didn't helped
– Shashank Agrawal
Jul 7 '18 at 16:01
I'm having the same problem. Safari Technology Preview didn't helped
– Shashank Agrawal
Jul 7 '18 at 16:01
1
1
Still have this problem with Safari Technology Release Release 70 (Safari 12.1, WebKit 14607.1.13) so I don't think this answer is valid!
– Luke
Dec 4 '18 at 17:25
Still have this problem with Safari Technology Release Release 70 (Safari 12.1, WebKit 14607.1.13) so I don't think this answer is valid!
– Luke
Dec 4 '18 at 17:25
|
show 1 more comment
Closing XCode first helped for me.
add a comment |
Closing XCode first helped for me.
add a comment |
Closing XCode first helped for me.
Closing XCode first helped for me.
answered Oct 21 '18 at 17:50
S. RooseS. Roose
402215
402215
add a comment |
add a comment |
The magic solution worked for me:
1) Reboot your MAC
2) Reboot your Iphone
3) It works
add a comment |
The magic solution worked for me:
1) Reboot your MAC
2) Reboot your Iphone
3) It works
add a comment |
The magic solution worked for me:
1) Reboot your MAC
2) Reboot your Iphone
3) It works
The magic solution worked for me:
1) Reboot your MAC
2) Reboot your Iphone
3) It works
answered Mar 11 at 23:15
olllejikolllejik
840610
840610
add a comment |
add a comment |
protected by Community♦ Jul 6 '18 at 3:04
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
1
This seems to be a very common problem. Some people have suggested changing the cable, I have not had any luck with that though. When this happens to me I just unplug and replug the cable in the iPad, it is a bit quicker and slightly less annoying than restarting Safari.
– enifeder
Jul 9 '15 at 4:18
1
@enifeder thanks for the comment, and yes changing cable didn't help me either, I was wondering earlier if there's some javascript error that breaks the connection
– user2727195
Jul 9 '15 at 17:43
3
Happens to everyone constantly. It's a Safari bug.
– Kirill E.
Sep 8 '15 at 16:49
3
It appears this issue has been resolved with the release of Safari 9.0. I was experiencing the issue repeatedly yesterday but after installing Safari 9.0 today I haven't seen Safari disconnect while debugging my cordova app
– jandersen
Oct 1 '15 at 15:45
2
I am experiencing this with Safari 10.0...
– shi11i
Feb 1 '17 at 16:21