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

Cross-tab transaction blocking #9083

Closed
wbt opened this issue Jul 27, 2020 · 7 comments
Closed

Cross-tab transaction blocking #9083

wbt opened this issue Jul 27, 2020 · 7 comments
Labels
area-customNetworks needs-reproduction needs-triage Sev2-normal Normal severity; minor loss of service or inconvenience. stale issues and PRs marked as stale team-confirmations-planning (only for internal use within Confirmations team) type-bug

Comments

@wbt
Copy link
Contributor

wbt commented Jul 27, 2020

Describe the bug
A transaction pending from one browser tab is blocking transactions from another.

Detailed steps to observation:
I have a local private proof of authority chain running on Geth 1.9.10. In an effort to develop steps to reproduce for an unrelated issue, I have a "truffle migrate" running in the background which generates a very large number of very small transactions, one at a time in sequence, with one transaction per block that should only be using up a small percentage of the block gas limit and a small percentage of available bandwidth on the HTTP RPC provider.

I also have a dapp running on that chain, and an interface using Metamask. On one page of the dapp, I trigger one transaction. It remains Pending for a while. I click Speed Up => Fast and it still remains pending. I click to Speed Up again and manually set a gas price of 500 Gwei (it was around 140 before). It still remains pending, for a while.
In a different browser tab, I open the Dapp to a different page and trigger another transaction (which does happen to interact with the same contract) and give it a gas price of 600 Gwei from the start.

Actual behavior
The second transaction is in a Queued state, while the first remains Pending.

image

This condition continues for hours at least, as of when the issue is filed, even after the migration crashes out with an Invalid JSON RPC response: "" error.

The "Pending" transaction has a hash "0x9bdd186..." and the "Queued" transaction has hash "0x5ece345..."

In the Geth logs, I see the following, repeated many times, with gaps between sets alternating between about 1 and about 19 seconds, for a chain with a 5 second block time. The not-shown "t" parameter for each line is either 0s or approximately 997µs.

WARN Served eth_sendRawTransaction conn=127.0.0.1:50629 reqid=2965607936404 err="replacement transaction underpriced"
WARN Served eth_sendRawTransaction conn=127.0.0.1:50629 reqid=2965607936405 err="replacement transaction underpriced"
WARN Served eth_sendRawTransaction conn=127.0.0.1:50629 reqid=2965607936406 err="known transaction: 9bdd186..."
WARN Served eth_sendRawTransaction conn=127.0.0.1:50629 reqid=2965607936407err="known transaction: 5ece345..."

This does not end even after a long while. I click the Cancel button shown in the screenshot and accept the cancellation gas fee, but the transaction remains Pending:

image

The geth log continues as before, but now the "replacement transaction underpriced" errors are usually in triplicate. Even stopping Geth doesn't lead to any change in what MetaMask shows, including the word "Connected" in the upper left (meaning the account is visible to the dapp; MetaMask cannot be connected to the network because its endpoint has disappeared; the UI is misleading).

Cancelling the Queued transaction and accepting the cancellation gas fee, "Replacement transaction underpriced" starts showing up in sets of 4. Waiting a while, shutting down all Geth nodes, and restarting them, I still have that one transaction Pending and the other Queued, with no Cancel buttons. Changing to a different network and account, I can do transactions on that other network, but when coming back and reconnecting to the local network there is still no change.

Upon attempting to issue a new transaction (from a new tab), I can see in Geth the "Submitted transaction" line and I can see it showed up as Queued in MetaMask, but it's stuck there. It joins the other two in a "known transaction" error set in geth logs every so many seconds.
image

I try to cancel that and accept the gas fee; the Cancel button goes away. When I try Reset Account and accept the warning, the activity tab empties out as expected.
image

Only then can I submit transactions from the dapp and have them go through.

Expected behavior
The second transaction enters a Pending state similar to the first, or even better both reach the confirmed state pretty quickly. A cancelled transaction from one tab does not block transactions from other tabs. "Reset Account" is never required for restoring basic functionality of a dapp.

Browser details (please complete the following information):
Windows 10
Node 9.3.0, npm 6.14.5
geth 1.9.10
MetaMask Version 8.0.5

@Gudahtt Gudahtt added needs-reproduction Sev2-normal Normal severity; minor loss of service or inconvenience. needs-triage labels Jan 13, 2021
@hilvmason hilvmason added stability team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead and removed stability labels Apr 22, 2022
@hilvmason hilvmason added team-confirmations-planning (only for internal use within Confirmations team) and removed team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead labels Jun 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Sep 4, 2023
@wbt
Copy link
Contributor Author

wbt commented Oct 9, 2023

I don't think this should be closed without an improvement.

@github-actions github-actions bot removed the stale issues and PRs marked as stale label Oct 9, 2023
Copy link
Contributor

github-actions bot commented Jan 7, 2024

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Jan 7, 2024
@wbt
Copy link
Contributor Author

wbt commented Jan 18, 2024

I still don't think this should be closed without an improvement.

@github-actions github-actions bot removed the stale issues and PRs marked as stale label Jan 18, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Feb 19, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Apr 9, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Apr 17, 2024
Copy link
Contributor

github-actions bot commented Jun 1, 2024

This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Jun 1, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Jun 1, 2024
@wbt
Copy link
Contributor Author

wbt commented Jun 10, 2024

I still don't think this should have been closed without an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-customNetworks needs-reproduction needs-triage Sev2-normal Normal severity; minor loss of service or inconvenience. stale issues and PRs marked as stale team-confirmations-planning (only for internal use within Confirmations team) type-bug
Projects
Archived in project
Development

No branches or pull requests

4 participants