Skip to content

[VMware VCenter] Open Console fails with vim.fault.InvalidLocale — undici's default "Accept-Language: *" breaks the vCenter session locale #30660

Closed

Description

@TheUdK

Extension

https://www.raycast.com/massimiliano_pasquini/vmware-vcenter

Raycast Version

1.104.25

OS Version

macOS 26.6.2

Description

The "Open Console" action makes VMRC show the error dialog
Method vim.SessionManager.cloneSession threw undeclared fault of type vim.fault.InvalidLocale,
with VMRC's manual login prompt behind it. Launching the console for the same VM from the
vSphere H5 UI works fine.

Root cause: Raycast's Node runtime fetch (undici, Node 22.22.2 here) adds
Accept-Language: * to every request by default. vCenter derives the REST session's locale
from that header and stores * as the session locale. The console ticket returned by
POST /api/vcenter/vm/{vm}/console/tickets is a clone ticket for that session, so when VMRC
redeems it via vim.SessionManager.CloneSession, vCenter fails to apply the cloned session's
locale and throws InvalidLocale (undeclared for CloneSession — hence the wording). VMRC then
falls back to interactive login. Every other extension feature keeps working because only
CloneSession validates the locale, which makes this easy to miss. It presumably regressed when
Raycast's bundled Node runtime started sending the Accept-Language: * default.

Verified against vCenter 8.0 U3 (API 8.0.3.0) by running the exact ticket + CloneSession
flow inside the extension runtime:

[default headers, undici sends Accept-Language:*] -> FAIL: CloneSession threw vim.fault.InvalidLocale
[Accept-Language: en-US]                          -> PASS: CloneSession succeeded

Server-side confirmation without credentials (vCenter validates the locale before the
credentials, so dummy credentials suffice):

curl -sk -X POST https://<vcenter>/sdk -H 'Content-Type: text/xml' --data \
  '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vim25="urn:vim25"><soapenv:Body><vim25:Login><vim25:_this type="SessionManager">SessionManager</vim25:_this><vim25:userName>x</vim25:userName><vim25:password>x</vim25:password><vim25:locale>*</vim25:locale></vim25:Login></soapenv:Body></soapenv:Envelope>'
# -> vim.fault.InvalidLocale: "Invalid or unknown locale provided."
# (with <locale>en-US</locale> instead of * it proceeds to a normal InvalidLogin)

Fix (one line): undici's default headers cannot be disabled (nodejs/undici#1305), only
overridden — so send an explicit locale in getToken() in src/api/vCenter.tsx:

headers: {
  Authorization: `Basic ${this._credential}`,
+ "Accept-Language": "en-US",
},

Tested locally via ray develop: with this change, Open Console works again (no error dialog,
no login prompt).

Steps To Reproduce

  1. macOS with VMware Remote Console (13.x) installed; Raycast with a current Node runtime (22.22.2 here).
  2. Configure the extension against a vCenter Server (reproduced on vCenter 8.0 U3).
  3. Open the "Search Virtual Machines" command, select any VM, and run the "Open Console" action.
  4. VMRC launches and shows "Method vim.SessionManager.cloneSession threw undeclared fault of type vim.fault.InvalidLocale", with a manual vCenter login prompt behind the dialog.

Current Behaviour

VMRC shows the InvalidLocale error dialog and falls back to prompting for vCenter credentials;
the acquired console ticket is never usable. Opening the console from the vSphere H5 UI works
for the same VM.

Expected Behaviour

The console opens directly using the acquired VMRC clone ticket, without an error dialog or
credential prompt.

Activity

  1. added
    bug
    extension
    on Aug 31, 2026
  2. added theissue type on Aug 31, 2026
  3. added
    extension: vmware-vcenter
    on Aug 31, 2026
  4. raycastbot commented on Aug 31, 2026

    @raycastbot
    Collaborator

    Thank you for opening this issue!

    🔔 @MassimilianoPasquini97 you might want to have a look.

    💡 Author and Contributors commands

    The author and contributors of massimiliano_pasquini/vmware-vcenter can trigger bot actions by commenting:

    • @raycastbot close this issue Closes the issue.
    • @raycastbot close as not planned Closes the issue as not planned.
    • @raycastbot close as duplicate Closes the issue as duplicate.
    • @raycastbot rename this issue to "Awesome new title" Renames the issue.
    • @raycastbot reopen this issue Reopens the issue.
    • @raycastbot assign me Assigns yourself to the issue.
    • @raycastbot good first issue Adds the "Good first issue" label to the issue.
    • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.
  5. added a commit that references this issue on Sep 4, 2026
    1c477d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextensionextension: vmware-vcenterplatform: macOS

    Type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions