Closed bug report

altium_license use_license: UIA can't find UseLicenseButton on AD 26.11.1, and the pixel fallback fails with 'no shotId'

Colby Knox · 6d ago ·closed by Colby Knox

altium_license {action:"use_license"} can't press Use License on Altium Designer 26.11.1, even though the button is on screen.

Setup: DESKTOP-BAR6S0F, Windows 11 Pro, Altium Designer 26.11.1, altium-bridge 0.2.46, ab 2.1.183. The License Management page showed Altium Designer Develop with Seats 0/1 and the Roam and Use License buttons visible. The page had just been refreshed, after the seat was returned from another machine.

Reply (trimmed):

"clicked": { "action": "use_license", "lane": "image_click",
  "result": {
    "_uiaError": "no UIA control matched (name=Some(\"Use License\") ... automationId=Some(\"UseLicenseButton\")) under that window after wake-retry: find element time out",
    "error": "no shotId for the pixel fallback",
    "success": false } },
"licenceStateAfter": "Viewer"

There are two problems:

  1. The UIA lookup for UseLicenseButton times out on 26.11.1. The licensing skill says this was verified live on an earlier build, so the WebView2 tree or the automation id may have changed.
  2. The pixel fallback never runs because the verb has no shotId (shot.coordMap is null in the reply). The fallback should take its own screenshot instead.

A plain desktop_click at the button's on-screen position worked straight away, and the title dropped "- Viewer".

Related: altium_ensure_licensed answered no_seat_available / seatStuck: true while the page showed Seats 0/1 with Use License available. The cause was the same failed use_license, not a stranded seat, so the "stranded" summary sent me the wrong way.

2 Replies

Colby Knox · 6d ago

Related: once licensed, the window title is License Management - Altium Designer (26.11.1), with no tail, and the page shows Altium Designer Develop "In Use" 1/1. Even so, altium_license_status returns licenceState: "Unknown" and licensed: null, and altium_readiness returns ready: false. The absent-tail-means-licensed rule seems to apply only to the Develop edition window, not to Altium Designer running on a Develop licence.

Colby Knox · 5d ago

Fixed in the 0.2.49 source (wiki commit eadc6b3; waiting to be signed and released). Tested live on DESKTOP-BAR6S0F (AD 26.11.1).

Licence state. A title with a version and no licence tail now reads as licensed ("Licensed (no licence tail)"). AD 26.x writes a tail only when it does not hold a seat, as Develop does. The laptop's License Management page shows Altium Designer Develop, In Use, 1/1, under a title with no tail. license_status now says licensed, and ensure_licensed answers alreadyLicensed instead of no_seat_available.

Pixel fallback. Inside the bridge, ab's direct API returns a bare image with no shotId, so the fallback could never run. The bridge now maps the page position onto the window rectangle and clicks in screen space; it still uses shotId when one is present. Live: altium_license {action: refresh} went through the fallback and clicked Refresh at (2364, 317). Every ab call on the licence page now carries a reason.

UIA timeout. The UIA search still takes longer than 30 s on that build. That's ab-side behaviour; with the fallback working, it now only costs time.

Not verified: the Use License coordinate itself. That button only appears on an unlicensed page, and freeing the seat to test it was not worth the risk.

Battery, run twice in a row: PASS 145, FAIL 0, SKIP 1 (a365_logout), uncovered 0.

Log in to reply.