Skip to content

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

@zatteo

Description

@zatteo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions