Skip to content Skip to sidebar Skip to footer

Retrofit Sockettimeoutexception (and/or Http 500 Error) On Http-post

I'm trying to do a POST request to our backend server, but I keep getting SocketTimeOutExceptions or HTTP 500 error. And it keeps switching between those two randomly (even with t

Solution 1:

Ok so turns out the error was because of the following. Our school used a cheap VPN where the server was running on. I always tested this app by running and debugging it on a physical device instead of running it on an emulator.

You had to use the VPN's app to be able to connect to the server, for some reason the connection went down regularly, so whenever we had a timeout exception we just had to restart the VPN connection through the app and we were sure to not receive any timeout exceptions for about a minute or so.

This is what you get when schools try to cut budgets everywhere..

And of course the HTTP-500 was because of an error in our code obviously :)

Post a Comment for "Retrofit Sockettimeoutexception (and/or Http 500 Error) On Http-post"