Error when querying events via http
See original GitHub issueI’m trying to upgrade and switch my fcl config from grpc to http. I’m upgrading from 0.0.79-alpha.3 to 1.0.0-alpha.0. I’m getting an error when I query events on testnet. It was working before the upgrade. Creating this issue at request of Justin.
Request
const result = await fcl.send([
fcl.getEventsAtBlockHeightRange("A.f3e8f8ae2e9e2fec.ToddTestnet1_NFT.Deposit", 66002791, 66002890),
]);
Error
TypeError: r.forEach is not a function
at X (/Users/gta/giglabs/portal-api/node_modules/@onflow/transport-http/dist/sdk-send-http.js:1:39489)
at /Users/gta/giglabs/portal-api/node_modules/@onflow/transport-http/dist/sdk-send-http.js:1:39372
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async processNftDepositEvents (/Users/gta/giglabs/portal-api/built/src/services/events.js:101:24)
at async checkEvents (/Users/gta/giglabs/portal-api/built/src/services/events.js:90:13)
at async Timeout.processEvents [as _onTimeout] (/Users/gta/giglabs/portal-api/built/src/services/events.js:34:17)
Config
await fcl
.config()
.put("accessNode.api", "https://rest-testnet.onflow.org/")
.put("decoder.Type", (val: any) => val.staticType);
Issue Analytics
- State:
- Created a year ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
HTTP request error when using query parameters - Questions
My HTTP request is a simple GET request with no authentication header required, but it does expect two URL / query parameters to...
Read more >Error in Querying Event Logs using C# - MSDN
I am reading the event logs from a remote server. recently i have change my code to read the logs only for last...
Read more >Event Viewer query error message
Open Regedit.exe · Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels · Find the sub-key that matches the “ ...
Read more >Querying Events by Date/Time directly via the REST API
Hello Support, During the last week I've been doing some testing with the API. I started off with using the NuGet package and...
Read more >Infopath: querying a data source via web services
An error occurred querying a data source. Click OK to resume filling out the form. You may want to check your form data...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The PR has now been merged to master. The change will be deployed to testnet/mainnet on the next testnet/mainnet spork which is on June 8th and 15th respectively. Lemme know if this changes is needed on testnet/mainnet before that and I can port over the change to the current testnet/mainnet.
https://github.com/onflow/flow-go/pull/2379 - PR against flow-go master which fixes this issue and makes the REST API consistent with the gRPC API in terms of the maximum block height range.