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

Problems with Multi-Account Containers and links target set to a new window #399

Open
filips123 opened this issue Sep 23, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@filips123
Copy link
Owner

filips123 commented Sep 23, 2023

Description

When the links target is set to new windows, opening a website with the assigned default container will immediately close the initial window and open a new one with the correct container. This may cause some flashing and may change window positions. The new window will also disconnect from the original web app.

Additionally, some widgets will not work in this new window. This includes the mute widget, site information widget and extension widgets.

Steps to Reproduce

  1. Create a fresh profile, set the links target to new window and install Multi-Account Containers.
  2. Configure web app to always open in a specific profile by default.
  3. Close existing windows and reopen the web app
  4. See that the initial window closes and that new one opens.
  5. See that the new window is disconnected from the web app.
  6. Try to use mute, site information or extension widgets.
  7. See that they do not open.

Additional Information

Mute widget breaks for unknown reason:

NS_ERROR_NOT_INITIALIZED: 
    onCreated chrome/pwa/content/browser.jsm:1143
    aEventName resource:///modules/CustomizableUI.sys.mjs:3103
    buildWidget resource:///modules/CustomizableUI.sys.mjs:2003
    getWidgetNode resource:///modules/CustomizableUI.sys.mjs:1326
    buildArea resource:///modules/CustomizableUI.sys.mjs:1124
    registerToolbarNode resource:///modules/CustomizableUI.sys.mjs:1038
    registerToolbarNode resource:///modules/CustomizableUI.sys.mjs:3937
    onDOMContentLoaded chrome://browser/content/browser.js:1595
    EventListener.handleEvent* chrome://browser/content/browser.xhtml:130
[CustomizableUI.sys.mjs:3108:17](resource:///modules/CustomizableUI.sys.mjs)
    aEventName resource:///modules/CustomizableUI.sys.mjs:3108
    buildWidget resource:///modules/CustomizableUI.sys.mjs:2003
    getWidgetNode resource:///modules/CustomizableUI.sys.mjs:1326
    buildArea resource:///modules/CustomizableUI.sys.mjs:1124
    registerToolbarNode resource:///modules/CustomizableUI.sys.mjs:1038
    registerToolbarNode resource:///modules/CustomizableUI.sys.mjs:3937
    onDOMContentLoaded chrome://browser/content/browser.js:1595
    (Async: EventListener.handleEvent)
    <anonymous> chrome://browser/content/browser.xhtml:130

Overwriting new tab URL breaks because config object is undefined:

Uncaught NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]
    _newTabURI chrome://browser/content/browser-places.js:1453
    isOnNewTabPage chrome://browser/content/browser-places.js:1446
    isOnNewTabPage chrome://browser/content/browser-places.js:1445
    onLocationChange chrome://browser/content/tabbrowser.js:6856
[browser-places.js:1453](chrome://browser/content/browser-places.js)
    _newTabURI chrome://browser/content/browser-places.js:1453
    isOnNewTabPage chrome://browser/content/browser-places.js:1446
    some self-hosted:137
    isOnNewTabPage chrome://browser/content/browser-places.js:1445
    onLocationChange chrome://browser/content/tabbrowser.js:6856

Clicking on the extension widget also breaks:

TypeError: screen is null
[PanelMultiView.sys.mjs:1189:5](resource:///modules/PanelMultiView.sys.mjs)
    _calculateMaxHeight resource:///modules/PanelMultiView.sys.mjs:1189
    handleEvent resource:///modules/PanelMultiView.sys.mjs:1259
    (Async: EventListener.handleEvent)
    connect resource:///modules/PanelMultiView.sys.mjs:415
    _openPopupPromise resource:///modules/PanelMultiView.sys.mjs:540
    (Async: promise callback)
    openPopup resource:///modules/PanelMultiView.sys.mjs:521
    openPopup resource:///modules/PanelMultiView.sys.mjs:274
    openPopup chrome/pwa/content/browser.jsm:290
    showSubView chrome://browser/content/customizableui/panelUI.js:482
    showWidgetView resource:///modules/CustomizableUI.sys.mjs:2151
    handleWidgetCommand resource:///modules/CustomizableUI.sys.mjs:2170
    (Async: EventListener.handleEvent)
    buildWidget resource:///modules/CustomizableUI.sys.mjs:1980
    getWidgetNode resource:///modules/CustomizableUI.sys.mjs:1326
    buildArea resource:///modules/CustomizableUI.sys.mjs:1124
    registerPanelNode resource:///modules/CustomizableUI.sys.mjs:1348
    registerPanelNode resource:///modules/CustomizableUI.sys.mjs:3948
    get panel chrome://browser/content/browser-addons.js:1525
    togglePanel chrome://browser/content/browser-addons.js:1577
    onCommand chrome/pwa/content/browser.jsm:1301
    doWidgetCommand resource:///modules/CustomizableUI.sys.mjs:2111
    handleWidgetCommand resource:///modules/CustomizableUI.sys.mjs:2168
    (Async: EventListener.handleEvent)
    buildWidget resource:///modules/CustomizableUI.sys.mjs:1980
    getWidgetNode resource:///modules/CustomizableUI.sys.mjs:1326
    buildArea resource:///modules/CustomizableUI.sys.mjs:1124
    registerToolbarNode resource:///modules/CustomizableUI.sys.mjs:1038
    registerToolbarNode resource:///modules/CustomizableUI.sys.mjs:3937
    onDOMContentLoaded chrome://browser/content/browser.js:1595
    (Async: EventListener.handleEvent)
    <anonymous> chrome://browser/content/browser.xhtml:130

Two related problems have been identified. AboutNewTab.newTabURL override should always return a valid URL instead of undefined, even if the site config is not known. This problem has been fixed. Additionally, gBrowser.addTab override should be fixed to always return the correct tab, even when opening a new window. Currently, it still returns the current tab in the old window.

Affected Websites

Any.

Environment

  • Operating system: Windows 10
  • System architecture: 64-bit
  • Installation method: MSI
  • PWAsForFirefox extension version: 2.7.3
  • PWAsForFirefox native version: 5fac09b
  • PWAsForFirefox runtime version: 117.0.1
  • Firefox version: 119.0a1
@filips123 filips123 added the bug Something isn't working label Sep 23, 2023
@filips123 filips123 added the help wanted Extra attention is needed label Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: To Do
Development

No branches or pull requests

1 participant