Back

ApprwriteException : Network request failed

  • 0
  • Android
  • React Native
  • Apple
chrissiku
25 May, 2024, 21:32

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(), {

TypeScript
  }
);

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

TL;DR
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.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more