Conversation
Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] On my Windows 11 machine, I get this error
gabs.games_start({"gameId":"rimworld"})
Failed to start rimworld: failed to create bridge config: failed to find available port: no available ports in range
49152-65535
Fix Windows 11 port exhaustion issue with fallback port ranges and configurable ranges
Sep 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Windows 11 users were experiencing port allocation failures when starting games:
This occurs because Windows 11 systems with Hyper-V, WSL, Docker, or certain antivirus software reserve large portions of the default ephemeral port range (49152-65535), leaving no available ports for GABS.
Solution
Automatic Port Range Fallback
GABS now automatically tries multiple port ranges when the default range fails:
This requires no user configuration and should resolve the issue for most Windows 11 users automatically.
Configurable Port Ranges
For systems with specific port restrictions, users can now set custom port ranges via the
GABS_PORT_RANGESenvironment variable:Enhanced Error Messages
When all port ranges are exhausted, users now receive detailed troubleshooting guidance:
Changes Made
WriteBridgeJSON()ininternal/config/bridgecfg.goto usefindAvailablePortWithFallback()instead of single range allocationgetCustomPortRanges()function to parseGABS_PORT_RANGESenvironment variabledocs/WINDOWS_TROUBLESHOOTING.mdguide and updated READMEBackward Compatibility
This change is fully backward compatible:
Testing
The fix has been thoroughly tested with:
Windows 11 users should no longer experience port availability issues when starting games through GABS.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.