FastAsyncWorldEdit

FastAsyncWorldEdit

152k Downloads

Error using /br image

kzdnl opened this issue ยท 19 comments

commented

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

Anything else?

No response

commented

Cannot replicate this anymore, assume it was a temporary issue.

commented

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).

commented

#552 This should be the unterlying issue

commented

@IntellectualSites/core-team what can we do? Remove the command or reimplement CFI?

commented

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

commented

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.

commented

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) ~[?:?]
commented

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.

commented

It's an entirely different error now. I will update the original issue

commented

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

commented

Imgur is far safer than allowing outside links. This has previously been discussed in #1540

commented

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

commented

// was used until a merge deleted all the CFI/schematics functionality TODO NOT IMPLEMENTED
I thought that the issue behind was cfi, because here something looks not implemented here that has to do with imgur, I am sorry if I am mistaken

commented

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

commented

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?

commented

Hi, I have exactly the same problem and the same error on the latest versions of FAWE.

commented

Hi, I have exactly the same problem, how can we fix it please? please

commented

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.

commented

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.