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

Updating game pass icons does not work #148

Closed
guidojw opened this issue Jun 14, 2022 · 8 comments
Closed

Updating game pass icons does not work #148

guidojw opened this issue Jun 14, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@guidojw
Copy link

guidojw commented Jun 14, 2022

Describe the bug
When updating a game pass icon, Mantle errors with a 404 Not Found.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy a game pass with initial icon.
  2. Change the icon file and deploy again.
  3. Mantle errors with 404 Not Found.

Expected behavior
The icon is correctly updated.

Environment (please complete the following information):

  • OS: Windows
  • Mantle Version 0.11.1

Additional context
It looks like this is because of the usage of POST https://publish.roblox.com/v1/game-passes/:gamePassId/icon, which does not seem to exist (tested this with Postman).

"https://publish.roblox.com/v1/game-passes/{}/icon",

When manually updating the game pass icon and checking the browser logs, only one request is made and this is to https://www.roblox.com/game-pass/update, same as in update_game_pass:

.post("https://www.roblox.com/game-pass/update")

When the game pass icon is changed, this request is encoded as gzip and includes the new image.

@guidojw guidojw added the bug Something isn't working label Jun 14, 2022
@guidojw guidojw changed the title Updating game pass icons does not work. Updating game pass icons does not work Jun 14, 2022
@blake-mealey
Copy link
Owner

Indeed it looks like they have removed the docs for that endpoint from here: https://publish.roblox.com/docs.

I try to avoid using the www.roblox.com APIs whenever possible because they are more likely to change or become unsupported. I'll see if there's a replacement API for the one they removed but if not I can switch to using the website API.

@blake-mealey
Copy link
Owner

You're right though. Mantle already uses that endpoint and I'm not seeing anything else, so might as well switch to that.

@blake-mealey
Copy link
Owner

@guidojw this turned out to be more complex than it looks. Internally Mantle considers game passes and game pass icons to be separate resources. This lets it only update the game pass if the description (for example) changes and only updates the icon if the icon file changes. However, if you upload just an icon with that update endpoint it actually overwrites the name and description properties.

Therefore, I would need to combine the two into a single game pass resource. Unfortunately this means that whenever the developer changes the description, the icon will need to be reuploaded.

Additionally, the update endpoint does not return the new icon asset ID, so we are forced to make a second request to fetch the icon asset ID from the game pass.

Although not ideal, it's better than not working at all. I should have a patch out soon but just updating you on why this is more complex than it seems.

@blake-mealey
Copy link
Owner

Also realized this would require a new state file version which is rather annoying. Before publishing this change I want to make a ticket on the devforum to see if Roblox will respond to this.

@blake-mealey
Copy link
Owner

@blake-mealey
Copy link
Owner

Roblox has confirmed that this was intentionally removed but they missed on communicating it, and that they are intending on replacing it with an Open Cloud API.

Since Open Cloud cannot be supported by Mantle yet, I'll go ahead and implement the above change.

@blake-mealey
Copy link
Owner

This is fixed in the latest release (0.11.2)

@guidojw
Copy link
Author

guidojw commented Jun 17, 2022

Hi yeah, thanks for the quick response and fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants