Error using /br image
kzdnl opened this issue ยท 19 comments
Server Implementation
Paper
Server Version
1.19.4
Describe the bug
I try to insert any picture, it gives an error, even when using i.imgur
To Reproduce
/br image https://i.imgur.com/CINUqiT.jpeg
Expected behaviour
Successfully inserted
Screenshots / Videos
No response
Error log (if applicable)
[15:43:10 ERROR]: An unexpected error while handling a FastAsyncWorldEdit command
java.io.IOException: Server returned HTTP response code: 429 for URL: https://i.imgur.com/CINUqiT.jpeg
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2000) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) ~[?:?]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) ~[?:?]
at java.net.URL.openStream(URL.java:1161) ~[?:?]
at com.fastasyncworldedit.core.util.MainUtil.readImage(MainUtil.java:529) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.command.BrushCommands.imageBrush(BrushCommands.java:528) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.command.BrushCommandsRegistration.cmd$image(BrushCommandsRegistration.java:1197) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommandOnCurrentThread$16(PlatformCommandManager.java:725) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandTask(PlatformCommandManager.java:746) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandOnCurrentThread(PlatformCommandManager.java:727) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommand$14(PlatformCommandManager.java:698) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$1(AbstractPlayerActor.java:672) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.fastasyncworldedit.core.util.task.AsyncNotifyQueue.lambda$run$0(AsyncNotifyQueue.java:28) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.fastasyncworldedit.core.util.task.AsyncNotifyQueue.lambda$call$1(AsyncNotifyQueue.java:45) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428) ~[?:?]
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) ~[?:?]
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/2a2ce81e93f7422680d1f18f44cacb9e
Fawe Version
FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response
I tried it, looks like the regex of validation of links is no longer up to date.
As far as I know, /br image uses cfi (create from image) which isn't working for a long time anymore due to some issues (I'll look for the exact issue for you). Not sure if this one day might be a feature again, I know that this is quite useful. If it isn't a thing anymore, I might suggest removal of the command and also on documentation (or archive feature).
#552 This should be the unterlying issue
@IntellectualSites/core-team what can we do? Remove the command or reimplement CFI?
How the heck would /br image https://
ever work? You're not giving it an image.
An error with an actual imgur link would be way more useful. Also, image is nothing to do with cfi^^ cfi is directly creating/writing anvil world files
How the heck would
/br image https://
ever work? You're not giving it an image.An error with an actual imgur link would be way more useful. Also, image is nothing to do with cfi^^ cfi is directly creating/writing anvil world files
Read the request more carefully, I wrote that in the case of imgur, nothing works, and the usual image does not work, nothing works, I create an appeal for a reason.
Okay but you've provided a log with what is clearly not going to work. If you read the rest of my response I tell you that it would be useful to have the error when an imgur link is indeed used.
[15:43:10 ERROR]: An unexpected error while handling a FastAsyncWorldEdit command
java.io.IOException: Server returned HTTP response code: 429 for URL: https://i.imgur.com/CINUqiT.jpeg
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2000) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) ~[?:?]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) ~[?:?]
at java.net.URL.openStream(URL.java:1161) ~[?:?]
at com.fastasyncworldedit.core.util.MainUtil.readImage(MainUtil.java:529) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.command.BrushCommands.imageBrush(BrushCommands.java:528) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.command.BrushCommandsRegistration.cmd$image(BrushCommandsRegistration.java:1197) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommandOnCurrentThread$16(PlatformCommandManager.java:725) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandTask(PlatformCommandManager.java:746) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandOnCurrentThread(PlatformCommandManager.java:727) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommand$14(PlatformCommandManager.java:698) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$1(AbstractPlayerActor.java:672) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.fastasyncworldedit.core.util.task.AsyncNotifyQueue.lambda$run$0(AsyncNotifyQueue.java:28) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at com.fastasyncworldedit.core.util.task.AsyncNotifyQueue.lambda$call$1(AsyncNotifyQueue.java:45) ~[FastAsyncWorldEdit-Bukkit-2.6.2-SNAPSHOT-420.jar:?]
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428) ~[?:?]
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) ~[?:?]
Okay but you've provided a log with what is clearly not going to work. If you read the rest of my response I tell you that it would be useful to have the error when an imgur link is indeed used.
It's an entirely different error now. I will update the original issue
Is it possible to make pictures that can be downloaded from other sources? This would be convenient, since imgur is not always convenient in this regard
Imgur is far safer than allowing outside links. This has previously been discussed in #1540
Yes, I know about this discussion. But I would suggest making some kind of switch where users would agree to it, at their own risk, to use alternative sources. But I think it's up to you to add or not, for me the main thing is that the plugin at least with imgur can load
We've not had anyone report this for a while now, is it still an issue? I feel it's possible it was something on imgur's end
Hi, I have exactly the same problem and the same error on the latest versions of FAWE.
Can you switch to a different image service on your config and retry it?
Hi, I have exactly the same problem and the same error on the latest versions of FAWE.
This issue still exists for me, been happening for multiple versions too.
java.io.IOException: Server returned HTTP response code: 429 for URL: https://i.imgur.com/d0UAkHY.png
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2013) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1592) ~[?:?]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) ~[?:?]
at java.net.URL.openStream(URL.java:1161) ~[?:?]
at com.fastasyncworldedit.core.util.MainUtil.readImage(MainUtil.java:527) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.sk89q.worldedit.command.BrushCommands.imageBrush(BrushCommands.java:528) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.sk89q.worldedit.command.BrushCommandsRegistration.cmd$image(BrushCommandsRegistration.java:1201) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommandOnCurrentThread$16(PlatformCommandManager.java:725) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandTask(PlatformCommandManager.java:746) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandOnCurrentThread(PlatformCommandManager.java:727) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommand$14(PlatformCommandManager.java:698) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$1(AbstractPlayerActor.java:672) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$run$0(AsyncNotifyKeyedQueue.java:48) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$call$1(AsyncNotifyKeyedQueue.java:58) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at com.fastasyncworldedit.core.util.task.KeyQueuedExecutorService$KeyRunner.lambda$run$0(KeyQueuedExecutorService.java:150) ~[FastAsyncWorldEdit-Bukkit-2.8.5-SNAPSHOT-641.jar:?]
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?]
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) ~[?:?]
Unsure if related, using this with default config with url https://i.imgur.com/d0UAkHY.png
lead me to:
java.io.IOException: Host 'imgur.com' not allowed!
Whitelisted image hosts are: i.imgur.com
Switching i.imgur.com
to imgur.com
in config and repeating the command with the same URL lead me to the reverse error (i.imgur.com not allowed, allowed hosts are imgur.com
), adding both lead to the above error. Might've been outdated config?
Using drive.google.com
in config and formatting the google drive URL as https://drive.google.com/uc?id=FILEID
works, but it's not a very good solution for me.
That is nothing we can change about it - see imgurs documentation: https://api.imgur.com/errorhandling#429
Either it's a ratelimit due to too many requests from your IP (if you did not made many requests it might be due to DSLite) or the IP address is simply blocked by Imgur (e.g. known data center subnets).
Again, that's nothing we can control on our end. If it's not working, use another image hoster.