iPad Safari Web Inspector crashing on page load - ios

I have a video focused website made in wordpress. When we go to test the website on iPad we connect it to a mac laptop and open the safari developer tools to check if we have any errors and whatnot. Everything works on our homepage but when we go to any video post we have added, it crashes the developer tools window, and the browser on the iPad has a little drop down at the top saying "A problem occurred with this webpage so it was reloaded".
The page is fine on the iPad, there aren't any PHP errors in our logs, everything works fine functionally, so I can't figure out what is crashing it.
Any ideas? Any way I can troubleshoot this?
Thanks in advance :) And let me know if you need any more information!

I had this exact problem and solved it by updating both OSX Safari and the iPad to the latest versions. Now i can use the Web Inspector again.

Related

Safari web inspector not working when debugging ios standalone webapp

I've been struggling to debug my standalone webapp with safari's web inspector. The web inspector works fine when I go to the url on the iphone's safari like a normal web page. The problem appears when I add the webapp to the homescreen. I'm having a strange bug that causes my app to crash when I start it from the homescreen and I want to see what's happening, but when I try to open the web inspector on the mac it opens for a second and then it closes unexpectedly with no message at all (also the webapp on the iphone closes). Thanks in advance. More info about the devices and versions:
- iPhone 5SE with ios 10.3.2 (14F89)
- Macbook Air with MacOS Sierra 10.12.5
Well it seems that Safari is having a bug regarding the cache when I add the webapp to the homescreen using the same app name I was previously using. I tried deleting the old one on the homescreen and add it again but with a different app name (short name) and it worked (it loaded the latest version of the webapp) and the bug I was trying to get rid of in the first place was finally gone. I'm concerned however about asking the user to add the app again to the homescreen with a different app name to get the latest version. Maybe that's a sign that I should move on to service workers :)

Universal links (Deep linking) not working on iPhone but works on iPad

I am trying to build deep linking feature into my app. I did all the necessary set up for deep linking to work like, enabling associated domains in my app, adding apple-app-site-association to the root directory of my server, and I am serving a valid apple-app-site-association over https, I also validated my apple-app-site-association using this tool Validate your apple-app-site-association.
After doing everything right, I tested the deep linking feature on my iPad and it worked as expected. But when I tried to do the same on my iPhone it doesn't work, it always took me to safari. I tried it on 6s device, I reinstalled the app, I cleared Safari website data & cleared the history. Also updated the iPhone & iPad to iOS 9.3.5. The updating the OS didn't change a thing.
iPad still continue to work with deeplink URLs just like it did while it was on 9.3.4. iPhone still opened the link in safari.
Please give me some pointers on how to workaround this issue, I think this might be an apple bug but again I don't understand how it can work on iPad which is running same software as iPhone. Any help or guidelines is much appreciated.
Thanks.
I was able to fix this issue and this is one of the annoying issue that I have come across, because it doesn't say what is going wrong.
Fix: Whenever the iOS opens your link in safari, you need to pull down the webpage in safari and there you'll see a banner saying that, open it in the app. Once you click on that banner your future links will start opening the app instead of opening it in the safari browser.
There was no error whatsoever and there was no indication why the link was getting opened I am pretty sure that, iOS didn't download the apple-app-site-association whenever I installed the app.
Also note that the banner in the webpage will not be visible whenever your link opens up in safari, you need to pull down the webpage and then the banner will become visible and if you click on open in app banner, it will start opening the links in app.
If in future if you select to view the link in safari by clicking on context menu which appears on right hand side of the status bar, which will be saying "Open in [your app name]" in safari, the links in future will open in safari instead of app, and again if the banner open in app isn't visible, you have to pull down the webpage to see that banner.
HTH.
In iOS 13, similar problem of direct links not opening the app instead it open the safari website directly.
Fixed by updated the below safari setting...
Settings > Safari > Request Desktop Website > All websites > Switch Off
I was facing the same issue in iOS 12, on one device the link redirected to my app and on another device it was always redirecting to Safari and pressing the link on the Notes app was only allowing me to open it on Safari.
What I believe happened was that I pasted the URL in the browser and clicked Go, as I thought it would redirect to my app. No matter what I did ( reinstalling the app, restarting the device, ... ) the results were always the same, redirecting to Safari.
What helped me was deleting the cached data for my domain ( Settings -> Safari -> Advanced -> Website Data -> Swipe and delete the data for your domain ).
After that, everything started working.
I believe this is a bug with iOS Simulator,
In my case it was occurred when I entered an invalid address (with multiple spaces) for example:
Valid One: myApp://order/10003101
Invalid One: myApp://order/1003131
It stopped working even with Valid One and the solution was to clear Safari Website Data:
Go to Settings/Safari -> Clear History and Webstie Data
Device: iPhone 12 Pro Max
iOS: 14.5
Xcode: 12.5

