Inventory Profiles Next

Inventory Profiles Next

23M Downloads

Analytics server being down causes game to crash

EthanZeigler opened this issue ยท 7 comments

commented

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.

override val target: URL = URL("https://p.anti-ad.org/api/event")

commented

im unable to replicate it now. I guess that's a good thing? lol

commented

the server have been down for ages.

is it that you just get errors in the logs or it's a real crash

commented

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.

commented

I can't recreate the crash.
I just see the exception in the logs.

commented

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.

commented

the analytics server us up once more

but in the next release I'll make sure that the exception is not logged

commented

and I checked the code it's ran in separate thread and the exception is just logged

            executor.execute {
                try {
                    sendEvent(name, value)
                } catch (t: Throwable) {
                    Log.error("", t)
                }
            }