33 questions
0
votes
0
answers
46
views
Unwanted Splashscreen shows after clicking submit button in apk builds
When I test my app on Expo Go, I get absolutely no errors and my app runs fine. On creating a build, when I try to login and click the sign in button, the app suddenly goes into SplashScreen. The same ...
0
votes
0
answers
448
views
SyntaxError: Unexpected token 'n', "#" is not valid JSON (React Native app)
I am trying to create an app using react native as the front end and node.js + express + mongoDB as the backend. I have no issues viewing the data from mongoDB in react native, my issue is when I try ...
1
vote
1
answer
833
views
apisauce npm is giving error (Uncaught TypeError: axios.create is not a function) in my mac in my reactjs project
I am getting this error in console of browser. However, it had started after when I had done factory reset of my MacBook. I have no idea why I am getting this error in this npm. Because I had used ...
-2
votes
2
answers
142
views
State setting, state rehydration and api calls are happening twice
I'm using
apisauce: ^2.1.6,
react: 18.1.0,
react-native: 0.70.4,
react-redux: ^8.0.4,
redux: ^4.2.0,
redux-logger: ^3.0.6,
redux-persist: ^6.0.0,
redux-saga: ^1.2.1
The problem I'm facing is each and ...
0
votes
1
answer
347
views
How to increase server timeout in Apisauce
I have a request that exceeds 30 seconds, but it can be completed after 30 seconds. How can I increase the server timeout?
I increased the timeout on the config file but it didn't work
1
vote
0
answers
73
views
How do you type hint overriding a built in axios method that returns a promise?
I've been trying to add a caching layer to apisauce.
I followed a guide on https://techblog.geekyants.com/a-guide-to-react-native-offline-support which gave me the following code:
import {create} from ...
0
votes
1
answer
417
views
Apisauce interceptor
Recently i had to rewrite all of my API calls with Apisauce, is amazing but i have very repeating code which looks like this:
const response: ApiResponse<{ result: ReponseType }> = await api....
0
votes
1
answer
162
views
Can't fetch my data from my backend(NodeJS) to my react native app
I have tried to get my json data but it's not working. It works to get the data on postman and on chrome but when I try to fetch the data it comes back as null. I'm using apisauce.
any ideas? I'm new ...
0
votes
0
answers
49
views
Problem rendering flatlist data with api sauce
So i'm building a very simple mobile app that fetches clients data .so far everything is working fine. The only problem i keep encountering is rendering Flatlist data using api sauce. My api call is ...
0
votes
1
answer
472
views
NETWORK_ERROR apisauce
when i try to fetch data from my django server i got a NETWORK_ERROR
corsheader in backend is work
i just try localhost and my machine ip and notwork
this is the result of console.log(response....
5
votes
0
answers
528
views
Why have Network Error on https apisauce call
I have an expo react native app that works fine with apisauce and http connection but when i set a https baseurl it shows me network-error but on postman the same call works fine.
error example image
...
2
votes
1
answer
6k
views
How to add query, filter params in axios request
http://localhost:9000/api/res.users?sudo=1&filter=[["id","=",11]]&query={id,name,image_128,phone}
how to compose above url with axios and send it to server.
i tried params ...
-1
votes
1
answer
358
views
React Native apisauce can't connect to server network
I'm learning react native and therefore I'm using an api package by the name of "apisauce" version ^2.1.2.
when backend be called with postman, I receive an array of data and when it be ...
0
votes
0
answers
252
views
Why my code is returning TypeError: baseURL.replace is not a function (In 'baseURL.replace(/\/+$/, '')', 'baseURL.replace' is undefined)?
In my React Native App, I'm using apisauce to communicate with my API and trying to get baseURL from firebase firestore. Do do this I'm using anonymous signing in to access the database. I'm getting ...
0
votes
1
answer
351
views
generator function doesn't resume after yield
So I'm trying to debug why my array of questions is not being properly populated in my mobx-state-tree questions-store. Nothing after the yield statement in the getQuestions action runs.
// question-...
-1
votes
1
answer
1k
views
Why am I unable to get response from my api using #apisauce?
Response is always returning undefined. I'm calling simple log in service using #apisauce in my react native app. Here's my implementation.
This is the handleSubmit method.
import loginApi from '../...
0
votes
0
answers
1k
views
React Native API Request slow on production but fast on development
I'm having a huge problem where my requests take long on the production server but are quick on the development server.
I'm using apisauce to make my requests.
Slow request example:
The login screen ...
2
votes
1
answer
1k
views
https doesnt work on react-native android
When i try to get a request to my api via https protocol it doesnt work (NETWORK_ERROR returns), but if i do it via http it works fine. Im using apisauce. What i've tried:
do request to https://my....
0
votes
1
answer
177
views
How to solve image data response as null in react native when using zoho image fetching api?
I got API to get full image URL from zoho inventory. But when I try to run it in react native using axios, It shows data null as API response. When I tried through postman it works well. Below show ...
0
votes
1
answer
545
views
Handle 401 error in react-redux app using apisauce
The problem: i have many sagas that do not handle an 401 error in response status, and now i have to deal with it. I have apiservice based on apisause and i can write an response monitor with it to ...
2
votes
1
answer
2k
views
React Native app cannot reach backend API on Android, without using Charles + SSL tunnelling
My RN app works perfectly on iOS. But on Android, it cannot reach the backend (hosted in cloud using https) or any other URL like https://randomuser.me/api
But when I make the device use Charles as ...
0
votes
0
answers
424
views
GET request to download PDF using apisauce in react native
I am using apisauce for basic HTTP requests like GET and POST, and it works well. Now I need to be able to download pdf files too. Is this possible with apisauce? If so does anyone have some sample ...
0
votes
1
answer
397
views
How can I download the pdf file using apisauce in React Native?
I am using apisauce for basic http requests like GET and POST, and it works well. Now I need to be able to download pdf files too. Is this possible with apisauce? If so does anyone have some sample ...
5
votes
1
answer
979
views
I need to call a mobx action from inside axios interceptor
When an API returns a 401, I want to force logout the user. The following code is written inside a React Native Ignite project using Mobx
import { useStores } from "../../models"
this....
1
vote
2
answers
1k
views
Conditionally create json object
I'm using APISauce to create a post request to my server.
This works fine, and id, title and desc are variables that I pass in a function.
return client.post("/workout", {
userId: id,
title: ...
2
votes
1
answer
634
views
Is axios convert 0 to null in response?
Hello everyone i'm working with apisause(axios wrapper) and calling an api to get statistics, the results is numbers always but i have a special case when the result is 0 axios somehow convert it into ...
1
vote
0
answers
291
views
Slow Post request in React Native
I am making a post request in react-native using apisauce, but the request is too slow. The request takes around 1000ms in Postman, but is slower in react-native. How can I optimize this?
My sample ...
2
votes
2
answers
2k
views
How do i pass a bearer authorization token with ApiSauce
Please help check if the method i used to pass the bearer authorization token, because its not working, Maybe im missing something please
apiClient.addAsyncRequestTransform(async (request) => {
...
2
votes
3
answers
3k
views
how to fix network error on Apisauce when coonecting with backend
I am using API sauce to to connect to my backend, I have double checked all my paramaters are they are coming, tested with Postman as well and it all works. It just doesnt connect to the backend for ...
3
votes
0
answers
141
views
Unable to render data to ReactNative FlatList on Scroll down using Http POST request
I want to render a list of items in a ReactNative FlatList, initially I am loading 15 items and then load more when user scrolls down. I am using FlatList's onEndReached prop to get new items on ...
4
votes
2
answers
2k
views
OnUploadProgress is only called once
I'm trying to track the progress of data upload on my react native app. I use the plugin apiSauce to call my server running locally (node server with baseURL : 192.xxx.x.xx":9000/).
On the front ...
0
votes
2
answers
275
views
Getting JSON info from API
I'm using Axios(Apisauce) to connect API to React Native App;
this is the JSON file I'm trying to show in-app using FlatList :
{
"data": {
"sideMenu": {
"url":...
2
votes
1
answer
231
views
Not able to install apisauce in react-native project
I tried to install using the following code:
npm i apisauce --save
However, I got these errors:
npm WARN [email protected] requires a peer of
react-navigation@^4.1.1 but none is installed....