Skip to content

Fix the switchChain error encountered when using the "metaMask" conne… #831

Fix the switchChain error encountered when using the "metaMask" conne…

Fix the switchChain error encountered when using the "metaMask" conne… #831

Triggered via push September 16, 2024 17:15
Status Success
Total duration 3m 55s
Artifacts

changesets.yml

on: push
Matrix: Verify / Test
Matrix: Verify / Types
Fit to window
Zoom out
Zoom in

Annotations

8 errors and 2 warnings
packages/core/src/actions/watchPendingTransactions.test.ts > default: packages/core/src/actions/sendTransaction.ts#L104
TransactionExecutionError: The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account. This error could arise when the account does not have enough funds to: - pay for the total gas fee, - pay for the value to send. The cost of the transaction is calculated as `gas * gas fee + value`, where: - `gas` is the amount of gas needed for transaction to execute, - `gas fee` is the gas fee, - `value` is the amount of ether to send to the recipient. Request Arguments: from: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 to: 0x70997970c51812dc3a010c7d01b50e0d17dc79c8 value: 1 ETH Details: Insufficient funds for gas * price + value Version: viem@2.17.0 ❯ getTransactionError node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getTransactionError.ts:44:10 ❯ sendTransaction node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/actions/wallet/sendTransaction.ts:241:11 ❯ Module.sendTransaction packages/core/src/actions/sendTransaction.ts:104:16 ❯ packages/core/src/actions/watchPendingTransactions.test.ts:30:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: 'Insufficient funds for gas * price + value', docsPath: undefined, metaMessages: [ 'This error could arise when the account does not have enough funds to:', ' - pay for the total gas fee,', ' - pay for the value to send.', ' ', 'The cost of the transaction is calculated as `gas * gas fee + value`, where:', ' - `gas` is the amount of gas needed for transaction to execute,', ' - `gas fee` is the gas fee,', ' - `value` is the amount of ether to send to the recipient.', ' ', 'Request Arguments:', ' from: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266\n to: 0x70997970c51812dc3a010c7d01b50e0d17dc79c8\n value: 1 ETH' ], shortMessage: 'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.', version: 'viem@2.17.0', walk: 'Function<walk>' } Caused by: InsufficientFundsError: The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account. This error could arise when the account does not have enough funds to: - pay for the total gas fee, - pay for the value to send. The cost of the transaction is calculated as `gas * gas fee + value`, where: - `gas` is the amount of gas needed for transaction to execute, - `gas fee` is the gas fee, - `value` is the amount of ether to send to the recipient. Details: Insufficient funds for gas * price + value Version: viem@2.17.0 ❯ getNodeError node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getNodeError.ts:102:12 ❯ node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getTransactionError.ts:37:19 ❯ getTransactionError node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getTransactionError.ts:43:5 ❯ sendTransaction node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/actions/wallet/sendTransaction.ts:241:11 ❯ Module.sendTransaction packages/core/src/actions/sendTransaction.ts:104:16 ❯ packages/core/src/actions/watchPendingTransactions.test.ts:30:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: 'Insufficient funds for gas * price + value', docsPath: undefined, metaMessages: [ 'This error could arise when the account does not have enough funds to:', ' - pay for the total gas fee,', ' - pay for the value to send.', ' ', 'The cost of the transaction is calculated as `gas * gas fee + value`, where:', ' - `gas` is the amount of gas needed for transaction to execute,', ' - `gas fee` is the gas fee,', ' - `value` is the amount of ether to send to the recipient.' ], shortMessage: 'The total cost (gas * gas fee + value) of executing this transa
packages/core/src/actions/watchPendingTransactions.test.ts > default: packages/core/src/actions/connect.ts#L52
ConnectorAlreadyConnectedError: Connector already connected. Version: @wagmi/core@x.y.z ❯ Module.connect packages/core/src/actions/connect.ts:52:11 ❯ packages/core/src/actions/watchPendingTransactions.test.ts:20:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: undefined, shortMessage: 'Connector already connected.', docsBaseUrl: 'https://wagmi.sh/core', version: '@wagmi/core@x.y.z', walk: 'Function<walk>' }
packages/core/src/actions/watchPendingTransactions.test.ts > default: packages/core/src/actions/connect.ts#L52
ConnectorAlreadyConnectedError: Connector already connected. Version: @wagmi/core@x.y.z ❯ Module.connect packages/core/src/actions/connect.ts:52:11 ❯ packages/core/src/actions/watchPendingTransactions.test.ts:20:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: undefined, shortMessage: 'Connector already connected.', docsBaseUrl: 'https://wagmi.sh/core', version: '@wagmi/core@x.y.z', walk: 'Function<walk>' }
packages/core/src/actions/watchPendingTransactions.test.ts > default: packages/core/src/actions/connect.ts#L52
ConnectorAlreadyConnectedError: Connector already connected. Version: @wagmi/core@x.y.z ❯ Module.connect packages/core/src/actions/connect.ts:52:11 ❯ packages/core/src/actions/watchPendingTransactions.test.ts:20:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: undefined, shortMessage: 'Connector already connected.', docsBaseUrl: 'https://wagmi.sh/core', version: '@wagmi/core@x.y.z', walk: 'Function<walk>' }
packages/core/src/actions/sendTransaction.test.ts > default: packages/core/src/actions/sendTransaction.test.ts#L19
AssertionError: promise rejected "TransactionExecutionError: The total cost… { …(6) }" instead of resolving ❯ packages/core/src/actions/sendTransaction.test.ts:19:3 Caused by: Error: The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account. This error could arise when the account does not have enough funds to: - pay for the total gas fee, - pay for the value to send. The cost of the transaction is calculated as `gas * gas fee + value`, where: - `gas` is the amount of gas needed for transaction to execute, - `gas fee` is the gas fee, - `value` is the amount of ether to send to the recipient. Request Arguments: from: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 to: 0xd2135CfB216b74109775236E36d4b433F1DF507B value: 0.01 ETH Details: Insufficient funds for gas * price + value Version: viem@2.17.0 ❯ getTransactionError node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getTransactionError.ts:44:10 ❯ sendTransaction node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/actions/wallet/sendTransaction.ts:241:11 ❯ Module.sendTransaction packages/core/src/actions/sendTransaction.ts:104:16 ❯ packages/core/src/actions/sendTransaction.test.ts:14:3 Caused by: Error: The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account. This error could arise when the account does not have enough funds to: - pay for the total gas fee, - pay for the value to send. The cost of the transaction is calculated as `gas * gas fee + value`, where: - `gas` is the amount of gas needed for transaction to execute, - `gas fee` is the gas fee, - `value` is the amount of ether to send to the recipient. Details: Insufficient funds for gas * price + value Version: viem@2.17.0 ❯ getNodeError node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getNodeError.ts:102:12 ❯ node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getTransactionError.ts:37:19 ❯ getTransactionError node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/errors/getTransactionError.ts:43:5 ❯ sendTransaction node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/actions/wallet/sendTransaction.ts:241:11 ❯ Module.sendTransaction packages/core/src/actions/sendTransaction.ts:104:16 ❯ packages/core/src/actions/sendTransaction.test.ts:14:3 Caused by: Error: Transaction creation failed. URL: http://127.0.0.1:8545/1 Request body: {"method":"eth_sendTransaction","params":[{"from":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","to":"0xd2135CfB216b74109775236E36d4b433F1DF507B","value":"0x2386f26fc10000"}]} Details: Insufficient funds for gas * price + value Version: viem@2.17.0 ❯ withRetry.delay.count.count node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/buildRequest.ts:150:25 ❯ attemptRetry node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/promise/withRetry.ts:44:22 Caused by: Error: Transaction creation failed. URL: http://127.0.0.1:8545/1 Request body: {"method":"eth_sendTransaction","params":[{"from":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","to":"0xd2135CfB216b74109775236E36d4b433F1DF507B","value":"0x2386f26fc10000"}]} Details: Insufficient funds for gas * price + value Version: viem@2.17.0 ❯ withRetry.delay.count.count node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/buildRequest.ts:150:25 ❯ attemptRetry node_modules/.pnpm/viem@2.17.0_bufferutil@4.0.8_typescript@5.5.2_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/utils/promise
packages/core/src/actions/sendTransaction.test.ts > default: packages/core/src/actions/connect.ts#L52
ConnectorAlreadyConnectedError: Connector already connected. Version: @wagmi/core@x.y.z ❯ Module.connect packages/core/src/actions/connect.ts:52:11 ❯ packages/core/src/actions/sendTransaction.test.ts:13:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: undefined, shortMessage: 'Connector already connected.', docsBaseUrl: 'https://wagmi.sh/core', version: '@wagmi/core@x.y.z', walk: 'Function<walk>' }
packages/core/src/actions/sendTransaction.test.ts > default: packages/core/src/actions/connect.ts#L52
ConnectorAlreadyConnectedError: Connector already connected. Version: @wagmi/core@x.y.z ❯ Module.connect packages/core/src/actions/connect.ts:52:11 ❯ packages/core/src/actions/sendTransaction.test.ts:13:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: undefined, shortMessage: 'Connector already connected.', docsBaseUrl: 'https://wagmi.sh/core', version: '@wagmi/core@x.y.z', walk: 'Function<walk>' }
packages/core/src/actions/sendTransaction.test.ts > default: packages/core/src/actions/connect.ts#L52
ConnectorAlreadyConnectedError: Connector already connected. Version: @wagmi/core@x.y.z ❯ Module.connect packages/core/src/actions/connect.ts:52:11 ❯ packages/core/src/actions/sendTransaction.test.ts:13:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: undefined, shortMessage: 'Connector already connected.', docsBaseUrl: 'https://wagmi.sh/core', version: '@wagmi/core@x.y.z', walk: 'Function<walk>' }
Verify / Test (3, 3)
Attempt 1 failed. Reason: Child_process exited with error code 1
Verify / Test (3, 3)
Attempt 2 failed. Reason: Child_process exited with error code 1