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

rbx_reflector does not always reflect the current Roblox Studio install's version #304

Closed
kennethloeffler opened this issue Jun 30, 2023 · 0 comments · Fixed by #307
Closed
Labels
module: rbx_reflector type: bug Something isn't working

Comments

@kennethloeffler
Copy link
Member

kennethloeffler commented Jun 30, 2023

While I was working on #302, I noticed that the Version field in the database stayed at [0, 578, 0, 5780566] after I ran rbx_reflector, even though my Roblox Studio was on a later version:

{
  "Version": [
    0,
    578,
    0,
    5780566
  ],
<truncated>

image

I discovered that rbx_reflector is grabbing the version from a Roblox endpoint:

reqwest::blocking::get("https://clientsettings.roblox.com/v2/client-version/WindowsStudio")

Right now, it sends me back this:

{"version":"0.578.0.5780566","clientVersionUpload":"version-1f12a0b5b1bf44ce","bootstrapperVersion":"1, 6, 0, 5780566"}

Clearly, newer versions of Roblox Studio can ship before this endpoint bumps versions. In any case, there is no guarantee that the local Roblox Studio install is the same version as the one obtained from this endpoint, so rbx_reflector shouldn't do this. Instead, it should probably obtain the version from the injected plugin, like generate_reflection:

local HttpService = game:GetService("HttpService")
local SERVER_URL = "http://localhost:22073"
local version = string.split(version(), ".")
local major = tonumber(version[1])
local minor = tonumber(version[2])
local patch = tonumber(version[3])
local build = tonumber(version[4])
HttpService:PostAsync(SERVER_URL .. "/info", HttpService:JSONEncode({
version = {major, minor, patch, build},
}))

This ensures that it always gets the version of the Roblox Studio actually installed on the machine, which is exactly what we want here.

cc @nezuo

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

Successfully merging a pull request may close this issue.

2 participants