Skip to content

extension-sdk: openBrowserWindow gives no signal when the host refuses the URL #1776

Open

Description

@roanny

What happens. extensionSDK.openBrowserWindow(url, target) returns void and sends UPDATE_LOCATION without waiting for an answer (extension_host_api.js, this.send(...)). When the URL is not covered by the manifest's new_window_external_urls, the host refuses it in its own frame — Uncaught (in promise) Error: External URL not matched in new_window_external_urls entitlement (verifyUpdateLocationRequest) — and nothing opens, but the extension gets no error and cannot tell the user why nothing happened.

Measured on Looker (original), Google-hosted, @looker/extension-sdk 26.20, Chrome: with only https://<instance>/auth* listed, openBrowserWindow('https://<other-host>/health') returns normally; the refusal appears only in the host frame's console. Adding https://<other-host>/* to new_window_external_urls makes the same call open the tab.

Request. A variant that resolves when the window opens and rejects with the host's reason when it is refused (for example openBrowserWindowAsync, or sendAndReceive for UPDATE_LOCATION), so an extension can show the user that a link was blocked by configuration. Context: we open Looker's own /auth this way for a backend-held OAuth sign-in (see #1772), where a silent refusal leaves the user waiting.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions