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

dead object error when trying to do a query in a Firefox extension popup #1550

Open
zatteo opened this issue Oct 24, 2024 · 1 comment
Open

Comments

@zatteo
Copy link
Contributor

zatteo commented Oct 24, 2024

Firefox is very strict about memory management in an browser extension popup.

In the cozy-keys-browser extension, we had a simple favorite method that fetch a contact and save it after adding favorite: true in the popup.

But if we :

  • mark a contact as favorite
  • close the popup
  • open the popup
  • unmark the contact as favorite

We will get an error like this cozy-client warn Could not get query from state. queryId: io.cozy.contacts/667277395369678d85fe4a93f8984909, error: can't access dead object because Firefox cleaned at least a part of the store.

Issue was bypassed in cozy/cozy-keys-browser#319 by doing the query in the background instead of the popup but I write it also here for the record.

@paultranvan
Copy link
Contributor

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

2 participants