MinecraftWars / Gringotts

Item based economy plugin for Bukkit
BSD 2-Clause "Simplified" License
37 stars 76 forks source link

TimeoutException when given a fake OfflinePlayer object via Vault #174

Closed AuroraLS3 closed 3 years ago

AuroraLS3 commented 6 years ago

Original issue here

org.gestern.gringotts.GringottsException: java.util.concurrent.TimeoutException
   org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:296)
   org.gestern.gringotts.GringottsAccount.balance(GringottsAccount.java:85)
   org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.balance(GringottsEco.java:251)
   org.gestern.gringotts.api.impl.VaultConnector.getBalance(VaultConnector.java:81)
   com.djrapitops.pluginbridge.plan.vault.VaultEcoData.getServerData(VaultEcoData.java:64)
   com.djrapitops.plan.utilities.analysis.Analysis.lambda$analyzeAdditionalPluginData$4(Analysis.java:144)
   java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
   java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
   java.util.stream.AbstractPipeline.copyInto(Unknown Source)
   java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
   java.util.concurrent.CountedCompleter.exec(Unknown Source)
   java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
   java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
   java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
   java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by:
java.util.concurrent.TimeoutException
   java.util.concurrent.CompletableFuture.timedGet(Unknown Source)
   java.util.concurrent.CompletableFuture.get(Unknown Source)
   org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:294)
   org.gestern.gringotts.GringottsAccount.balance(GringottsAccount.java:85)
   org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.balance(GringottsEco.java:251)
   org.gestern.gringotts.api.impl.VaultConnector.getBalance(VaultConnector.java:81)
   com.djrapitops.pluginbridge.plan.vault.VaultEcoData.getServerData(VaultEcoData.java:64)
   com.djrapitops.plan.utilities.analysis.Analysis.lambda$analyzeAdditionalPluginData$4(Analysis.java:144)
   java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
   java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
   java.util.stream.AbstractPipeline.copyInto(Unknown Source)
   java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
   java.util.concurrent.CountedCompleter.exec(Unknown Source)
   java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
   java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
   java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
   java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Fake OfflinePlayer object only has valid name and UUID - UUID may be an UUID which has not visited the server, but has visited another server on the network. I suspect it's that it's an UUID that has not visited the server yet.

Fake object: https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/4.3.0/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/FakeOfflinePlayer.java

AuroraLS3 commented 3 years ago

Fake OfflinePlayer no longer in use, issue is no longer applicable