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

MV3: Service Worker should be kept active only after the dapp has been interacted with #15802

Closed
digiwand opened this issue Sep 12, 2022 · 1 comment · Fixed by #16075
Closed
Assignees
Labels

Comments

@digiwand
Copy link
Contributor

digiwand commented Sep 12, 2022

Describe the bug

The app-init.js service worker should only stay alive if the page dapp provider is connected. Currently, the service worker is kept alive as long as the page is open.

See #15494 (comment) for more details.

Criteria:

  • When user interacts with the dapp, keep service worker alive for 45 minutes

Note that support to connect Service Worker after it has been inactive will be handled in this PR (WIP, Needs update):
#15986

Steps to reproduce

  1. Close all https:// or http:// pages
  2. Observe app-init.js service worker is not running. If it is still running, terminate the service worker.
  3. Open a https:// or http:// page
  4. Observe `app-init.js service worker is running and continues to run as long as the page is open, even when the dapp is not connected

Error messages or log output

No response

Version

10.18.4

Build type

No response

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

@digiwand digiwand added the type-bug Something isn't working label Sep 12, 2022
@bschorchit bschorchit added the MV3 label Sep 12, 2022
@digiwand digiwand removed the type-bug Something isn't working label Sep 12, 2022
@digiwand digiwand changed the title [MV3]: Service Worker should terminate if dapp provider is not connected MV3: Service Worker should terminate if dapp provider is not connected Sep 12, 2022
@digiwand digiwand self-assigned this Sep 14, 2022
@digiwand digiwand changed the title MV3: Service Worker should terminate if dapp provider is not connected MV3: Service Worker should be kept active only when accounts are connected to the dapp Sep 26, 2022
@digiwand digiwand changed the title MV3: Service Worker should be kept active only when accounts are connected to the dapp MV3: Service Worker should be kept active only after the dapp has been interacted with Oct 3, 2022
@digiwand
Copy link
Contributor Author

digiwand commented Oct 3, 2022

Updated criteria

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