Analytics server being down causes game to crash
EthanZeigler opened this issue ยท 7 comments
So, uh... This is a big boy mistake.
When the analytics server is down and analytics are enabled, the entire game client crashes.
[00:30:17] [pool-8-thread-2/ERROR]: [libIPN]
java.io.IOException: Server returned HTTP response code: 503 for URL: https://p.anti-ad.org/api/event
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ~[?:?]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) ~[?:?]
at org.anti_ad.mc.common.moreinfo.InfoManagerBase.sendEvent(InfoManagerBase.kt:110) ~[libIPN-fabric-1.19.4-2.0.4.jar:?]
at org.anti_ad.mc.common.moreinfo.InfoManagerBase.doEvent$lambda$0(InfoManagerBase.kt:81) ~[libIPN-fabric-1.19.4-2.0.4.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
At the time of writing the analytics server appears to be down and there's no error handling for this scenario.
the server have been down for ages.
is it that you just get errors in the logs or it's a real crash
Real crash, sadly. Server(ish) stops responding directly after this error and the client closes. Disabling and enabling the analytics sadly causes it to work or fail respectfully. This is all on single player btw.
Very weird.
I'll experiment with this some more tomorrow and see if I can get a better explanation of what's actually happening. Maybe something else in the logging about why it closed.
the analytics server us up once more
but in the next release I'll make sure that the exception is not logged