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

Add manual scenario to verify that network polling stops when UI is closed #25964

Closed
9 tasks
chloeYue opened this issue Jul 19, 2024 · 0 comments · Fixed by #26195
Closed
9 tasks

Add manual scenario to verify that network polling stops when UI is closed #25964

chloeYue opened this issue Jul 19, 2024 · 0 comments · Fixed by #26195
Assignees
Labels
area-qa Relating to QA work (Quality Assurance) release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-extension-platform

Comments

@chloeYue
Copy link
Contributor

chloeYue commented Jul 19, 2024

What is this about?

We've identified a release-blocking issue where a periodic polling task continues to run every 20 seconds, even after the UI is closed. This results in generating a big amount of unnecessary API requests to Etherscan and to the RPC provider:

API request to Etherscan:
https://api.etherscan.io/api?

3 to RPC provider:

"jsonrpc":"2.0","method":"eth_blockNumber",
"jsonrpc":"2.0","method":"eth_getBlockByNumber"
jsonrpc":"2.0","method":"eth_call","params":

This ticket aims to add a manual scenario to ensure this issue is prevented in the future.

Slack discussion: https://consensys.slack.com/archives/C07CGH75GFN/p1721233816417369
Related PR attempt to fix this issue: #25909

To repro the bug:

  • Install MM
  • Open the service worker dev console
  • Open and close the pop up
  • Go to the network tab of the dev console and see that requests, they continue to occur approximately every 20 seconds.

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

@chloeYue chloeYue added team-extension-platform area-qa Relating to QA work (Quality Assurance) labels Jul 19, 2024
@chloeYue chloeYue self-assigned this Jul 19, 2024
@chloeYue chloeYue changed the title Add manual scenario to ensure that network polling stops when UI is closed Add manual scenario to verify that network polling stops when UI is closed Jul 19, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Jul 30, 2024
dawnseeker8 pushed a commit that referenced this issue Aug 12, 2024
## **Description**

This PR introduces a new test scenario which relates to a
release-blocker for v12.0.0. This scenario is to verify that once the
MetaMask UI is closed, the extension stops all network requests,
including `etherscan`, `eth_call`, `eth_getBalance`, `eth_blockNumber`,
and `eth_getBlockByNumber` to Infura or any other RPC provider. This
check is vital for reducing unnecessary network traffic and enhancing
both privacy and efficiency within the extension's operation.


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26195?quickstart=1)

## **Related issues**

Fixes: #25964
Related release blocker: #25951 

## **Manual testing steps**
Follow testing steps in this  manual scenario

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Danica Shen <zhaodanica@gmail.com>
@gauthierpetetin gauthierpetetin added release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.0 labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-qa Relating to QA work (Quality Assurance) release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-extension-platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants