Can't connect to the development server iOS - ios

I wasted a day and a half and still can't figure out what is going on and can't find any working solutions. I can't debug my react native application on a real device. It worked yesterday in the morning. Now it is not working. As for me, I didn't change anything. XCode always loads a pre-bundled file. I am on the same working wifi. There are no issues with emulators, only real device.
When I am creating a personal hotspot on my iPhone and connect through it - it works! But I don't want to use a personal hotspot, I want to use wifi.
What I tried:
1. Reload laptop
2. Reload Mobile
3. Change the IP address to the local inside of AppDelegate.m
4. Clean build
5. Remove and install node_modules
6. Kill -9 everything that runs on port 8081
7. Enable App Transport Security (Xcode)
8. Connect-disconnect the device

Go to Settings>Network>Advanced....>DNS
Add these two entries
8.8.8.8
8.8.4.4
If the entries field is disabled and you're not able to edit it, click on the 'Lock' icon in the bottom area of that window and enter the password to be able to make changes
Possible Duplicate:
Android Studio - Android Emulator Wifi Connected with No Internet

Related

ExpoCLI- IOS Could Not Connect to Server

I have been working on a react native project in Windows 10 for a while now using Expo to scan the given QR code and test the app on my IOS device. The other day I ran $expo start and everything seemed to go fine until I tried to load the app on my IOS device. I received this message:
Could not connect to server
I then "Run in Web Browser" which worked fine, so I tried accessing 127.0.0.1:19000 in my Iphone's browser (firefox) and it as well could not connect to server. My phone is connected via wifi which is 2.4 or 5g. I wasn't sure how this would effect this so I used a wifi adapter on PC to match which wifi connection phone and PC were on and that didn't help.
I am using react version 17.0.1, expo version 3.28.5, and "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz"
I have tried:
Turning off windows firewall
Using different Iphones to connect
npm install --global expo-cli
Changing Connection from "LAN" to "Local"
Reinstalling Node
Creating a System Variable called: "REACT_NATIVE_PACKAGER_HOSTNAME" with the value "192.168.2.108". This did change the LAN IP address as intended but it did not resolve the problem. I just got the same message with the new IP address.
This problem just started happening out of the blue and I'm not really sure what to do next. If you need any additional information I'd be happy to give it.
try to use
expo start --tunnel
When you get the message:
"Error loading DevTools ValidationError: "urlType" must be one of [exp, http, redirect, no-protocol]"
Just wait for a bit and the QR code for tunnel will appear. It does the same for me as well.

How to debug an app on iPhone without internet

I'm using Xcode 10.1, and I don't have a checkbox whether I want to connect through network or not on my device page (which was there in Xcode 9 and Xcode 10 beta). Search "connect via network xcode" on google images if you don't know what I mean.
However, I must debug the offline flow of my app (which is written in React-Native btw). Not just no-internet-connection, but turning off wifi and mobile-data, which will trigger a status change. By using the developer settings of the iPhone, I can make every call fail (100% loss), but cannot change the internet-status of the phone.
So I want the debugger to stay connected and either be able to:
debug the old-school way through the cable (if I turn off internet now, I get a red error screen and nothing is possible anymore), so I can disable wifi and mobile-data,
or simulating that status change on the phone.
Btw, I cannot use a simulator, since the app requires Bluetooth.
Thanks in advance!
Edit:
The checkbox is not there for older iPhone devices. With iPhone 7s, I do see the checkbox "connect via network". But enabling or disabling does not change the fact that your iPhone needs internet to debug. If I disable internet on the phone I get the following error:
Ok, I've found the problem. We are testing on a iPhone5, which is no longer officially supported by Apple. Which means that Apple has decided to cut features for iPhone5 so you would buy a new one (wonderful strategy =/). Hence debugging with a cable is no longer supported on iPhone5.
We tested with a iPhone6 from a colleague, and everything works fine.
Edit:
Altough the checkbox is there, and I can disable wifi for connection... The moment I turn off internet on the phone, the app crashes and says: "Runtime is not ready for debugging: make sure packager runtime is running"... so no solution yet...

Phonegap has recently stopped working?

I haven't used it in a while until now but I cannot get it to work anymore even with a new, generated and unchanged, project. It worked perfectly fine before. It's been updated and the mobile app has been updated.. I've tried the desktop and CLI version.
Details:
Using Windows 10. Desktop App or CLI Phonegap.
Using iPhone iOS 9.0.2 mobile Phonegap app.
Using the basic, generated Phonegap Hello World.
What happens:
1. I serve the application.
2. I open the mobile app and enter credentials.
3. It sits on "Downloading" indefinitely
Note: If I open the URL in a browser on the serving machine it WILL open. If I open it on any other machine it will not.. This confuses me because they're on the same WiFi network so that has nothing to do with it. I even tried turning off my firewall in case the port was being blocked or something. I've tried 3000 and 8080.
Has anyone else experienced this?
I've uninstalled, re-reinstalled, used different versions, etc...
EDIT: I've found a solution, kind of.. If I use the --localtunnel flag it will work. I'm not sure why given that they ARE on the same network. Of course this also means that every single time I serve it is a different address which is quite a hassle. But at least I can test now.

Cannot connect to the internet in a Blackberry 6 simulator in windows machine

I am not able to connect through a blackberry 6 simulator.But blackberry 5 simulator connects to the internet properly.I have updated my proxy settings in rimpublic.property file of the MDS simulator.One strange thing i observed is with BB 6 simulator,I can access files in the local webserver in my machine by giving the IP,but cannot access any external website lets say google.com.With BB 5 simulator,it is the other way around-can access internet but not local webserver.
Anything else I need to do make this work?.Thanks in advance.
Just check another time whether the MDS enabled for the simulator. Another try is just clean the simulator. Go to this path C:\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\simulator\
and search for Clean.bat file and double click on it and wait till it gets completed. Make sure that your simulator is closed during this process. once its completed, check your simulator.

Blackberry Simulator and MDS

Has anybody got the BB simulator and MDS simulator to work?
I have the MDS installed and 4 BB phone sim's. For some reason, when I first install the BB sim it might work and then it will stop working.
Has anybody had this issue and know how to fix it?
The first time I used both, BlackBerry JDE 6.0.0 and its version of MDS-CS, it worked very well. After a couple of simulator reloads to test a Browser-Push application, the 9800 simulator stopped connecting with the Mobile Device Service Simulator. All rules are important, but in my case, rule #3 allowed me to connect the simulator's internet browser after deactivating the WiFi connection
MDS should be running before you start the simulator; and it listens on port 8080, so make sure nothing else is listening on that port before you start it.
The simulator seems to pick up the MDS location from the rimpublic.property file (under MDS/config), which is part of the MDS install, and rimpublic.property needs to have the machine's fully qualified host name in it, not localhost.
If you've started your simulator without the MDS running, you will need to remove the .dmp files in [installroot]/[phonemodel]. This problem often happens with BlackBerry JDE version 6.0.0.
These rules seem to have work for me so far.
Well, there are several common mistakes when using MDS simulator with BlackBerry Simulator.
If you're opening network http connections you need to add "deviceside=false" parameter to your urls
In case you're behind proxy, you have to add several configuration parameters to enable MDS Simulator check them out here
I just spent 2 days trying various of the tips online about MDS (and there are many) but none helped me.
For me, the solution was to turn off network registration upon simulator launch in eclipse.
Edit: this has helped in some situations, but MDS still not always stable.
(posted in case someone with my problem googles to this page)

Resources