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

Unable to fetch assets from "api.loohpjames.com" #38

Open
KillerOfPie opened this issue Dec 1, 2023 · 9 comments
Open

Unable to fetch assets from "api.loohpjames.com" #38

KillerOfPie opened this issue Dec 1, 2023 · 9 comments

Comments

@KillerOfPie
Copy link

Got this error multiple times between 16:02 and 16:27.

Don't think a stack trace is necessary here. Also, if this is thrown could you make it check if a connection can be made to another server like google or Mojang auth to validate if it is a Server Internet issue or API site issue and provide an appropriate warning?

[InteractiveChatDiscordSRVAddon] Plugin InteractiveChatDiscordSrvAddon v4.2.8.0 generated an exception while executing task 158
java.lang.RuntimeException: Unable to fetch assets from "api.loohpjames.com". This could be an internet issue or "api.loohpjames.com" is down. If the plugin functions correctly after this, this error can be ignored.
        at com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager.ensureData(ResourceDownloadManager.java:93) ~[InteractiveChatDiscordSrvAddon-4.2.8.0.jar:?]
        at com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager.downloadExtras(ResourceDownloadManager.java:233) ~[InteractiveChatDiscordSrvAddon-4.2.8.0.jar:?]
        at com.loohp.interactivechatdiscordsrvaddon.AssetsDownloader.loadExtras(AssetsDownloader.java:168) ~[InteractiveChatDiscordSrvAddon-4.2.8.0.jar:?]
        at com.loohp.interactivechatdiscordsrvaddon.InteractiveChatDiscordSrvAddon.lambda$onEnable$3(InteractiveChatDiscordSrvAddon.java:387) ~[InteractiveChatDiscordSrvAddon-4.2.8.0.jar:?]
        at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.2.jar:git-Paper-280]
        at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.2.jar:git-Paper-280]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.2.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
@Unix-User
Copy link

this is happening here to:

