chrissikuOriginal post
Web Developer
I'm working on A reactNative app, when trying to create a new Entry. The bellow code works only on IOS but on Android I have the AppwriteException : Network request failed
export const createEntry = async () => {
try {
const newEntry = await databases.createDocument(
databaseId,
productCollectionId,
ID.unique(),
{
}
);
return newEntry;
} catch (error) {
throw new Error(error);
}
};
Having the same error on Android.
The code is working perfectly on IOS but on Android I have the AppwriteException: Nextwork request failed.
if there is any possible fix, please share
Summary
Issue: AppwriteException - Network request failed on Android, works on iOS.
Solution: The error likely stems from a network request issue specific to Android devices. Consider checking the Android device's internet connection and network settings. Additionally, ensure that the app has proper permissions for network access on the Android device. Testing the network request with a different network or using a simulator to reproduce the issue might help in diagnosing the cause of the problem. Check for any potential differences in network configurations between iOS and Android that could affect the request.