Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag-and-drop into new window fails if user has custom home page without scheme #1492

Closed
dsuedholt opened this issue Feb 29, 2024 · 0 comments · Fixed by #1493
Closed

Drag-and-drop into new window fails if user has custom home page without scheme #1492

dsuedholt opened this issue Feb 29, 2024 · 0 comments · Fixed by #1493

Comments

@dsuedholt
Copy link
Contributor

Steps to reproduce

Expected behavior

  • tab opens in new window

Actual behavior

  • nothing happens
  • check the browser toolbox to see an exception:
Error message
[Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]"  nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)"  location: "JS frame :: chrome://browser/content/parent/ext-windows.js :: setContentTriggeringPrincipal :: line 254"  data: no] [ext-windows.js:254:27](chrome://browser/content/parent/ext-windows.js)
    setContentTriggeringPrincipal chrome://browser/content/parent/ext-windows.js:254
    create chrome://browser/content/parent/ext-windows.js:353
    result resource://gre/modules/ExtensionParent.sys.mjs:1135
    withCallContextData resource://gre/modules/ExtensionParent.sys.mjs:611
    result resource://gre/modules/ExtensionParent.sys.mjs:1134
    withPendingBrowser resource://gre/modules/ExtensionParent.sys.mjs:621
    result resource://gre/modules/ExtensionParent.sys.mjs:1133
    callAndLog resource://gre/modules/ExtensionParent.sys.mjs:1084
    recvAPICall resource://gre/modules/ExtensionParent.sys.mjs:1132
    AsyncFunctionNext self-hosted:852
    (Async: async)
    _recv resource://gre/modules/ConduitsChild.sys.mjs:77
    receiveMessage resource://gre/modules/ConduitsParent.sys.mjs:469

This is related to unexpected behavior in the Web Extension API when calling chrome.windows.create with both conf.url and conf.tabId set to null: https://bugzilla.mozilla.org/show_bug.cgi?id=1882822

This can be worked around by setting conf.url to pretty much any valid URI, e.g. 'about:blank'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants