platform
platform copied to clipboard
Repeated `Block height changed handler is already set` warnings using JS SDK
Expected Behavior
No (or one) warning during script execution
Current Behavior
warn: Running on a NodeJS env without any specified adapter. Data will not persist.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
Possible Solution
Not sure.
Steps to Reproduce (for bugs)
From Anthony's platform tutorial, I ran into the issue above during the updateContract, submitNoteDocument, topUpIdentities, updateNoteDocument and deleteNoteDocument scripts. Not sure how consistent/reproducible it is.
Your Environment
- Version used: JS SDK v4.2.0
- Environment name and version: Node.js v22.5.1
- Operating System and version: Desktop MacOS 12.6.3
- Project: https://github.com/riongull/first-look-dash?tab=readme-ov-file
Thank you for your report. This is happening in case if block sync worker in wallet lib is not getting new L1 blocks for some reason. It will be difficult to fix atm. We are planning to rework our SDK soon. I will comeback with more details when we have our SDK roadmap defined.