xenondevs / Nova

Nova is a server-side modding framework for Paper servers that aims to streamline adding custom content like items, blocks, guis, and more, without client-side modifications, using resource pack tricks.
Other
371 stars 38 forks source link

[Bug] CustomMultiPart uploader does not send multipart params #179

Closed ShiftSad closed 2 years ago

ShiftSad commented 2 years ago

Agreements

Before creating a bug report, please validate that the issue you're encountering is not caused by another plugin (Remove all other plugins from the server). If it is, please name the plugin that causes the issue.

There are no other plugins running on my server.

Plugin Version, Server Software, Server Version

Nova version 0.11.2, Paper version git-Paper-109 (MC: 1.19.1) (Implementing API version 1.19.1-R0.1-SNAPSHOT) (Git: 69950d5)

Nova Addons and Versions

none

Expected behavior

It is expected to upload the resourcepack into my server hosted on replit, as explained on the wiki.

Observed/Actual behavior

` [20:28:40 ERROR]: [Nova] Invalid resource pack URL: No key. Please check your CustomMultiPart config! [20:28:40 WARN]: [Nova] The resource pack was not uploaded. (Misconfigured auto uploader?)

[Sat Sep 10 18:28:38 2022] 172.18.0.1:58660 Accepted [Sat Sep 10 18:28:40 2022] 172.18.0.1:58660 [200]: POST /index.php [Sat Sep 10 18:28:40 2022] 172.18.0.1:58660 Closing `

The request is made, but no params are sent from the server.

Steps to reproduce

  1. Download nova's latest version
  2. Start the server
  3. Edit the config as matching the wiki's recommended
  4. Reload the config, then boom, did not work.

Full server log

https://mclo.gs/QFooTKo

Errors

No response

Additional context

Config -> https://pastes.dev/0iW8yAoF5o Replit server -> https://pastes.dev/Bl4hXTW3fe

ByteZ1337 commented 2 years ago

Could you try echoing all Post parameters in the PHP script?

ShiftSad commented 2 years ago

Could you try echoing all Post parameters in the PHP script?

By using: print(str_replace(' ', '  ', nl2br(print_r($_POST, true))));

[Nova] Invalid resource pack URL: Array<br />
(<br />
)<br />

Insomnia: image

Edit: Sorry, have never used php before

ByteZ1337 commented 2 years ago

I'm running xampp on localhost with your config + script, but it works fine and I have no idea why it doesn't work for you. You can use Fiddler classic or Wireshark if you want to check if the outgoing params still contain the key. Or you can check out the SelfHost upload service if you have access to non minecraft ports on your server.

ShiftSad commented 2 years ago

Sadly I can't debug with Fiddler and Wireshark since it is running in a pterodactyl server (Maybe there is something else, I have root acess)

Multipart would be perfect for me, really sad it does not work, but thanks

ByteZ1337 commented 2 years ago

You can set up a local server and test it there

NichtStudioCode commented 2 years ago

Did you test it with a local Minecraft server? The only explanation I can come up with is that your server has a problem with handling requests originating from the same machine. (Since it works when using Insomnia from your PC, but not when the MC server is sending the request)

ShiftSad commented 2 years ago

The weird thing it is not from the same machine, I’m hosting my server on my own vps with pterodactyl, and the php server is hosted via Replit