Yamipa

Yamipa

3.7k Downloads

Unable to Download Images

tcaivano opened this issue ยท 7 comments

commented

I'm no longer able to download images after updating to Purpur 1.18. Using the download command, I get this error message:

image

I don't get any additional error output in the console. I'm also running the latest version of ProtocolLib

commented

I can confirm that I'm able to download using both wget and curl.

commented

Hello @tcaivano,

Please provide the full command (including URL) that gives you this error, as well as the Purpur build number you're using.

commented

It seems to occur with any image, but as an example:
/image download "https://user-images.githubusercontent.com/1360711/148145125-0c41c8c3-b6c1-4a85-962a-af4148cc555a.png" test1.jpg
Purpur build number is 1489.

commented

I cannot reproduce the bug, I ran the previous command on a clean install with the following specs and it works fine:

> image download "https://user-images.githubusercontent.com/1360711/148145125-0c41c8c3-b6c1-4a85-962a-af4148cc555a.png" test1.jpg
[20:32:42 INFO]: Downloading file...
[20:32:42 INFO]: Done!
> image list
[20:32:47 INFO]: test1.jpg

Have you tried downloading an image with the wget or curl commands from a server shell?

commented

Hello @tcaivano,

Download the latest snapshot (v1.2.2-SNAPSHOT) and paste here the error log that will appear when failed to download an image file.

It should something like this:

[20:39:53 WARN]: [YamipaPlugin] Failed to download file from "https://127.0.0.1/test.jpg": java.net.ConnectException
commented

[YamipaPlugin] Failed to download file from "https://user-images.githubusercontent.com/1360711/148145125-0c41c8c3-b6c1-4a85-962a-af4148cc555a.png": java.nio.file.AccessDeniedException

I guess it's some sort of permissions issue? I'm running on a Linux machine that I have total control of, do you have any guidance on what I might have to do?

commented

Yes, looks like the Java process does not have permission to write files to the images directory. Note this is not a Yamipa bug, it's just a matter of how you have set up your server.

In summary, you need to give the user running the Paper server ownership ("chown" command) and/or write permission ("chmod" command) of the Yamipa plugin directory:

chown -R username:username /path/to/paper/plugins/YamipaPlugin
chmod -R u+rw /path/to/paper/plugins/YamipaPlugin