All Questions
151
questions
50
votes
17
answers
47k
views
Calling locally hosted server from Expo App
I am creating a react-native app and one of the components I have created contains a property which is populated through data coming from an http request.
Right now I am hosting the server from my ...
13
votes
2
answers
24k
views
Network error with axios and android emulator
I got a React-Native application working with a NodeJS backend which serves an API.
My React-Native front is using Expo and Axios to hit on a route of my NodeJS API (using Hapi, Joi, Knex), which ...
10
votes
0
answers
5k
views
How to ignore SSL issues in axios using React Native?
Hi I'm currently working with react native on Android with Expo. I am trying to send requests to my server which has a valid ssl certificate, but for some reason axios takes it as invalid, so axios ...
7
votes
3
answers
13k
views
axios.post() error about circular structure
Please guide me in case I'm not in proper use of axios. This simple piece of code can directly run:
const axios = require('axios')
axios.post('https://exp.host/--/api/v2/push/send', {"to":[...
7
votes
1
answer
4k
views
Image Upload with React Native, Expo ImagePicker, Rails, Axios and Paperclip
So far everything works in the backend regarding Rails and Paperclip. I have it set up so that when you create a new Post, the image within that post will be uploaded to AWS S3. It works fine on the ...
7
votes
5
answers
38k
views
Possible unhandled promise rejection, network error when using axios
I'm trying to send JSON data using react-native, axios and Expo, but when I press "Send" on my application, I get this warning:
Possible unhandled promise rejection, Error: Network Error
My API ...
7
votes
0
answers
1k
views
how to disable SSL in react native expo in fetch or axios API call
I am trying to disable SSL in react native expo
here is what I have tried
import * as https from "https"
const agent = new https.Agent({
rejectUnauthorized: false,
});
let response = ...
6
votes
2
answers
14k
views
Axios POST request sending nothing with 'multipart/form-data' [React Native - Expo]
Scenario
Front end is basically a React Native (Expo) application where users can issue a report - this includes taking multiple photos and filling in some details.
Backend is just node.js, with ...
6
votes
1
answer
4k
views
How to display a "content-type: image/jpg" response from the API? (React Native) [duplicate]
I'm posting an image, and getting the processed image as a response from the backend. The problem is with the response part. I can't display the image whatever I do.
First of all, Postman works. So ...
5
votes
1
answer
817
views
Metro Cannot resolve url issue in Nx mono repo with expo app
I am getting an error from metro when trying to wrap my application in an AxiosProvider from a custom context.
I really don't know why, because I kept the default Nx configuration but I have a weird ...
4
votes
1
answer
2k
views
How to upload recording file from Expo-av via Axios?
I am trying to upload a file recorded using expo-av via an Axios post request to my server. Forgive me, I am a Python backend dev so I am not that familiar with JS or Axios. I have tried various ...
3
votes
1
answer
1k
views
Why does 'formData' not work in 'axios 0.26.1' in react native Android emulator?
I have use expo-image-picker and axios 0.26.1. formData in axios version 0.26.1 isn't work. when using formData, data is not sent to the api
downgrade axios to version 0.24.0 but I get this error ...
3
votes
4
answers
12k
views
axios.post returns bad request of 400 React Native
I'm getting my token from an API but unfortunately my API is returning 400 bad request. I've already checked my api via Postman and it's working fine there. Kindly let me know solution or any mistake....
3
votes
2
answers
2k
views
React native + react-query + onError does not catch and handle error?
Im using react query as data handler. Im new to react native and kinda new to react query.
Right now i dont really understand why the onError callback is not handling my errors. The error callback is ...
3
votes
0
answers
3k
views
Slow fetch in react native
I don't know if it is a bug or something wrong with my code. But the first fetch takes to long to respond.
Although this problem is only on the app. When I run it on the web, it works like a charm and ...
3
votes
1
answer
1k
views
Fetch from API erroneously returns old "cached" data on Android, latest data on iOS
I'm developing an iOS and Android application in React-Native. It all worked fine until one of my Axios responses on Android gave me old data instead of the most recent server data. On iOS there is no ...
2
votes
3
answers
9k
views
Axios post request network error on android
So i'm posting a formdata object with axios to a node.js server. On iOS everything works perfectly, the data get posted and the image uploaded. But on android i'm getting this error
[AxiosError: ...
2
votes
1
answer
988
views
dont get req header authorization token
I want to send Data with axios to my backend. But req.headers['Authorization'] is undefined. It is not in the header although I send it with axios.
axios:
import axios from 'axios';
const entryGroup =...
2
votes
2
answers
3k
views
Upload image through axios in React Native
I've been dealing with this problem for a while now apparently you can upload a image using FormData and appending the file but I am still unable to get this to work. I have already tried with the ...
2
votes
1
answer
2k
views
Presigned URL image upload with Google Cloud Storage does not upload image correctly (MERN + React Native)
I am able to generate signedUrls from my server and send it back to my React Native (expo) client.
The client is also able to send a put request to the signedUrl with an image object that includes a ...
2
votes
0
answers
564
views
React Native Expo - Why is my proxy not working - making requests leads to TypeError: Network request failed?
Im trying to add a proxy in my react native expo app so I can make api requests to my backend without always specifying http://localhost:3001 during development.
Im not sure if its different with ...
2
votes
0
answers
249
views
React Native : [Unhandled promise rejection: Error: Network Error]
I'm making a simple weather report app with React, Expo. But, there are axios error. Here are my code.
I've cchecked related post on stackkoverflow, but thosee didn't work .
React Native unhandled ...
2
votes
0
answers
511
views
upload mp4 with expo in react native problem
I'm new in react native and this might be a silly question, but when I'm trying to upload .mp4 with react native using expo in my backend server side (laravel) I receive a jpg/jpeg file which is weird ...
1
vote
3
answers
4k
views
Axios network error in expo react-native app
Is there anyone know why an axios network error returns when an expo react-native app is being interacted with a physical iPhone using the expo go app?
Note: cors are enabled from the backend. No such ...
1
vote
3
answers
25k
views
Put API KEY in axios
I just started learn React but I have problem when I trying to make a request to the CoinMarketCap API with axios and tried several ways to set my API key. I have also also tried on Postman but ...
1
vote
2
answers
1k
views
Error 405 using axios post request in react native
I'm making an post request using axios in my expo react native app but I don't know why my post request is returning error
Request failed with status code 405
When I check my API on postman so it ...
1
vote
2
answers
720
views
How to show upload progress using Expo FileSystem.uploadAsync
I have a piece of code as below which uploads a simple file as binary utilizing expo-file-system and everything works fine.
import * as FileSystem from 'expo-file-system';
const res = await ...
1
vote
2
answers
3k
views
AxiosError: Network Error on Android React Native Expo
I keep receiving the Axios Network Error while trying to do get request. Everything is working perfectly fine on iOS. Its only on android where this occurs. On the emulator I noticed when I can change ...
1
vote
2
answers
524
views
Error in working with useEffect for fetching data from an API
I am learning React Native, and in following one of the live-coding sessions on YouTube I have come across the following problem.
What I want to do is: I am making an app with expo and I want to fetch ...
1
vote
1
answer
165
views
trouble to sending the bearer token with fetch and axios
I'm having problems with the token in the two alternatives I tried
uploadAttachment: async (file, id) => {
const token = await AsyncStorage.getItem('token');
let params = { sale: id };
...
1
vote
2
answers
3k
views
React Native network error in POST request when adding a body
it's me again.
I'm learning react native, for now im trying to upload a file, the api is already tested using postman and it does work so I wrote this code:
import * as DocumentPicker from 'expo-...
1
vote
1
answer
218
views
Expo Go app on IOS: Network failure on axios api calls
I'm using expo go to run my react native app on my iphone. I have a backend service hosted on render that handles my api calls. I'm trying to use axios to make calls to this service. Below I have the ...
1
vote
0
answers
40
views
Expo go in browser
I'm using expo go in browser for building an App using React Native.
Whenever I want to import axios, I get problems like this :
components/Signup.js (0:1)
Unable to resolve module 'module://@babel/...
1
vote
1
answer
126
views
AxiosError: Network Error in React Native Expo development build
I'm encountering an issue specific to my React Native Expo development build. I have multiple APIs in my application, and while most of them work without any issues, I'm consistently getting an ...
1
vote
0
answers
68
views
React Native Expo app giving an error with axios [AxiosError: Network Error]
I am following a tutorial on how to make an app with mongoDB and expo router, however when using axios I am getting the error [AxiosError: Network Error].I will be listing the code of the function ...
1
vote
1
answer
63
views
React Native Axios is sending entire object and not just the value
This is driving me insane. I am only trying to post a date to my api and I am getting a json error of "The JSON value could not be converted to System.DateTime."
The reason why is axios or ...
1
vote
0
answers
576
views
Expo Issue: Unable to make an HTTP request
I have a strange problem.
I've created an expo app using axios to make a simple request to an API, and everything works fine with Expo Go, but once the app is built with EAS, I get an error: no ...
1
vote
0
answers
123
views
Fetching data with Axios in React Native
I created a react-native app using expo. I am trying to query for the photos using the Google Places API but I get an Axios error as shown below. However, if I paste the URL on the browser it works.
...
1
vote
1
answer
354
views
Why are my images in my form data being sent with file size of 0?
I'm able to upload images through my backend route (to Cloudinary) using Postman, but every time I send images from my frontend (Expo/RN), my backend errors out with a 500 error saying that the File ...
1
vote
3
answers
3k
views
Axios giving "Network error" on iOS-devices (and "Request failed with status code 404")
I'm having a bug on iOS devices. All requests to my API fails with either the error Network Error or Request failed with status code 404. I tried a bunch of things to debug it.
More context
The app ...
1
vote
0
answers
41
views
UNABLE TO VERIFY LEAF SIGNASTURE, react native with VPN
Trying to connect RN app to vpn,
basically user enters domain, then username and password and the app will use the inputed domain for requests,
only issue, some users have vpn and upon trying it out ...
1
vote
0
answers
353
views
SSL causing 'Network Error' in React Native Expo project with Axios - how to ignore SSL for development?
I am working on a React Native Expo project.
react-native: 0.71.7
expo: 48.0.15
Axios: 1.4.0
When I request the server I get a "Network Error". I think it is because of SSL. How can I bypass ...
1
vote
2
answers
108
views
Multiple useEffect in react-native to achieve mentioned functionality
I need help with the async nature of Async storage and axios api. Here's the functionality that I am trying to achieve ->
send request to two separate api to get some data.
display that data on ...
1
vote
0
answers
362
views
CORS with Flask, axios and https not working (response header sends origin as http instead of https)
My frontend (Expo Go web) is running at http://localhost:19006/ but when it receives a response from the backend, it somehow believes it runs under https://localhost:19006/
Also, the iOS version of ...
1
vote
1
answer
1k
views
Send JSON and file (image & video) with multipart using axios in Expo React Native
I am trying to send multipart request using axios on a Expo React Native project but after spend a lot of time looking for the correct approach I cannot make it work in Android neither emulator or ...
1
vote
1
answer
392
views
.NET 7.0 and React Native not working with Axios call
My .NET api which was working perfectly well with .NET 6.x is not working with .NET 7. I can make http requests with Thunder Client and Swagger but it won't work with my React Native (expo) app. I ...
1
vote
1
answer
599
views
node_modules/@tanstack/query-core/build/lib/mutation.js:153:10 in Mutation#execute react native expo
I'm buiding React Native Expo App with external rest api.
I have created reusable axios api call:
// axiosAPi.js
export const axiosApi = async (method, url, obj = {}) => {
try {
switch (...
1
vote
1
answer
973
views
Axios Network Error with React native, Nodejs, Express, MongoDB
I am trying to develop make app with server.
I had a below settings.
React native Expo-cli
nodejs + express
mongodb
I had some trouble connecting client program and server program with physical ...
1
vote
1
answer
23k
views
Axios showing Error:" Err_Bad_Request" while sending formdata using React native Expo
I'm attempting to send both image data (in Buffer format) and some text using formData from my Expo React Native application to a Node.js server with MongoDB. Strangely, I'm encountering an issue ...
1
vote
1
answer
2k
views
HTTP requests does not work on my real android device (React Native Expo Tunnel)
I'm facing this issue while posting data to my server via axios.post(). It always catches the error "Network Error" when I run my app on my real android device. But when I use an android ...