-
Notifications
You must be signed in to change notification settings - Fork 121
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
The code in public_tx.js under the Deploy a smart contract operation in the Tutorials module of Private networks has significant errors, resulting in various errors when running node public_tx.js. #1546
Comments
Same happens to me, still no luck |
it was successful the first time i ran it. when I tried running it again got this error |
It´s happening the same when I try to deploy a new contract: public.js const web3Instance = new Web3('http://myserver:8541'); const privateKey = // read in the contracts // get txnCount for the nonce value const rawTxOptions = { console.log("Signing the txn") console.log("Sending transaction..."); ` InvalidResponseError: Returned error: Internal error Node.js v18.16.0 Does anyone have any ideas about this problem? |
Was anyone able to use it? |
Hi, I am also getting the same issue while trying to deploy a contract on QBFT private network using Web3j with the generated smart contract wrapper. When I check the log with TRACE flag , it showed as "MessageFrame evaluation halted because of INVALID_OPERATION". I am quite not sure why is this happening.. |
Several potential issues identified (from error message):
Environment
Suggested fixUpdate the transaction configuration to include proper gas handling: const rawTxOptions = {
nonce: web3Instance.utils.numberToHex(txnCount),
from: account.address,
to: null,
value: "0x00",
data: "0x" + contractBin,
// Dynamic gas pricing
gasPrice: await web3Instance.eth.getGasPrice(),
// Estimate required gas
gas: await web3Instance.eth.estimateGas({
from: account.address,
data: "0x" + contractBin
})
}; Verification stepsConfirm network connection:await web3Instance.eth.net.isListening(); Check account balance:const balance = await web3Instance.eth.getBalance(account.address);
console.log("Balance:", web3Instance.utils.fromWei(balance, 'ether'), "ETH"); Verify current gas price:const gasPrice = await web3Instance.eth.getGasPrice();
console.log("Gas Price:", gasPrice); Advice for additional troubleshooting
|
The code in public_tx.js under the Deploy a smart contract operation in the Tutorials module of Private networks has significant errors, resulting in various errors when running node public_tx.js.
InvalidResponseError: Returned error: Transaction processing could not be completed due to an exception
at Web3RequestManager._processJsonRpcResponse (/home/haerker/besu/Permissioned-Network/node_modules/web3-core/lib/commonjs/web3_request_manager.js:258:23)
at Web3RequestManager. (/home/haerker/besu/Permissioned-Network/node_modules/web3-core/lib/commonjs/web3_request_manager.js:156:29)
at Generator.next ()
at fulfilled (/home/haerker/besu/Permissioned-Network/node_modules/web3-core/lib/commonjs/web3_request_manager.js:21:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
innerError: {
code: -32000,
message: 'Transaction processing could not be completed due to an exception'
},
The text was updated successfully, but these errors were encountered: