i am using expo
until now i worked on development mode and everything worked fine, but when switched to preview mode
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
i get “Fetching events failed: Network Error”
i printed this error to the screen
const response = await axiosInstance.get(`/events/by-location`, {}
....
} catch (error) {
Alert.alert("Error", `Fetching events failed: ${error.message}`);
the server is running on aws. so its not localhost problem or anything like that.
does anyone has idea why could this happen?
i thought maybe it could be because i use http and not https and android is blocking it, but i saw other people have managed to send http request using expo so i dont think that is the problem.
i tried to check that the http request works in different computers and it did, so the problem is probably not in the server