Chrome Devtools Remote IOS Debugging Network Domain Not Found - ios

I am trying to setup remote debugging between a Win 7 laptop running chrome and an Apple iPhone running Safari. I am using chrome-devtools to establish the connection. I am using an ios-webkit-debug-server on the laptop and a python3 local http.server on the iPhone. I can get the laptop to connect and identify the iphone as a remote device. I copy and paste the link to devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/1. I get the following messages. I have tried disablining the firewall but no change. It appears that devtools cannot setup the network logging because it cannot find the network domain.Any help would be appreciated.
iPhone
IOS V12.5.1
Turned Web Inspector On
Start Server with Python3 -m http.server
In Safari (V12.5.1) I navigate to http://localhost:8000/test.html
Laptop
OS is Win 7
I start Powershell 7.1.3 running as administrator (WMF 5.1)
I start "ios-webkit-debug-server -f chrome-devtools://devtools/bundled/inspector.html"
I get Listing devices on :9221
I get Connected :9222 to jim's iPhone (??????...)
On Chrome I navigate to localhost:9221
I get "iOS Devices: 1. localhost:9222 - jim’s iPhone"
I click localhost:9222
I get "Inspectable pages for jim’s iPhone: 1. http://localhost:8000/test.html
I copy and paste "devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/1"
I get following messages (Truncated error messages different commands network domain not found)
-07:27:59:432 Main._createAppUI: 39.85693359375 ms
-07:27:59.472 main.js:1 Main._showAppUI: 44.3681640625 ms
-07:27:59.616 main.js:1 Main._initializeTarget: 34.602783203125 ms
-07:27:59.718 main.js:1 Main._lateInitialization: 0.56689453125 ms
-07:28:00.424 protocol_client.js:1 Request Network.enable failed. {"code":-32601, "message":"
'Network' domain was not found","data":[{"code":-32601,"message":"'Network'domain was not found"}]}

Related

Is it possible debug iOS Chrome on Windows 10?

As the title says, I need to debug a website opened with mobile Chrome on an iOS device (iPod, iPad etc.) on Windows 10. I have successfully set up iOS Safari debugging on Windows 10 via Chrome DevTools (GitHub repo , helpful comment). I would love to do the same thing except with Chrome or Firefox and not Safari. Is it even possible?
Yes it is. You'll need node first and (web inspector enabled on iOS>Settings>Safari) then...
Install weinre sudo npm -g i weinre (or) npm i -g weinre
Run weinre weinre --boundHost YOUR_IP:PORT
When it runs copy paste the following script to your code
<script src="http://YOUR_IP_ADDRESS:PORT/target/target-script-min.js"></script>
Connect your iOS device via USB
Go to http://YOUR_IP_ADDRESS:PORT/client/ from your browser (your pc) where you want to debug and you'll see your device.
Error in Step 2
If you see any error in step 2, first check your IP via ipconfig and then bound a similar IP with a free port that is not being used. For example my local ip is 192.168.1.5 so I used the same with a free port - 192.168.1.5:4576
Error in Step 5
If you can't see your device try adding a name myDevice to the script in Step 3 as follows
<script src="http://YOUR_IP_ADDRESS:PORT/target/target-script-min.js#myDevice"></script>
Then in Step 5, when reaching your device add the device name to the URL as
http://YOUR_IP_ADDRESS:PORT/client/#myDevice
SUCCESS
If everything runs fine, you'll be able to inspect your code, read indexedDB, session and localStorage and see outputs in Console among other dev tools.
I found this link very helpful.
No other answer or article on web is more straight forward than this: washamdev
It's a verbose article so I cannot put everything here. Hope the link does not break.

How to access mac localhost from an iOs device with webpack-dev-server?

For local development, I try to access the mac localhost from an iOs device.
The mac and the iPad are conected to the same network (respectively with ethernet and wifi). The firewall is off on the computer.
From the terminal, I run webpack-dev-server on the current project and it is visible in the browser at http://localhost:8080
I try to access it on the iPad at http://my-ip-address:8080 but "safari could not open the page because the server stopped responding" (where my-ip-address is either http://my-mac.local or http://192.168.0.40)
How can I access localhost from the iPad?

Test XCode app running on physical device with local server

I have searched high and low for a solution to this which I am sure must exist but I have failed to find one that works.
I am running XCode 7.3 and iOS 9.2 on an iPhone.
I have a test server running on 127.0.0.1:8000
I cannot get my app running on the iPhone to connect to either 127.0.0.1:8000 or 192.168.1.200:8000 (which is the local ip address of my server).
There must be a way to give the iPhone app access to the local server if only I knew how!
The best solution to this problem, that many app developers have, is to download ngrok which acts as a proxy website.
ngrok is insanely easy to use:
Download from https://ngrok.com/
Run: ngrok http 8000 in terminal (where 8000 is your port)
Cut and paste the displayed ngrok url (e.g. http://a021v2tc.ngrok.io) into your app
So simple. And works!
Check if iPhone connect the same wifi with your server.
You can use Fiddler as iPhone agent to get the detail error message.
There is the link how to capture traffic from IOS device.
here

Able to make a VPN connection from client to the tunnel_server (using apple's SimpleTunnel app) but unable to browse the internet on the device

I built the SimpleTunnel sample app (provided by apple) and am running the VPN client on a IOS device and the VPN server (tunnel_server) on a MAC running OS 10.11 (OS X El Capitan)
On MAC :-
$ sudo ./tunnel_server 550 ../../tunnel_server/config.plist
Response :-
tunnel_server[87725:2604682] Starting network service on port 550
tunnel_server[87725:2604682] Network service published successfully
On IOS device :-
Next I ran the PacketTunnel app on my IOS device. Added a VPN configuration with the correct IP address (the IP address of the MAC running the tunnel_server) and the port number (port number for the tunnel_server which is 550).
Next I try to connect to the VPN from the IO device and this seems to go through fine as I see the VPN sign in status bar.
Response on the screen running tunnel_server :-
tunnel_server[87739:2606312] Accepted a new connection
tunnel_server[87739:2606312] Allocated address Optional("10.8.0.15")
However I am not able to browse the internet using Safari on the IOS device (it times out), but am able to do the same from the MAC.
Any insights on what I might be missing ?
Please note that my MAC doesn't have OS X server installed. Also I did run the following two comands from a terminal before starting the tunnel_server on the MAC
sudo sysctl net.inet.ip.forwarding=1
sudo sysctl net.inet.ip.fw.enable=1

How can I make a PyCharm server running locally available to iPhone on same network

I am developing a backend server for an app using PyCharm. This runs on my laptop as 127.0.0.1:8000
I need to access this server for testing from an iPhone. This is connected by wifi to my local network to which the laptop is also connected.
I have tried entering http://mycomputer.local:8000 in safari on the iPhone but I get the message "Safari could not open the page because the server stopped working. I am using the real name of my computer instead of 'mycomputer'.
I am running OS X Yosemite so Web Sharing is not available in System Preferences.
How can I give access to the 127.0.0.1:8000 server to my iPhone?
When you say "backend server", what is the Python project written in? Django, Flask, Pyramid, something else?

Resources