Strange behavior with hyperlink on iPad only

My first post/question. Hope I don't stomp on any rules!
I have a site (mainly html5) with the same 9 "navigation" links on every page. They work exactly as expected in Safari, FF, Chrome on my desktop Mac. They also work correctly on my iPhone 5. However, while they all work, as far as taking the viewer from one page to another, on my iPad (2?), all but one have to be tapped/clicked on twice before they work. The exception is the "Forecast" page which works exactly like it should (single tap/click). I have checked all the pages with BBEdit's syntax checker and its "Compare..." function. I have also used the nu HTML validation service. None of these systems can explain why only one link works correctly on the iPad.
If you have an iPad, you can see what is happening better than I can explain it. http://www.mid-southweather.com/
Thanks for any help or insight. I've found nothing from interweb searches.
Clearing the iPad's Safari cache did not help, but I discovered, however, that the iPhone and iPad are sharing bookmarks or history! I'll clear things on the iPhone and try again.
No change, even after turning OFF Safari on both the iPad and iPhone iCloud list.
I suspect it is either the older iPad hardware or the CSS menu building 'code'. I found the same problem in an older site where I used the same CSS for a multi-level menu. The same two-tap requirement occurs at the lower/final link, but, again, only with my iPad. Oh well, thanks for testing/reading!

Why is Web Inspector showing me "no inspectable applications"?

Background
My company recently made a shift to app development. While developing and Q/Aing on Android was relatively painless, iOS, on the other hand is proving to be a pain.
The task involves looking at the page source of our app (which has a custom browser). I heard that Web Inspector is a great tool, so I went with it.
Problem
First of all, Web Inspector has been able to detect the custom browser before.
But quite frequently, Web Inspector's menu gives the "No Inspectable Applications" prompt.
This happens with the exact same version of the app that worked earlier.
There seems to be no trigger whatsoever; yesterday Web Inspector was working with the custom browser, and then after a few hours (during which I may have disconnected and reconnected the iPhone) it stopped working.
I have not been able to figure out why despite breaking my head for a week.
Observations
I have an iPhone 4S running iOS 7.0.4. My Mac Mini has Safari 7.0.
In the phone options
Web Inspector is turned on in the iPhone menu
All privacy modes are set to off - Do Not Track, Block Cookies, etc. (this question)
Javascript is turned on in the phone.
In Safari on my Mac Mini
- Develop menu is enabled (obviously)
More observations
iOS Safari is detected by Web Inspector.
So, how do I go about debugging this? What could be a possible cause and what could be the solution?
I was having the same problem, it was cause I was running iOS 8,fixed by updating Safari to 7.1 .
An update for iOS 9 (using OSX El Capitan):
On your mobile device under Settings -> Safari -> Fraudulent Website Warning = OFF [default = ON]
For me to make it work I needed to go into iPhone's Settings -> Safari > Advanced and enable Web Inspector option. (iOS 9.1)
I was having exactly same trouble. I managed to correct the situation by clearing the cookies and history from the mobile Safari menu. After this, it showed up in the Mac Develop menu.
Hopefully this will correct your situation as well.
this is probably an oversight where someone forgot to include the ios 8 version of Mobile Safari as an inspectable application. Get with it guys. I was able to connect my iPad to a MacMini we have with Yosemite Beta.
So I have also discovered that the web inspector in Yosemite Beta doesn't inspect well. I am able to Breakpoint in Javascript, but items are not inspectable in the inspection pane. The console does report correct information. Don't be fooled as I was! To inspect the value of something in this web inspector you must access the values via the console, type in the variable and it will return the result it has correctly.
As it happens, the solution that worked for me (reliably) was:
Build the app from source locally (in Xcode)
Deploy it to the iPhone, connected through USB
For some reason, Web Inspector works reliably when the app is started this way. I am unable to figure out why, but it works. Comments welcome.
Here's a possibility, mostly because I just ran into this myself...
Is your browser set for private browsing?
If it is, turn that off! You can't use the inspector while it's on.

Viewing Console.log in ios simulator

Please excuse my silliness. I feel as this should be a simple problem. I am using phonegap to develop in IOS. I am wondering how come console.debug does not show up in the xcode console. How can I view any javascript error or exception in xcode console or anywhere? I am running on 4.3 IOS IPAD simulator. Thanks.
You can watch the console.log with a safari-browser. Open the ios-simulator or connect the ipad by usb. Open safari and take a look in the menu "developer". Choose your web-site and the web-inspector will open.
more info here:
https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html
As far as I know, you cannot. I have solved this problem by using jsconsole.com. It allows you to output console message (and much more) by simply adding a script tag to your app.
NOTE: for debug use only.
Just to clarify the old answer from Fischel, here is the menu on a desktop Safari that allows you to connect development tools to simulators or devices.

Resources