Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/wynntils update NPE should have more user friendly message #2118

Open
san7890 opened this issue Sep 24, 2023 · 5 comments
Open

/wynntils update NPE should have more user friendly message #2118

san7890 opened this issue Sep 24, 2023 · 5 comments

Comments

@san7890
Copy link
Contributor

san7890 commented Sep 24, 2023

Try and run /wynntils update and the update will fail (currently on Fabric v0.0.3-alpha.383, while the most up-to-date version at the time of this issue report is v0.0.3-alpha.384):

[00:19:54] [ForkJoinPool.commonPool-worker-19/INFO]: Attempting to fetch Wynntils update.
[00:19:54] [ForkJoinPool.commonPool-worker-19/INFO]: Attempting to download update for stream alpha.
[00:19:57] [ForkJoinPool.commonPool-worker-19/WARN]: Failure in net manager [handleJsonObject], processing API:API_ATHENA_UPDATE_CHECK
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonPrimitive.getAsString()" because the return value of "com.google.gson.JsonObject.getAsJsonPrimitive(String)" is null
	at com.wynntils.services.athena.UpdateService.lambda$tryUpdate$2(UpdateService.java:86) ~[Wynntils.jar:?]
	at com.wynntils.core.net.NetResult.lambda$handleJsonObject$2(NetResult.java:57) ~[Wynntils.jar:?]
	at com.wynntils.core.net.NetResult.lambda$handleReader$1(NetResult.java:46) ~[Wynntils.jar:?]
	at com.wynntils.core.net.NetResult.lambda$wrappingHandler$5(NetResult.java:111) ~[Wynntils.jar:?]
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:844) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
[00:19:57] [ForkJoinPool.commonPool-worker-19/ERROR]: Exception while trying to load new update.

Expected behavior is to have the update apply rather than get the Error applying Wynntils/Artemis Update message. This exception throws when checking for a version mismatch when one connects to the Wynncraft servers as well, as evidented by this message that I also get in my log connecting to a server:

[00:19:49] [Render thread/INFO]: Couldn't fetch latest version, not attempting update reminder or auto-update.

A similar stack trace to the one already posted above precedes this.

@kristofbolyai
Copy link
Collaborator

Try now.

@san7890
Copy link
Contributor Author

san7890 commented Sep 24, 2023

Tried again just now, got this:

[12:53:20] [ForkJoinPool.commonPool-worker-19/INFO]: Attempting to fetch Wynntils update.
[12:53:20] [ForkJoinPool.commonPool-worker-19/INFO]: Attempting to download update for stream alpha.
[12:53:23] [ForkJoinPool.commonPool-worker-19/WARN]: Failure in net manager [handleJsonObject], processing API:API_ATHENA_UPDATE_CHECK
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonPrimitive.getAsString()" because the return value of "com.google.gson.JsonObject.getAsJsonPrimitive(String)" is null
	at com.wynntils.services.athena.UpdateService.lambda$tryUpdate$2(UpdateService.java:86) ~[Wynntils.jar:?]
	at com.wynntils.core.net.NetResult.lambda$handleJsonObject$2(NetResult.java:57) ~[Wynntils.jar:?]
	at com.wynntils.core.net.NetResult.lambda$handleReader$1(NetResult.java:46) ~[Wynntils.jar:?]
	at com.wynntils.core.net.NetResult.lambda$wrappingHandler$5(NetResult.java:111) ~[Wynntils.jar:?]
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:844) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
[12:53:23] [ForkJoinPool.commonPool-worker-19/ERROR]: Exception while trying to load new update.

@magicus
Copy link
Member

magicus commented Sep 26, 2023

I believe this is a failure in Athena, but we could probably handle the exception and present a reasonable error message to the user ("Update service currently unavailable").

@san7890
Copy link
Contributor Author

san7890 commented Oct 2, 2023

this isn't happening anymore, i'm not sure if you want to leave this issue report up so that someone can make it so that the user gets met with a better error about Athena failing

@magicus
Copy link
Member

magicus commented Oct 2, 2023

Yeah, let's reinterpret this bug like that.

@magicus magicus changed the title /wynntils update is throwing an exception /wynntils update NPE should have more user friendly message Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants