-
Notifications
You must be signed in to change notification settings - Fork 922
Getting an error while getting transaction info using getParsedTransactions method #3721
Comments
+1 I encountered the same error while using the ChainStack node provider. I have already pinged them, but I still suspect that the error might be related to changes in the Solana client. |
Hey @VladLypovyi , are you sure you're looking at the right payload?
The Solana RPC is built to the JSON-RPC 2.0 specification, which states the following about the presence of
On the Web3.js side, response types are coerced by solana-web3.js/src/connection.ts Lines 430 to 441 in 8ea27fc
This payload you shared is actually from a JSON-parsed transaction payload. The https://solana.com/docs/rpc/http/gettransaction#result Seems to work okay on my end. import { Connection } from './lib/index.cjs.js';
const connection = new Connection('http://127.0.0.1:8899', { commitment: 'finalized' });
const response = await connection.getParsedTransactions(
['39vTsbCWCopEYA9AQRcgD3YNwjQ24dGes4SWJc5m1KA4kMdQdEBGBwrQNrXgCNwRVXGjMiyGSa3ZAxH69VeCvpi5'],
{ maxSupportedTransactionVersion: 0 },
);
console.log(response);
Maybe share something that can specifically reproduce the "failed to get transactions" error you mentioned? You could include a snippet of the console too if you want. This would make it easier to bug hunt. Thanks! |
Hi @buffalojoec! Thank you for your participation. I think the issue can be closed. |
NOTE: This bug tracker is for the v1.98.0 version of @solana/web3.js.
Overview
Got an error while getting transaction info using
getParsedTransactions
methodSteps to reproduce
Try to get transaction using
getParsedTransactions
methodDescription of bug
Some nodes return the 'error' property for the successful response ("error":null)
But the method
getParsedTransactions
has a check for existing 'error', and throws error that 'failed to get transactions' even for successful responsesThe text was updated successfully, but these errors were encountered: