GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [windows] awaiting UserConsentVerifier async ops via NSWinRT.toPromise panics the process (cross-isolate PinnedRef) · Issue #11627 · NativeScript/NativeScript

[windows] awaiting UserConsentVerifier async ops via NSWinRT.toPromise panics the process (cross-isolate PinnedRef) #11627

New issue
Copy link
New issue
Copy link
Closed
Closed
[windows] awaiting UserConsentVerifier async ops via NSWinRT.toPromise panics the process (cross-isolate PinnedRef)#11627
Copy link
Assignees
triniwiz

Description

@aleclarson
aleclarson
opened on Nov 9, 2026
Issue body actions

Summary

Awaiting Windows.Security.Credentials.UI.UserConsentVerifier.CheckAvailabilityAsync (and RequestVerificationAsync) through NSWinRT.toPromise terminates the process with a native v8 panic — a JS try/catch cannot intercept it:

[NativeScript] PANIC at v8-147.4.0/src/scope.rs:943:7:
v8::scope::PinnedRef<'_, v8::scope::HandleScope<'_, ()>> and Context do not belong to the same Isolate

Other WinRT asyncs on the same call path (StorageFile ops, PasswordVault ops) complete through toPromise without crashing, so this is specific to UserConsentVerifier's completion context.

Real-world use case affected

An app-level biometrics facade (@octane-xplat/biometrics) implementing Windows Hello verification on NativeScript Windows: biometrics.isAvailable() → CheckAvailabilityAsync, biometrics.verify(reason) → RequestVerificationAsync. Calling these from a packaged app's service/command context hard-crashes the process — the user sees the app silently die mid-operation, and no error surface (no rejection, no exception) reaches JavaScript.

Evidence

  • Packaged MSIX org.octanexplat.windows61 1.0.0.233, x64, on a NativeScript Windows preview runtime (Rust/v8 host; crash logged to nativescript-crash.log inside the package LocalState).
  • Repro path: a polling command loop dispatched an async service spec on the app's JS thread; the spec's first NSWinRT.toPromise(api.CheckAvailabilityAsync()) crashed. Earlier service specs in the same app using PasswordVault add/retrieve (also toPromise-awaited) completed normally.
  • Working route: a managed C# helper enqueues UserConsentVerifier calls on the captured DispatcherQueue and exposes a polled string state — that path works, but only because no WinRT async crosses NSWinRT.toPromise in JS.

Expected

toPromise resolves or rejects on the calling isolate; a class that cannot be awaited should fail safely (error or unprojected stub), never panic the process.

Activity

  1. triniwiz commented on Nov 9, 2026

    @triniwiz
    triniwiz
    on Nov 9, 2026
    Member
    More actions

    Which version of the runtime are you using ?

  2. triniwiz
    self-assigned this
    on Nov 9, 2026
  3. aleclarson commented on Nov 10, 2026

    @aleclarson
    aleclarson
    on Nov 10, 2026
    ContributorAuthor
    More actions

    @triniwiz The original report was on @nativescript/windows 0.1.0-alpha.146 (with @nativescript/core and @nativescript/vite pinned to the abae298 PR #11272 pkg.pr.new builds), packaged x64 MSIX on Windows 11.

    Revalidated today on 1.0.0-beta.24, same packaged-app service-command context: both calls now complete through NSWinRT.toPromise on the calling isolate — no panic, no JS-visible error:

    • UserConsentVerifier.CheckAvailabilityAsync → resolved 1 (DeviceNotPresent — this test box has no Hello enrollment)
    • UserConsentVerifier.RequestVerificationAsync → resolved 1 (DeviceNotPresent)

    Control WinRT asyncs (StorageFile, PasswordVault) still complete fine on the same path. Whatever changed between alpha.146 and the beta line made UserConsentVerifier's completions isolate-safe — thanks!

    We've now removed our managed-dispatcher workaround entirely (hard cutover): the facade awaits the projected calls directly, verified on the same packaged build. Closing as fixed in beta.24.

    Reacted by Osei Fortune
  4. aleclarson
    closed this as completedon Nov 10, 2026
  5. aleclarson
    added a commit that references this issue on Nov 11, 2026

    refactor(biometrics): await UserConsentVerifier through projected toP…

    300aed0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @triniwiz
    triniwiz

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.