Too many plays for get_all_plays script?

The get_all_plays script in the nba-smart-contracts returns an error. Is this because the amount of data returned is too large for the script (ie there are too many plays for the script to work as originally intended)?

script:
import TopShot from 0x0b2a3299cc857e29
pub fun main(): [TopShot.Play] {
return TopShot.getAllPlays()
}

error: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (5966328 vs. 4194304)

I checked this in my side it returns all the plays, working fine
update your flow cli version maybe it is creating the issue.

1 Like

Hi @MCinPA , did upgrading the Flow CLI solved the issue?

Hi @vr1 @NasirAliShah thanks for the information. it looks like the issue is actually with using the go flow SDK and the grpc settings there. In the cases where querying a single block resulting in the error using the go sdk, i was able to use the CLI on the same block without an error. Thanks again for suggesting the CLI, and I shared the error info at the go sdk github page here https://github.com/onflow/flow-go-sdk/issues/262

1 Like