I have an application in which I need to HTTP post something to a server on a local network (I use IP and not a name in case it’s important for any reason…).
It works well in a browser, on Android and also on Windows arm phone. But not on windows x86. I get an error (immediately, so it’s not a timeout):
Http failure response for (unknown url): 0 Unknown Error
Also, I am absolutely sure it did work before. And I don’t think I changed anything in the code. I have also tried going back to older commits to verify this, but at this point none of them works.
And it’s not a firewall. I even tried to turn it off for a while, but it didn’t help.
Well, of course I have tried that… I decided to post here because all the people having those kinds of problems either say it’s SSL ceritficate issue or CORS issue.
In my case, it cannot be SSL because i use HTTP and not HTTPS and it shouldn’t be CORS because from all the other platforms including Windows on arm it simply works…
I will however try to get more verbose server output so that I know whether the request reaches the server or not.
//EDIT: No, the request definitely doesn’t reach the server. Thus it shouldn’t be CORS, right?
I added some logging to the server, and I get the logs when I connect from Android, browser, Windows Phone… But I don’t get any log when connecting from the x86 windows build. Again, it used to work before…
I get the same error when running Ionic serve from Edge (normally I use Firefox). I incidentally found out, that this one is solved by switching the WiFi network type from private to public (yes, from private to public - one would expect it to be the other way around…). But the UWP packed version still doedn’t send HTTP POST even on public network.
May have something to do with:
//EDIT: It even seems to work in debug mode, but not in release mode…