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

"Always open this site in..." option stopped working in Nightly #2115

Closed
bbhtt opened this issue Sep 3, 2021 · 9 comments
Closed

"Always open this site in..." option stopped working in Nightly #2115

bbhtt opened this issue Sep 3, 2021 · 9 comments

Comments

@bbhtt
Copy link

bbhtt commented Sep 3, 2021

  • Multi-Account Containers Version: 7.4.0
  • Operating System: Arch Linux
  • Firefox Version: 93.0a1 (2021-09-01) buildid: 20210901091701
  • Other installed Add-ons: (tested in a blank profile)

Actual behavior

Nothing happens

Expected behavior

Assign the site to that container (confirmation page...) and reload it in the container.

Steps to reproduce

  1. Open a website
  2. Click extension -> "Always open this site in.."

Notes

Error in extension and browser console:

Promise rejected after context unloaded: Actor 'Conduits' destroyed before query 'RuntimeMessage' was resolved                                        
utils.js:117                                                                                                                                          
    alwaysOpenInContainer moz-extension://cb213c14-b1c7-4141-9b64-f01f90fb0f4c/js/utils.js:117 

(Possibly something happened between builds from 2021-08-26 to 2021-09-01)

@Fanolian
Copy link

Fanolian commented Sep 7, 2021

I went ahead and filed Bug 1729395 - Firefox Multi-Account Containers's "Always Open This Site in" does not work after bug 1708243 part 2 since it is affecting a popular "built by Firefox" extension.

@Rob--W
Copy link
Member

Rob--W commented Sep 7, 2021

utils.js sends a message:

async alwaysOpenInContainer(identity) {
const currentTab = await this.currentTab();
const assignedUserContextId = this.userContextId(identity.cookieStoreId);
if (currentTab.cookieStoreId !== identity.cookieStoreId) {
return await browser.runtime.sendMessage({

alwaysOpenInContainer has two callers, both of which close the page:

@mdmcnamara
Copy link

Thanks, team!! Sincerely appreciate your attention on this one.

@niikoo
Copy link

niikoo commented Sep 10, 2021

+1
Also applies to Firefox Nightly for Android

@Rob--W
Copy link
Member

Rob--W commented Sep 10, 2021

+1
Also applies to Firefox Nightly for Android

Huh are you using container tabs on Firefox Nightly (Fenix)?
The implementation of containers is incorrect and unsupported; using it will result in the loss of data in the future when the bug is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1643740

@niikoo
Copy link

niikoo commented Sep 11, 2021

+1
Also applies to Firefox Nightly for Android

Huh are you using container tabs on Firefox Nightly (Fenix)?
The implementation of containers is incorrect and unsupported; using it will result in the loss of data in the future when the bug is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1643740

Thanks for the information.

@zombie
Copy link
Member

zombie commented Sep 11, 2021

The original issue here is that there is no await for the (async) Utils.alwaysOpenInContainer() method at these two call sites:
https://github.com/mozilla/multi-account-containers/blob/4b56a2f0bb/src/js/pageAction.js#L24-L25
https://github.com/mozilla/multi-account-containers/blob/081ea0bed/src/js/popup.js#L1225-L1226

This means that sendMessage() is called after the popup is already closed, which was never guaranteed to work. While I landed a fix in Firefox to make it work again, I still recommend fixing the extension to not depend on this behavior as it may stop working in the future.

@dannycolin
Copy link
Collaborator

Closing as bug 1729395 has been fixed upstream.

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

No branches or pull requests

7 participants