Can't connect to localhost after expo update - react-native

I use expo and my iphone for create react-native application locally. A few months ago all was good. I used my local ip address for connecting to my local backend server. But after update expo started generate url as exp://r2-asw...exp.direct:80. Now I always get a connection error. I even can use my api via browser using my ip and port.
If I choose LAN instead Tunnel there is an infinity loader and get an error "There was a problem running the requested app. The request timed out"

The problem was in mac Brandmauer

Related

why does json-server only work on localhost server?

I have an app where I used json-server to create a quick backend for me to test. My app now works the way I want it to, but I realized that my app doesn't work on other laptops/phones because my json-server uses localhost. Can json-server work with custom URLs, or does it only work on localhost? Do I have to start over and use a different backend? If so, does anyone have suggestions for which backend I should use?
If you want to test your backend on a cellphone or another thing you need two things
First
Your server and your client, in this case the cellphone both of them needs to be connected on the same wifi aka Local network
Second
Yow backend instead of pointing to localhost you need to specify the ip of your computer
json-server --host 192.168.0.xx file.json --port 4000

How to test api calls from flutter app to localhost service?

I'm trying to understand how to test http calls from my flutter app (which is running in an emulator) to my backend service, which is running in debug on my pc on https://localhost:8080.
I get that talking to https://localhost:8080 directly from flutter won't work because it means "emulator's localhost", so I'm talking to my pc local ip, but I got CERTIFICATE_VERIFY_FAILED because of course https://192.168.1.123:8080 doesn't have a signed cert.
What is the correct way to handle this situation?
You need to use the localhost of your host machine, not the localhost of your emulator. To do that you need to use 10.0.2.2 and then your port number, so in your case make http calls to https://10.0.2.2:8080. Internally Android reroutes calls to 10.0.2.2 to 127.0.0.1, which is the localhost ip on your dev machine.
How do you connect localhost in the Android emulator?
Some more info: https://developer.android.com/studio/run/emulator-networking.html

WLAuthorizationManager.obtainAccessToken doesn't work when app uses proxy

I need to have an Android app where I use a proxy URL to connect to our MFP 8.0 server. When I make an android build without proxy pointing directly to the MFP server the app registers in the server and I am able to see the push notification in my device.
But when using a proxy in the config.xml the app is able to reach the server but returns an error on the step where I do WLAuthorizationManager.obtainAccessToken.
This is the error:
errorCode:"201"
errorMsg:"Created"
responseText:"{"server_version":"8.0.2017081900"}"
status:201
statusText:"Created"

502 proxy error, Oracle VM + Hortonworks sandbox

I am new to Hadoop. Oracle VM with Hortonworks sandbox (OS Red Hat 64bit) with HDP 2.3.2 is up and running. When i am trying to test via http://192.168.56.101 i get the 502 proxy error.
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server
I have done the same installation and configuration on both my pc and mac and i get the same error. I have tried the test from IE and chrome as well.
I also got same issue when I try it in another browser it worked, so you can try in different browser. And also increase your VMware allocated memory for hortonworks VM.
Click on machine tab of Horton sandbox virtual box running instance and click Reset. It worked for me.
Usually it happens when the Ambari is restarting or shutting down. Just wait for a few seconds and it should resolve.
You can also try to open it in incognito mode or clear the cookies.
To clear the cookies, for the chrome browser:
Click on i icon which is at the left side of URL
Click on Cookies
Remove all cookies one-by-one
It should solve.

IBM Worklight request timeout

I made an app that connect to server to get some info
I use HTTPAdapter to send a post request
It runs successfully with preview on my browser
I've check that tha adapter and code has no bug
but it failed when I run it on my virtual device(3G network)
Request timeout for [http://172.16.100.106:10080/WistronAppProject/apps/services/api/WistronApp/android/query]
why i can't send request with different ip domain ?
it has to run in the same network?
there is some other problem?
The device must be able to connect to the same network Worklight Server is in.
If your server does not have a PUBLIC IP address, meaning it is running for example in your office network that is not available outside, then your device MUST be connected to the same office network via WiFi. If you connect via 3G, it will not be able to find the Worklight Server and connect to it.