-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[Sentry] [Bug]: TypeError: Cannot add property chain_id, object is not extensible for every send transaction #28599
Comments
Present in qa-7 build Send.console.error.mov |
Present in qa-8 build Send.Error.mov |
@Unik0rnMaggie @jonybur @gambinish |
I confirm that im also able to see this in develop; also i'm not able to repro everytime i initiate a transaction, i was able to see the error in console once so far; then i do the same steps to initiate a transaction, and the error is not displayed anymore |
Thank you @sleepytanya and @sahar-fehri ! i am also able to see it on the latest I removed the portfolio-view label |
Sentry Issue: METAMASK-XDAX |
The functions `createEventFragment` and `updateEventFragment` of the MetaMetricsController were broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected lines were updated to use `cloneDeep` prior to mutating, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use `cloneDeep` prior to mutating, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use `cloneDeep` prior to mutating, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use `cloneDeep` prior to mutating, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use an empty base object as the merge target, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use an empty base object as the merge target, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use an empty base object as the merge target, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use an empty base object as the merge target, so that we're no longer attempting to mutate a frozen object. Fixes ##28599
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use `cloneDeep` prior to mutating, so that we're no longer attempting to mutate a frozen object. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28970?quickstart=1) ## **Related issues** Fixes #28599 ## **Manual testing steps** I'm not sure exactly how to reproduce the error using a real build. But the problem is easy to demonstrate in the "should update existing fragment state with new fragment props" unit test. The problem is that we didn't catch this before because Lodash doesn't have strict mode enabled, so in unit tests the attempt to mutate a frozen object will silently fail. In a production build, [strict mode is enabled by LavaMoat](https://github.com/LavaMoat/LavaMoat/blob/7a3896a08b45f667649c46a56f27fe7bf20f4207/packages/lavapack/src/pack.js#L333). You can reproduce the problem by adding `"use strict"` to the top of the file `node_modules/lodash/lodash.js` and running the test with the `{}, ` removed. Then you can test that adding back `{}` as the initial parameter fixes the problem. ## **Screenshots/Recordings** N/A ## **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/main/.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/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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.
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use `cloneDeep` prior to mutating, so that we're no longer attempting to mutate a frozen object. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28970?quickstart=1) Fixes #28599 I'm not sure exactly how to reproduce the error using a real build. But the problem is easy to demonstrate in the "should update existing fragment state with new fragment props" unit test. The problem is that we didn't catch this before because Lodash doesn't have strict mode enabled, so in unit tests the attempt to mutate a frozen object will silently fail. In a production build, [strict mode is enabled by LavaMoat](https://github.com/LavaMoat/LavaMoat/blob/7a3896a08b45f667649c46a56f27fe7bf20f4207/packages/lavapack/src/pack.js#L333). You can reproduce the problem by adding `"use strict"` to the top of the file `node_modules/lodash/lodash.js` and running the test with the `{}, ` removed. Then you can test that adding back `{}` as the initial parameter fixes the problem. N/A - [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/main/.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/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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.
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> The function `createEventFragment` of the `MetaMetricsController` was broken recently in the migration to BaseControllerV2 (#28113). We ended up trying to mutate a piece of Immer state, resulting in an error. The affected line was updated to use `cloneDeep` prior to mutating, so that we're no longer attempting to mutate a frozen object. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28970?quickstart=1) Fixes #28599 I'm not sure exactly how to reproduce the error using a real build. But the problem is easy to demonstrate in the "should update existing fragment state with new fragment props" unit test. The problem is that we didn't catch this before because Lodash doesn't have strict mode enabled, so in unit tests the attempt to mutate a frozen object will silently fail. In a production build, [strict mode is enabled by LavaMoat](https://github.com/LavaMoat/LavaMoat/blob/7a3896a08b45f667649c46a56f27fe7bf20f4207/packages/lavapack/src/pack.js#L333). You can reproduce the problem by adding `"use strict"` to the top of the file `node_modules/lodash/lodash.js` and running the test with the `{}, ` removed. Then you can test that adding back `{}` as the initial parameter fixes the problem. N/A - [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/main/.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/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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.
Describe the bug
There is a console error for every Send Transaction, but the Tx is successful
Uncaught (in promise) TypeError: Cannot add property chain_id, object is not extensible
Expected behavior
No console error
Screenshots/Recordings
Steps to reproduce
Error messages or log output
Detection stage
In beta
Version
12.8.0
(originally found in a QA build for portfolio view)
Build type
Other (please specify exactly where you obtained this build in "Additional Context" section)
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
QA-5 build
Severity
No response
The text was updated successfully, but these errors were encountered: