Missing categories
SlimeDog opened this issue · comments
Paper 1.20.4-324
HeadsPluginAPI 3.2.1
HeadsInventory 1.11.1
On server start-up:
[16:12:01] [Craft Scheduler Thread - 8 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Found categories to be updated: [miscellaneous, food-drinks]
[16:12:01] [Craft Scheduler Thread - 8 - HeadsPluginAPI/WARN]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] No heads found for category miscellaneous. Skipping this category
[16:12:02] [Craft Scheduler Thread - 8 - HeadsPluginAPI/WARN]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] No heads found for category food-drinks. Skipping this category
[16:12:02] [Craft Scheduler Thread - 8 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.ProfilerImpl] Done updating necessary categories in 1.515s.
Is caused by being unable to reach the heads website (you can turn on http errors in the config to see those).
Does it still happen?
It happens on every attempt, for categories food-drink
and miscellaneous
. Other categories are found.
logs/2023-12-15-2.log.gz:[08:32:50] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Found categories to be updated: [miscellaneous, humanoid, plants, blocks, food-drinks, monsters, animals, alphabet, humans]
logs/2023-12-15-2.log.gz:[08:32:51] [Craft Scheduler Thread - 9 - HeadsPluginAPI/WARN]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] No heads found for category miscellaneous. Skipping this category
logs/2023-12-15-2.log.gz:[08:32:51] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Updating category: humanoid
logs/2023-12-15-2.log.gz:[08:38:08] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Updating category: plants
logs/2023-12-15-2.log.gz:[08:39:02] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Updating category: blocks
logs/2023-12-15-2.log.gz:[08:40:19] [Craft Scheduler Thread - 9 - HeadsPluginAPI/WARN]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] No heads found for category food-drinks. Skipping this category
logs/2023-12-15-2.log.gz:[08:40:20] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Updating category: monsters
logs/2023-12-15-2.log.gz:[08:42:56] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Updating category: animals
logs/2023-12-15-2.log.gz:[08:45:56] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Updating category: alphabet
logs/2023-12-15-2.log.gz:[08:50:14] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] Updating category: humans
logs/2023-12-15-2.log.gz:[08:59:01] [Craft Scheduler Thread - 9 - HeadsPluginAPI/INFO]: [com.github.cc007.headsplugin.business.services.ProfilerImpl] Done updating necessary categories in 1570.985s.
Allowing HTTP errors:
[09:13:59] [Craft Scheduler Thread - 8 - HeadsPluginAPI/ERROR]: [com.github.cc007.headsplugin.integration.daos.MinecraftHeadsDao] [500 Internal Server Error] during [GET] to [https://minecraft-heads.com/scripts/api.php?cat=miscellaneous] [MinecraftHeadsClient#getCategory(String)]: []
[09:13:59] [Craft Scheduler Thread - 8 - HeadsPluginAPI/WARN]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] No heads found for category miscellaneous. Skipping this category
[09:14:00] [Craft Scheduler Thread - 8 - HeadsPluginAPI/ERROR]: [com.github.cc007.headsplugin.integration.daos.MinecraftHeadsDao] [500 Internal Server Error] during [GET] to [https://minecraft-heads.com/scripts/api.php?cat=food-drinks] [MinecraftHeadsClient#getCategory(String)]: []
[09:14:00] [Craft Scheduler Thread - 8 - HeadsPluginAPI/WARN]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] No heads found for category food-drinks. Skipping this category
So the categories appear to have changed. Or the API has changed. Note that
for example, still returns a page of heads. As does
https://minecraft-heads.com/scripts/api.php?cat=miscellaneous
FWIW, I sent the following to info@minecraft-heads.com
I am a consumer of HeadsPluginAPI. As of recently, the following calls, generated on plugin enable
https://minecraft-heads.com/scripts/api.php?cat=food-drinks
https://minecraft-heads.com/scripts/api.php?cat=miscellaneous
return an empty set, but appear to be accepted parameter values per the below, in that illegal parameter values report the following:
Minecraft-Heads - API v1.0
The Minecraft-Heads API can deliver all heads of a certain category of the Custom Heads Collection.
To do so, you've to set a category as parameter. Categories are the following:
alphabet, animals, blocks, decoration, food-drinks, humans, humanoid, miscellaneous, monsters, plants
Please advise.
I checked today and I think that your email might have done the trick. Both Food-drinks and Miscellaneous seem to work now.
I have had several communications with minecraft-heads.com.
I have no way to verify that it is fixed, since a password is now required. A server start-up just now generated
[07:21:24] [Craft Scheduler Thread - 10 - HeadsPluginAPI/WARN]: [HeadsPluginAPI] Plugin HeadsPluginAPI v3.2.1 generated an exception while executing task 12389
feign.FeignException$Unauthorized: [401 Unauthorized] during [GET] to [https://minecraft-heads.com/scripts/api.php?cat=miscellaneous] [MinecraftHeadsClient#getCategory(String)]: [<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access th... (466 bytes)]
at feign.FeignException.clientErrorStatus(FeignException.java:197) ~[HeadsPluginAPI-3.2.1.jar:?]
at feign.FeignException.errorStatus(FeignException.java:177) ~[HeadsPluginAPI-3.2.1.jar:?]
at feign.FeignException.errorStatus(FeignException.java:169) ~[HeadsPluginAPI-3.2.1.jar:?]
at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[HeadsPluginAPI-3.2.1.jar:?]
at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[HeadsPluginAPI-3.2.1.jar:?]
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[HeadsPluginAPI-3.2.1.jar:?]
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[HeadsPluginAPI-3.2.1.jar:?]
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[HeadsPluginAPI-3.2.1.jar:?]
at jdk.proxy19.$Proxy159.getCategory(Unknown Source) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.integration.daos.MinecraftHeadsDao.getCategoryHeads(MinecraftHeadsDao.java:39) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$requestCategoryHeads$8(CategoryUpdaterImpl.java:135) ~[HeadsPluginAPI-3.2.1.jar:?]
at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180) ~[?:?]
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1715) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.requestCategoryHeads(CategoryUpdaterImpl.java:133) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategories$7(CategoryUpdaterImpl.java:113) ~[HeadsPluginAPI-3.2.1.jar:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategories(CategoryUpdaterImpl.java:112) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$3(CategoryUpdaterImpl.java:71) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:108) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:81) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$4(CategoryUpdaterImpl.java:68) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:64) ~[HeadsPluginAPI-3.2.1.jar:?]
at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategoriesIfNecessary(CategoryUpdaterImpl.java:66) ~[HeadsPluginAPI-3.2.1.jar:?]
at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.4.jar:git-Paper-334]
at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.4.jar:git-Paper-334]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.4.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
and of course
headspluginapi authenticate
doesn't do anything.
No authentication should be needed. It was probably misconfigured on their end.
Since you told me on Discord that the issue is resolved, I'll leave this ticket closed.