- Managed workflow
eas-cli@0.47.0
The app bundle built with eas
is failing API network requests.
I’ve tried running the app with production variables on a custom development client. The app runs fine on it. All the API requests are working.
But they are not working on the app bundle built with eas build
, which I’ve published on Play Store.
I’m using axios
to make API calls.
const handleAPIError = (error) => {
console.log("NETWORK ERROR");
if (error.response) {
// Request made and server responded
if (error.response.status >= 500) return "Server Error";
else return error.response.data.detail;
} else if (error.request) {
// The request was made but no response was received
console.log("The request was made but no response was received");
return "No Internet Connection";
} else {
// Something happened in setting up the request that triggered an Error
console.log("ERROR MESSAGE", error.message);
return error.message;
}
};
The error is happening at error.request
on the built app bundle.