mirror of
https://github.com/CloakHQ/CloakBrowser.git
synced 2026-10-18 23:07:13 -05:00
context.NewCDPSessionAsync(page) threw NullReferenceException for any licensed .NET user: Playwright down-casts the IPage/IFrame argument to its concrete Page/Frame to read .Guid, which fails on the CloakBrowser proxy the wrapper returns. The license-guard proxy (all licensed launches) and the humanize decorator both produced a handle that fails that cast. - guard proxy unwraps page/frame/handle arguments before forwarding, keeps page.Context guarded, and Wrap() is idempotent - HumanizedBrowserContext.NewCDPSessionAsync unwraps its argument (covers the keyless+humanize path with no guard proxy) - HumanizedPage.Context re-wraps so page.Context stays humanized - public Humanize.Unwrap(page/frame) escape hatch - regression tests build the guard proxy and assert the inner receives raw