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

Follow-up error dialogs: Couldn't load achievements (HttpServerErrorException) -> couldn't show achievments (NullPointerException) #833

Closed
germanicianus opened this issue Mar 25, 2018 · 4 comments
Labels
bug S5 mini severity 5 - mini - cosmetic problem like misspelled words or misaligned text waiting for other projects

Comments

@germanicianus
Copy link
Contributor

image

Initial exception:

java.util.concurrent.CompletionException: org.springframework.web.client.HttpServerErrorException: 504 Gateway Time-out
	at org.springframework.aop.interceptor.AsyncExecutionAspectSupport$CompletableFutureDelegate$1.get(AsyncExecutionAspectSupport.java:324)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.web.client.HttpServerErrorException: 504 Gateway Time-out
	at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:94)
	at com.faforever.client.api.JsonApiErrorHandler.handleError(JsonApiErrorHandler.java:31)
	at org.springframework.security.oauth2.client.http.OAuth2ErrorHandler.handleError(OAuth2ErrorHandler.java:83)
	at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
	at org.springframework.security.oauth2.client.OAuth2RestTemplate.doExecute(OAuth2RestTemplate.java:128)
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
	at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:287)
	at com.faforever.client.api.FafApiAccessorImpl.getPage(FafApiAccessorImpl.java:573)
	at com.faforever.client.api.FafApiAccessorImpl.getPage(FafApiAccessorImpl.java:560)
	at com.faforever.client.api.FafApiAccessorImpl.getMany(FafApiAccessorImpl.java:550)
	at com.faforever.client.api.FafApiAccessorImpl.getAll(FafApiAccessorImpl.java:540)
	at com.faforever.client.api.FafApiAccessorImpl.getAchievementDefinitions(FafApiAccessorImpl.java:152)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
	at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:345)
	at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:408)
	at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:327)
	at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy65.getAchievementDefinitions(Unknown Source)
	at com.faforever.client.remote.FafServiceImpl.getAchievementDefinitions(FafServiceImpl.java:313)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:115)
	at org.springframework.aop.interceptor.AsyncExecutionAspectSupport$CompletableFutureDelegate$1.get(AsyncExecutionAspectSupport.java:321)
	... 4 more

Follow-up exception:

java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1595)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at com.faforever.client.chat.UserInfoWindowController.updatePlayerAchievements(UserInfoWindowController.java:376)
	at com.faforever.client.chat.UserInfoWindowController.lambda$loadAchievements$18(UserInfoWindowController.java:281)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 6 more
@germanicianus
Copy link
Contributor Author

Now I know at least where "Verwerfen" ("Dismiss") is used 😁 .

@1-alex98
Copy link
Member

THis is due to the api, calculation your achievements in a costfull manner

@germanicianus
Copy link
Contributor Author

But at least the outcome of this problem shouldn't be two error dialogs, correct? In this case the Achievements tab isn't even visible but the Statistics tab is.

I would expect some useful message displayed in the UI on the Achievements tab like "information unavailable", but no user unfriendly error dialogs. 😉

@germanicianus germanicianus added the S5 mini severity 5 - mini - cosmetic problem like misspelled words or misaligned text label Mar 26, 2018
@1-alex98
Copy link
Member

1-alex98 commented Apr 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug S5 mini severity 5 - mini - cosmetic problem like misspelled words or misaligned text waiting for other projects
Projects
None yet
Development

No branches or pull requests

2 participants