When you examine the error that you showed in Chrome devtools, what does it show? Are you using ionic serve when you saw web or did you deploy it?
So to recap:
- the client thinks it is sending one OPTIONS and one POST;
- the server sees two POSTs
The only thing I can think of that would cause that scenario is a proxy in the middle somewhere. Even if it’s happening at the WebView level, the Chrome Network tab would see two requests.
Yes, the fact that a second request starts when running the app on a browser makes me think that it cannot depend on an Android library. It makes me think that it may depend on the server, but at the same time, making the request from Postman/iOS doesn’t happen. So it can’t depend on the server.
There are no proxies.
I don’t know what else to try.
Hi, I’ve already posted the output of dev tools and I’ve tried the app with ‘ionic serve’ and deploying the app with the same result.
What is shown under response when you select the network log entry that appears in red in the picture above?
do you have any updates regarding this issue? did you manage to sort it out somehow? I believe is somehow related to the way Android manages background processes. In my case it happens that I call an api, i put the app in background for some seconds, i open the app again and the api I initially called didn’t get a response yet and it does only after the app is opened again. Sometimes, for some reasons, the server gets multiple requests even if the device make it only once.
We use cloudfare, do you know if there is something related to it maybe? Thanks