Skip to content

SuiteCloud CLI browser-based authentication fails with "Address already in use: bind" error on Windows systems with port exclusions #939

@mrab54

Description

@mrab54

Select the SuiteCloud tool where you encountered the issue

SuiteCloud CLI

Version of the SuiteCloud Tool

3.0.0

Operating system

Windows 11 24H2 (OS Build 26100.4946)

Node Version / VSCode Version

v22.13.1

JAVA Version

java 17.0.13+10-LTS-268

Bug description

SuiteCloud CLI fails during browser-based authentication with "Address already in use: bind" error when attempting to start the local callback server. This occurs when the CLI's hardcoded port range (52300-52315) conflicts with Windows port exclusions.

The CLI attempts to bind to ports 52300-52315 for authentication callback, but when these ports fall within a Windows excluded port range, the binding fails.

Steps To Reproduce

  1. Check for existing port exclusions:
    netsh int ipv4 show excludedportrange protocol=tcp
  2. If no port exclusion exists for port range 52300-52315, then create one (as Administrator): netsh int ipv4 add excludedportrange protocol=tcp startport=52300 numberofports=16
  3. Run suitecloud file:upload or any command requiring authentication
  4. Observe authentication attempt fails with "Address already in use: bind"

Actual Output

F:\dev> suitecloud file:upload
The authorization credentials associated with auhtid are no longer valid. Starting the browser-based authentication for refreshing them.
Address already in use: bind


There is a typo in the output there "auhtid" as well.

Expected Output

Browser-based authentication should complete successfully, opening browser for NetSuite login and completing the authorization flow without port binding errors.

Or, provide the ability to specify port range to use.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions