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

Error data is not written to the terminal during the RPC throw error #5354

Open
0xcodefive opened this issue Oct 29, 2024 · 4 comments
Open
Assignees

Comments

@0xcodefive
Copy link

Describe the bug
When an RPC Error: Internal JSON-RPC error occurs, the result of the message is displayed in the terminal.
In the current release, an error message is displayed in the terminal, but its data is not displayed.
There was a error message and error data in release 0.55.0.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy this contract:
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.8.2 <0.9.0;

contract Test {
    error Stop(uint256);
    constructor() {
        revert Stop(block.timestamp);
    }
}
  1. Look at the terminal and the browser console

Result on 0.55.0

creation of Test pending...
[vm]from: 0x5B3...eddC4to: Test.(constructor)value: 0 weidata: 0x608...056felogs: 0hash: 0x68a...063e4
creation of Test errored: Error occurred: revert.

revert
	The transaction has been reverted to the initial state.
Error provided by the contract:
Stop
Parameters:
{
 "0": {
  "value": "1730229971"
 }
}
You may want to cautiously increase the gas limit if the transaction went out of gas.

2024-10-30_00-36-01

Result on 0.56.1

creation of Test pending...
creation of Test errored: execution reverted

2024-10-30_00-35-14

Desktop:
Remix 0.56.1 (and 0.57.0-dev) on https://remix.ethereum.org/

@0xcodefive
Copy link
Author

This is probably a continuation of this error: #5327

@Aniket-Engg
Copy link
Collaborator

Aniket-Engg commented Oct 30, 2024

Screenshot 2024-10-30 at 4 29 51 PM

For me, it shows error data as expected with VM with Remix v0.56.1. Please double check

@0xcodefive
Copy link
Author

@Aniket-Engg This actually happens when a transaction was sending (like on Remix VM). However, if the transaction is canceled, the error data is not written in the terminal. Try to connect the metamask, deploy the contract and cancel the transaction.

2024-10-30_16-54-29

2024-10-30_17-00-37

@0xcodefive
Copy link
Author

0xcodefive commented Oct 30, 2024

For comparison, it works in this release: https://deploy-preview-5287--remixproject.netlify.app/

creation of Test pending...
creation of Test errored: Error occurred: execution reverted.

execution reverted
	The transaction has been reverted to the initial state.
Error provided by the contract:
Stop
Parameters:
{
 "0": {
  "value": "1730290540"
 }
}
You may want to cautiously increase the gas limit if the transaction went out of gas.

The error has appeared since this release: https://deploy-preview-5288--remixproject.netlify.app/

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

No branches or pull requests

2 participants