java.lang.RuntimeException: Unable to fetch assets from "api.loohpjames.com". This could be an internet issue or "api.loohpjames.com" is down. If the plugin functions correctly after this, this error can be ignored.
    at InteractiveChatDiscordSrvAddon-4.2.10.1.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager.ensureData(ResourceDownloadManager.java:93)
    at InteractiveChatDiscordSrvAddon-4.2.10.1.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager.downloadExtras(ResourceDownloadManager.java:233)
    at InteractiveChatDiscordSrvAddon-4.2.10.1.jar//com.loohp.interactivechatdiscordsrvaddon.AssetsDownloader.loadExtras(AssetsDownloader.java:168)
    at InteractiveChatDiscordSrvAddon-4.2.10.1.jar//com.loohp.interactivechatdiscordsrvaddon.InteractiveChatDiscordSrvAddon.lambda$onEnable$3(InteractiveChatDiscordSrvAddon.java:387)
    at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
    at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1623)```

@mist8kengas
Copy link

The issue seems to be a timeout error caused by the API responding after at least ~40 seconds.
This results in Cloudflare returning a 522 Connection Timed Out error response.

#
# route that returns all the latest versions of LOOHP's plugins
$ time curl -s https://api.loohpjames.com/spigot/data
error code: 522
real    0m40.286s
user    0m0.000s
sys     0m0.047s

$ time curl -s https://api.loohpjames.com/spigot/data
error code: 522
real    0m39.326s
user    0m0.015s
sys     0m0.015s

$ time curl -s https://api.loohpjames.com/spigot/data
error code: 524
real    3m29.504s
user    0m0.000s
sys     0m0.046s

#
# base route
$ time curl -s https://api.loohpjames.com
{"Status":"OK","Runtime-Mode":"productionMode","Application-Author":"LOOHP","Soulmate-Count":1,"Application-Description":"LOOHP's Public API.","API-Version":"v1","Application-Owner":"LOOHP","Given-Name":"AppLEshakE","Splash":"Distance is measured with love. \uD83C\uDF20"}
real    1m2.286s
user    0m0.000s
sys     0m0.062s

$ time curl -s https://api.loohpjames.com
error code: 525
real    1m18.614s
user    0m0.000s
sys     0m0.031s

$ time curl -s https://api.loohpjames.com
{"Status":"OK","Runtime-Mode":"productionMode","Application-Author":"LOOHP","Soulmate-Count":1,"Application-Description":"LOOHP's Public API.","API-Version":"v1","Application-Owner":"LOOHP","Given-Name":"AppLEshakE","Splash":"Dream, Imagine, Stay Wild."}
real    1m35.499s
user    0m0.015s
sys     0m0.031s

@Espressocodes
Copy link

Espressocodes commented Aug 1, 2024

Getting the same issue as well since latest dev build. Attempted rollback but it's all the same api so it's the same problem. It doesn't seem to mess with the server function, but to be consistent here's the report:

It goes up and down so I'm guessing the connection is just having issues.

java.lang.RuntimeException: Unable to fetch assets from "api.loohpjames.com". This could be an internet issue or "api.loohpjames.com" is down. If the plugin functions correctly after this, this error can be ignored.
	at InteractiveChatDiscordSrvAddon-4.2.11.0.jar/com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager.ensureData(ResourceDownloadManager.java:93) ~[InteractiveChatDiscordSrvAddon-4.2.11.0.jar:?]
	at InteractiveChatDiscordSrvAddon-4.2.11.0.jar/com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager.downloadExtras(ResourceDownloadManager.java:233) ~[InteractiveChatDiscordSrvAddon-4.2.11.0.jar:?]
	at InteractiveChatDiscordSrvAddon-4.2.11.0.jar/com.loohp.interactivechatdiscordsrvaddon.AssetsDownloader.loadExtras(AssetsDownloader.java:168) ~[InteractiveChatDiscordSrvAddon-4.2.11.0.jar:?]
	at InteractiveChatDiscordSrvAddon-4.2.11.0.jar/com.loohp.interactivechatdiscordsrvaddon.InteractiveChatDiscordSrvAddon.lambda$onEnable$3(InteractiveChatDiscordSrvAddon.java:388) ~[InteractiveChatDiscordSrvAddon-4.2.11.0.jar:?]
	at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.jar:1.21-123-0a1be9a]
	at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.jar:1.21-123-0a1be9a]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.21.jar:?]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

@LOOHP
Copy link
Owner

LOOHP commented Aug 1, 2024

Yes there's been some connection issues to the server lately. If only I can afford a better one haha. Well, in the meantime if it continues to work correctly then you can ignore these connection errors.

@mist8kengas
Copy link

Yes there's been some connection issues to the server lately. If only I can afford a better one haha. Well, in the meantime if it continues to work correctly then you can ignore these connection errors.

How much load does your current server handle? I might be able to donate some of my servers' computing power if needed :)

@Espressocodes
Copy link

Seconding the last comment. If you need some I would happily donate some server for the api as a fallback. I can't do an immense amount of traffic but I can do some.

@LOOHP
Copy link
Owner

LOOHP commented Aug 10, 2024

Well currently the software running the API isn't written with the ability to distribute to different servers. Thanks for your kindness to help tho.

@mauvehed
Copy link

@LOOHP what is api.loohpjames.com and what calls/data are sent there?

@LOOHP
Copy link
Owner

LOOHP commented Sep 16, 2024

Here is a copy of the pinned message outline network requests the plugin makes.


InteractiveChatDiscordSrvAddon requires communication to these sites in order to function, please do not block them.

https://api.loohpjames.com (My API, for looking up whether new assets need to be downloaded)
https://resources.loohpjames.com/ (Where my resources are hosted)
http://resources.download.minecraft.net/ (Mojang assets)
https://launchermeta.mojang.com/ (Mojang API)
https://piston-meta.mojang.com/ (Mojang API and assets)
https://repo1.maven.org/ (Maven repository to download required libraries)

Please do not block my API thinking that it is only used to notify you about plugin updates. It is much more than that.
Without the API, you would have to download Mojang assets and my assets and merge them together yourself every time something is updated. (Ever notice sometimes your Minecraft launcher redownloads assets when you boot the game?)

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

6 participants