You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
solana-client::rpc_client::get_program_accounts_with_config is failing with ClientError { request: Some(GetProgramAccounts), kind: SerdeJson(Error("invalid type: map, expected a sequence", line: 0, column: 0)) } when with_context of RpcProgramAccountsConfig is set to Some(true) because of deserialization bug.
Example usage which fails:
let result = context.rpc_client.get_program_accounts_with_config(&context.program_id,RpcProgramAccountsConfig{filters:None,account_config:RpcAccountInfoConfig{encoding:Some(UiAccountEncoding::Base64),data_slice:None,commitment:Some(context.commitment),min_context_slot:None},with_context:Some(true)},);
Tested on version: 1.10.24
Proposed Solution
As context of underlying RPC call is ignored in this method anyway I see following potential solutions:
Fix implementation to handle deserialization correctly when RPC response contains context
Ignore with_context value - override it to false
Return more user friendly error = that this property of RpcProgramAccountsConfig is not supported in this method & state so in method documentation.
The text was updated successfully, but these errors were encountered:
Problem
solana-client::rpc_client::get_program_accounts_with_config
is failing withClientError { request: Some(GetProgramAccounts), kind: SerdeJson(Error("invalid type: map, expected a sequence", line: 0, column: 0)) }
whenwith_context
ofRpcProgramAccountsConfig
is set toSome(true)
because of deserialization bug.Example usage which fails:
Tested on version: 1.10.24
Proposed Solution
As context of underlying RPC call is ignored in this method anyway I see following potential solutions:
with_context
value - override it to falseRpcProgramAccountsConfig
is not supported in this method & state so in method documentation.The text was updated successfully, but these errors were encountered: