Skip to content

Fix UnauthorizedAccessException during Roblox extraction#6504

Open
Naiml007 wants to merge 2 commits into
bloxstraplabs:mainfrom
Naiml007:fix/unauthorized-access-extraction
Open

Fix UnauthorizedAccessException during Roblox extraction#6504
Naiml007 wants to merge 2 commits into
bloxstraplabs:mainfrom
Naiml007:fix/unauthorized-access-extraction

Conversation

@Naiml007
Copy link
Copy Markdown

@Naiml007 Naiml007 commented Jun 2, 2026

Summary

Fixes #6500.

This PR improves upgrade/extraction handling for cases where RobloxPlayerBeta.exe is temporarily unavailable and Bloxstrap throws:

System.UnauthorizedAccessException: Access to the path ... RobloxPlayerBeta.exe is denied.

Changes

  • Waits for killed Roblox processes to fully exit and fails clearly if they remain running.
  • Treats failure to delete the existing version directory as a real upgrade failure instead of continuing with leftover files.
  • Increases retry attempts for deleting the version directory.
  • Increases retry attempts for package extraction.
  • Re-clears read-only attributes before extraction retries.
  • Adds a clearer final error message when access is still denied, mentioning possible Roblox/antivirus/security-tool locks.

Why

The original failure can happen when Bloxstrap tries to overwrite/extract Roblox files while they are still locked by:

  • a Roblox process that has not fully exited yet
  • antivirus or security software scanning the executable
  • read-only leftover files
  • a failed cleanup of the existing version directory

These changes make transient locks more likely to recover and make persistent failures easier to diagnose.

Testing

  • Ran dotnet build
  • Build succeeded with 0 errors
  • Existing warning only: .NET 6.0-windows is out of support

Naiml007 added 2 commits June 3, 2026 02:58
- Wait for killed Roblox processes to fully exit before touching files
- Add 1s delay after killing processes to let OS release file handles
- Retry Directory.Delete up to 5 times with 1s delays
- Strip read-only attributes from version directory before extraction
- Add retry loop around SharpZipLib extraction (3 attempts, 1s apart)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant