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

Fixed Vivek's bug #5860

Merged
merged 4 commits into from
Nov 30, 2018
Merged

Fixed Vivek's bug #5860

merged 4 commits into from
Nov 30, 2018

Conversation

danfinlay
Copy link
Contributor

@danfinlay danfinlay commented Nov 29, 2018

Fixes #5850

What was happening:

It seems that his MetaMask had crashed while some new transactions had
been loading defaults. He probably had a network connectivity issue to
Infura (which we are working with Infura to address).

As a result of this network cutout, his three unapproved transactions
were not marked failed, and were not marked as loadingDefaults = false, as their gas prices had not yet been estimated.

Normally this behavior is supposed to clean itself up when the
transaction controller starts up, via the
TransactionController._onBootCleanUp() function, but in this case,
during unlock, that function was unable to do its job because when it
requested the transaction list, the current network was in the loading
state, making it proceed as if there were no pending transactions.

Since we had unapproved transactions stuck in the loadingDefaults state, this triggered the loading spinner permanently on the confirmation screen.

To fix this, I am doing two things:

  • Setting transactions to loadingDefaults = false in more catch blocks.
  • Calling onBootCleanUp() when the network store's status changes, so
    that it will re-trigger when network loading completes.

Fixes #5850

What was happening:

It seems that his MetaMask had crashed while some new transactions had
been loading defaults. He probably had a network connectivity issue to
Infura (which we are working with Infura to address).

As a result of this network cutout, his three unapproved transactions
were not marked failed, and were not marked as `loadingDefaults =
false`, as their gas prices had not yet been estimated.

Normally this behavior is supposed to clean itself up when the
transaction controller starts up, via the
`TransactionController._onBootCleanUp()` function, but in this case,
during unlock, that function was unable to do its job because when it
requested the transaction list, the current network was in the `loading`
state, making it proceed as if there were no pending transactions.

To fix this, I am doing two things:
- Setting transactions to loadingDefaults = false in more catch blocks.
- Calling `onBootCleanUp()` when the network store's status changes, so
that it will re-trigger when loading completes.
@danfinlay
Copy link
Contributor Author

Closing until I fix this bug

@danfinlay danfinlay closed this Nov 29, 2018
Was refreshing the tx list on every tx state change instead of just
network changes, creating an infinite loop.
@danfinlay
Copy link
Contributor Author

That should do it.

@danfinlay danfinlay reopened this Nov 29, 2018
app/scripts/controllers/transactions/index.js Outdated Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [5bbd329]: mascara, chrome, firefox, edge, opera

frankiebee
frankiebee previously approved these changes Nov 29, 2018
Copy link
Contributor

@frankiebee frankiebee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@frankiebee frankiebee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@metamaskbot
Copy link
Collaborator

Builds ready [59f89b9]: mascara, chrome, firefox, edge, opera

@metamaskbot
Copy link
Collaborator

Builds ready [59f89b9]: mascara, chrome, firefox, edge, opera

@danfinlay danfinlay merged commit c7233e2 into develop Nov 30, 2018
@danfinlay danfinlay deleted the VivekBug branch November 30, 2018 00:08
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

Successfully merging this pull request may close these issues.

Confirm Tx Component Crashing & Spinning Forever
3 participants