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

Rojo marking scripts as "Unknown Instance" when syncing #512

Open
madeinjei opened this issue Dec 18, 2021 · 3 comments
Open

Rojo marking scripts as "Unknown Instance" when syncing #512

madeinjei opened this issue Dec 18, 2021 · 3 comments
Labels
scope: plugin Relevant to the Roblox Studio plugin type: bug Something happens that shouldn't happen

Comments

@madeinjei
Copy link

Error Returned From Roblox:
image

Script In Question:
image

@madeinjei
Copy link
Author

Is there any way this could be my own issue and if so is there a way i can fix it myself

@GHXX
Copy link

GHXX commented May 19, 2022

I am also experiencing this issue. Is there anything i can do to help with tracking down the exact problem?
Or are there even some steps i can do to resolve this issue myself?

@LPGhatguy LPGhatguy added type: bug Something happens that shouldn't happen scope: plugin Relevant to the Roblox Studio plugin labels Jun 13, 2022
@LPGhatguy
Copy link
Contributor

Hello, thank you for filing an issue. I think there are two problems here.

The first issue is with the diagnostic that Rojo is giving you. The instance should not be marked as an unknown instance. This is hopefully just a cosmetic issue, but hints at a potential bug in the plugin's internal instance tracking.

The second issue is that Rojo is not giving you details about why it couldn't update Source. There are currently two known reasons why Source can fail to update:

  • The script is too large. Roblox Studio plugins have a limitation of around 192 kB for adding scripts to the game. There isn't a way for us to work around this, but we can show a better error message.
  • The Rojo plugin does not have the "update scripts" permission from Studio. Users don't run into this.

If you run into this issue, I would recommend looking for any very large scripts in your game. They are likely the cause, and I recommend splitting them into multiple modules not just for Rojo, but for general readability and performance.

Kampfkarren pushed a commit that referenced this issue Jun 1, 2023
When a session is disconnected, the apiContext long-polling for messages
continues until resolved/rejected. This means that even after a session
is disconnected, a message can be received and handled.

This leads to bad behavior, as the session was already cleaned up and
the message cannot be handled correctly. The instance map was cleaned up
upon disconnect, so it will warn about unapplied changes to unknown
instances. (Like #512)

It's very easy to repro:
Connect a session, disconnect it, then save a change.


https://github.com/rojo-rbx/rojo/assets/40185666/846a7269-7043-4727-9f9c-b3ac55a18a3a

-----------

This PR fixes that neatly by tracking all active requests in a map, and
cancelling their promises when we disconnect.
Dekkonot pushed a commit to UpliftGames/rojo that referenced this issue Jan 11, 2024
When a session is disconnected, the apiContext long-polling for messages
continues until resolved/rejected. This means that even after a session
is disconnected, a message can be received and handled.

This leads to bad behavior, as the session was already cleaned up and
the message cannot be handled correctly. The instance map was cleaned up
upon disconnect, so it will warn about unapplied changes to unknown
instances. (Like rojo-rbx#512)

It's very easy to repro:
Connect a session, disconnect it, then save a change.


https://github.com/rojo-rbx/rojo/assets/40185666/846a7269-7043-4727-9f9c-b3ac55a18a3a

-----------

This PR fixes that neatly by tracking all active requests in a map, and
cancelling their promises when we disconnect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: plugin Relevant to the Roblox Studio plugin type: bug Something happens that shouldn't happen
Projects
None yet
Development

No branches or pull requests

3 participants