We have upgraded our Nginx server and some requests from a mobile app build with react native 0.38.1 http requests stoped working. If we disable http/2 on nginx the requests works again. The problem is noticed only on android phones.
Is there a way to disable react native http2 calls?
We use RNFetchBlob.fetch(.... ) to execute http calls
the error we receive is
Error: Expected ':status' header not present
Related
I have a react native project that was created on the expo and will work on android.
I want to create a HTTP server on any port on localhost and I will take the request body from there and use it anywhere on my project.
How can I do that?
Apk will work on a phone that will be connected to a different network. I can't connect to the internet
I need to get request from android app Im using Memu emulator
I installed xposed and sslunpinning
when i use proxy with burp suit or fiddler
the app not conneted !!
how can I fix this problem
When I fetch Data from API using http it works fine.But After SSL certification of the Server api,Webservices is not working after changing http to https.
it Gives me Network error on axios.
it works perfectly on ios but in android it gives me network error
any solution?
I'm trying to use proxy with my react-native app (build with CRNA and Expo).
So in my package.json file I put : "proxy": "192.168.1.27:8080" and then make simple get request with fetch with the/users` path and react call me network error (he don't see the proxy param, just /users when I'm debugging).
The fetch request work well if I put the full url.
In react (for website) I do the same thing and that's work to.
Thank's for your help.
In Reactjs proxies are mainly used to avoid cors issues. Since React Native connects to iOS & Android natively, there is no browser issue so you don't need a proxy.
The approach I use is to call http:127.0.0.1:nnnn/api/route (not localhost) in the React Native app when testing the backend, and the deployed url in production. So you can deploy your server separately and reach it directly in the app.
I am trying to use socket.io inside an Android Webview, inside a native Android app. The Android activity file has been updated with;
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("file:///android_asset/www/public/index.html");
My problem is loading the socket.io.js libraries from the index.html:
<script src="http://mydomain:port/socket.io/socket.io.js"></script>
The error I get during the rendering of the webview is:
XMLHttpRequest cannot load http://mydomain:port/socket.io... Origin null is not allowed by Access-Control-Allow-Origin.
I am using a node.js/express server to try and serve the libraries and thought I had configured this to accept cross-origin-resource-sharing (CORS) by setting
res.header('Access-Control-Allow-Origin', "*");
Now I am completely stuck! Can anybody recommend a way forward to get socket.io working in this configuration?
Cheers,
Kirbs
why not run service socket.io at activity, try my answer at this
singleton service socket.io
I using socket-io.java client library from github
Gottox