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
So i'm using this to test for events https://github.com/orodio/flow-view-source/blob/master/src/pages/event.comp.js and it gives me the events I'm subscribed to. I'm using a polling rate of 3 seconds and was wondering how the heights are worked out for each poll because it seems like it skips some blocks. You can see in the screenshot the end of the last block range searched and the start of the next block range. What happens to the blocks in between? Also you can see it scans the same block range up to 3 times for some reason, why is that happening?
I'm also getting this problem that kills the event listening completely even though the rest call is wrapped in a try catch.
So many errors how is this done clean and for every block, no fail?
Here is the code put on Netlify so you can see the errors https://flowevents.netlify.app/ if you wait a minute or two you will see the script breaks completely and event listening stops running
The text was updated successfully, but these errors were encountered:
@SmartChain-AI did you ever figure out why the event listening is sometimes killed even though it's wrapped in a try/catch? I'm running into the same issue.
There's actually some big changes coming to the fcl.events() feature. The previous implementation was fairly bug prone & used polling under the hood. However, the new implementation uses WebSockets to stream events instead and should be completely lossless & more responsive 🙂
Bad news: It's not currently available on mainnet. It's only on testnet so the changes have not yet been released to FCL.
For testnet, you can try it using a preview build of FCL (npm install @onflow/fcl@event-streaming)
@aautem@SmartChain-AI WebSocket event streaming has been deployed to mainnet now, so the tagged branch should be working on both testnet & mainnet & the latest flow-cli emulator. I'll work towards getting this into the latest alpha tagged branch and hopefully a stable release in the near future.
Current Behavior
So i'm using this to test for events https://github.com/orodio/flow-view-source/blob/master/src/pages/event.comp.js and it gives me the events I'm subscribed to. I'm using a polling rate of 3 seconds and was wondering how the heights are worked out for each poll because it seems like it skips some blocks. You can see in the screenshot the end of the last block range searched and the start of the next block range. What happens to the blocks in between? Also you can see it scans the same block range up to 3 times for some reason, why is that happening?
I'm also getting this problem that kills the event listening completely even though the rest call is wrapped in a try catch.
So many errors how is this done clean and for every block, no fail?
Expected Behavior
Expecting no errors
Steps To Reproduce
Using the following React script:
Environment
Here is the code put on Netlify so you can see the errors https://flowevents.netlify.app/ if you wait a minute or two you will see the script breaks completely and event listening stops running
The text was updated successfully, but these errors were encountered: